WP VR – 360 Panorama and virtual tour creator for WordPress - Version 7.3.6

Version Description

(04-04-2022) = * New: Google Cardboard, Oculus Rift, HTC Vive, & GearVR Support for Video Tours. * New: Support for Multiple Tours Inside Elementor Tabs. * New: Custom Mobile Height for the Tours using WPVR Gutenberg Block. * New: Custom Mobile Height for the Tours using Shortcode. * Fix: Custom Preview Image Text not Working in Elementor Tabs. * Fix: PHP Warnings on Front-end. * Fix: PHP Warnings on Settings Page. * Fix: PHP Warnings on Hotspots Page.

Download this release

Release Info

Developer rextheme
Plugin Icon 128x128 WP VR – 360 Panorama and virtual tour creator for WordPress
Version 7.3.6
Comparing to
See all releases

Code changes from version 7.3.5 to 7.3.6

README.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
5
  Requires at least: 5.0
6
  Tested up to: 5.9
7
  Requires PHP: 7.0.0
8
- Stable tag: 7.3.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -323,6 +323,17 @@ Admins can remove the access from Authors and Editors at any time.
323
 
324
  == Changelog ==
325
 
 
 
 
 
 
 
 
 
 
 
 
326
  = 7.3.5 (27-01-2022) =
327
  * Update: Checked Compatibility with WordPress 5.9.
328
  * Update: Checked Compatibility with WooCommerce 6.1.1.
@@ -336,20 +347,6 @@ Admins can remove the access from Authors and Editors at any time.
336
  * Fix: Height field doesn't work for YouTube videos - WPVR Elementor widget.
337
  * Fix: Width and Height fields don't work for YouTube video tours - WPVR Gutenberg block.
338
 
339
-
340
- = 7.3.4 (13-10-2021) =
341
- * Update: Checked Compatibility with WooCommerce 5.8.0.
342
- * Update: Checked Compatibility with Elementor 3.4.5.
343
- * Update: Rollback Versions updated to 7.3.3.
344
- * New: Preview Option in General Section.
345
- * New: Warning Message in Video Tab if no video is assigned.
346
- * Fix: Endless Loading Loop in Tour Preview.
347
- * Fix: Video Tab Warning - 'X' Button Functionality Issue.
348
- * Fix: Warning Message if Scene ID & 360 Degree Image is missing.
349
- * Fix: Warning Message while Enabling video.js control, if Exclude Field is empty.
350
- * Tweak: Video Tab Warning Message.
351
-
352
-
353
  = 7.3.3 (16-09-2021) =
354
  * Update: Checked Compatibility with WordPress 5.8.1.
355
  * Update: Checked Compatibility with PHP 8.0.
5
  Requires at least: 5.0
6
  Tested up to: 5.9
7
  Requires PHP: 7.0.0
8
+ Stable tag: 7.3.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
323
 
324
  == Changelog ==
325
 
326
+ = 7.3.6 (04-04-2022) =
327
+ * New: Google Cardboard, Oculus Rift, HTC Vive, & GearVR Support for Video Tours.
328
+ * New: Support for Multiple Tours Inside Elementor Tabs.
329
+ * New: Custom Mobile Height for the Tours using WPVR Gutenberg Block.
330
+ * New: Custom Mobile Height for the Tours using Shortcode.
331
+ * Fix: Custom Preview Image Text not Working in Elementor Tabs.
332
+ * Fix: PHP Warnings on Front-end.
333
+ * Fix: PHP Warnings on Settings Page.
334
+ * Fix: PHP Warnings on Hotspots Page.
335
+
336
+
337
  = 7.3.5 (27-01-2022) =
338
  * Update: Checked Compatibility with WordPress 5.9.
339
  * Update: Checked Compatibility with WooCommerce 6.1.1.
347
  * Fix: Height field doesn't work for YouTube videos - WPVR Elementor widget.
348
  * Fix: Width and Height fields don't work for YouTube video tours - WPVR Gutenberg block.
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  = 7.3.3 (16-09-2021) =
351
  * Update: Checked Compatibility with WordPress 5.8.1.
352
  * Update: Checked Compatibility with PHP 8.0.
admin/class-wpvr-admin.php CHANGED
@@ -1904,7 +1904,7 @@ class Wpvr_Admin
1904
  $wpvr_url_open_checked = '';
1905
  $wpvr_url_open_data = 'off';
1906
 
1907
- if ($pano_hotspot['wpvr_url_open'][0] == 'on') {
1908
  $wpvr_url_open_checked = 'checked';
1909
  $wpvr_url_open_data = 'on';
1910
  }
1904
  $wpvr_url_open_checked = '';
1905
  $wpvr_url_open_data = 'off';
1906
 
1907
+ if (isset($pano_hotspot['wpvr_url_open'][0]) && $pano_hotspot['wpvr_url_open'][0] == 'on') {
1908
  $wpvr_url_open_checked = 'checked';
1909
  $wpvr_url_open_data = 'on';
1910
  }
admin/class-wpvr-ajax.php CHANGED
@@ -1001,6 +1001,13 @@ class Wpvr_Ajax
1001
  $cpLogoContent = sanitize_text_field($_POST['cpLogoContent']);
1002
  //===Company Logo===//
1003
 
 
 
 
 
 
 
 
1004
  //===background tour ===//
1005
  $bg_tour_enabler = sanitize_text_field($_POST['wpvr_bg_tour_enabler']);
1006
  // $bg_tour_navmenu = sanitize_text_field($_POST['wpvr_bg_tour_navmenu_enabler']);
@@ -1355,7 +1362,7 @@ class Wpvr_Ajax
1355
  //===audio===//
1356
 
1357
  $pano_array = array();
1358
- $pano_array = array(__("panoid") => $panoid, __("autoLoad") => $autoload, __("hfov") => $default_global_zoom, __("maxHfov") => $max_global_zoom, __("minHfov") => $min_global_zoom, __("showControls") => $control, __("cpLogoSwitch") => $cpLogoSwitch, __("cpLogoImg") => $cpLogoImg, __("cpLogoContent") => $cpLogoContent, __("vrgallery") => $vrgallery, __("vrgallery_title") => $vrgallery_title, __("vrgallery_display") => $vrgallery_display, __("customcontrol") => $custom_control, __("gyro") => $gyro, __("deviceorientationcontrol") => $deviceorientationcontrol, __("compass") => $compass, __("mouseZoom") => $mouseZoom, __("draggable") => $draggable, __("diskeyboard") => $diskeyboard, __("keyboardzoom") => $keyboardzoom, __("autoRotate") => $autorotation, __("autoRotateInactivityDelay") => $autorotationinactivedelay, __("autoRotateStopDelay") => $autorotationstopdelay, __("preview") => $preview, __("defaultscene") => $default_scene, __("scenefadeduration") => $scene_fade_duration, __("bg_music") => $bg_music, __("bg_music_url") => $bg_music_url, __("autoplay_bg_music") => $autoplay_bg_music, __("loop_bg_music") => $loop_bg_music, __("panodata") => $panodata, __("previewtext") => $previewtext, __("bg_tour_enabler") => $bg_tour_enabler, __("bg_tour_navmenu") => $bg_tour_navmenu, __("bg_tour_title") => $bg_tour_title, __("bg_tour_subtitle") => $bg_tour_subtitle);
1359
 
1360
  if ($rotation == 'off') {
1361
  unset($pano_array['autoRotate']);
1001
  $cpLogoContent = sanitize_text_field($_POST['cpLogoContent']);
1002
  //===Company Logo===//
1003
 
1004
+ //===Explainer video===//
1005
+ $explainerSwitch = 'off';
1006
+ $explainerSwitch = $_POST['explainerSwitch'];
1007
+ $explainerContent = '';
1008
+ $explainerContent = $_POST['explainerContent'];
1009
+ //===Explainer video===//
1010
+
1011
  //===background tour ===//
1012
  $bg_tour_enabler = sanitize_text_field($_POST['wpvr_bg_tour_enabler']);
1013
  // $bg_tour_navmenu = sanitize_text_field($_POST['wpvr_bg_tour_navmenu_enabler']);
1362
  //===audio===//
1363
 
1364
  $pano_array = array();
1365
+ $pano_array = array(__("panoid") => $panoid, __("autoLoad") => $autoload, __("hfov") => $default_global_zoom, __("maxHfov") => $max_global_zoom, __("minHfov") => $min_global_zoom, __("showControls") => $control, __("cpLogoSwitch") => $cpLogoSwitch, __("cpLogoImg") => $cpLogoImg, __("cpLogoContent") => $cpLogoContent, __("explainerSwitch") => $explainerSwitch, __("explainerContent") => $explainerContent, __("vrgallery") => $vrgallery, __("vrgallery_title") => $vrgallery_title, __("vrgallery_display") => $vrgallery_display, __("customcontrol") => $custom_control, __("gyro") => $gyro, __("deviceorientationcontrol") => $deviceorientationcontrol, __("compass") => $compass, __("mouseZoom") => $mouseZoom, __("draggable") => $draggable, __("diskeyboard") => $diskeyboard, __("keyboardzoom") => $keyboardzoom, __("autoRotate") => $autorotation, __("autoRotateInactivityDelay") => $autorotationinactivedelay, __("autoRotateStopDelay") => $autorotationstopdelay, __("preview") => $preview, __("defaultscene") => $default_scene, __("scenefadeduration") => $scene_fade_duration, __("bg_music") => $bg_music, __("bg_music_url") => $bg_music_url, __("autoplay_bg_music") => $autoplay_bg_music, __("loop_bg_music") => $loop_bg_music, __("panodata") => $panodata, __("previewtext") => $previewtext, __("bg_tour_enabler") => $bg_tour_enabler, __("bg_tour_navmenu") => $bg_tour_navmenu, __("bg_tour_title") => $bg_tour_title, __("bg_tour_subtitle") => $bg_tour_subtitle);
1366
 
1367
  if ($rotation == 'off') {
1368
  unset($pano_array['autoRotate']);
admin/css/wpvr-admin.css CHANGED
@@ -2,9 +2,7 @@
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
5
- /* .sceneidfield {
6
- display: none;
7
- } */
8
  .wpvr_gt_settings_ruler {
9
  content: "";
10
  display: block;
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
5
+
 
 
6
  .wpvr_gt_settings_ruler {
7
  content: "";
8
  display: block;
admin/partials/wpvr_documentation.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Provide a admin area view for the plugin
5
  *
@@ -18,56 +18,69 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
  <ul class="tabs tabs-icon rex-tabs">
19
  <li class="tab col s3 wpvr_tabs_row">
20
  <a href="#tab1">
21
- <svg height="20px" width="20px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
22
- viewBox="0 0 330 330" xml:space="preserve">
23
  <path d="M165,0C74.019,0,0,74.02,0,165.001C0,255.982,74.019,330,165,330s165-74.018,165-164.999C330,74.02,255.981,0,165,0z
24
- M165,300c-74.44,0-135-60.56-135-134.999C30,90.562,90.56,30,165,30s135,60.562,135,135.001C300,239.44,239.439,300,165,300z"/>
25
  <path d="M164.998,70c-11.026,0-19.996,8.976-19.996,20.009c0,11.023,8.97,19.991,19.996,19.991
26
- c11.026,0,19.996-8.968,19.996-19.991C184.994,78.976,176.024,70,164.998,70z"/>
27
  <path d="M165,140c-8.284,0-15,6.716-15,15v90c0,8.284,6.716,15,15,15c8.284,0,15-6.716,15-15v-90C180,146.716,173.284,140,165,140z
28
- "/>
29
  </svg>
30
 
31
- <?php _e('Info','wpvr'); ?>
32
  </a>
33
  </li>
34
 
35
  <li class="tab col s3 wpvr_tabs_row">
36
  <a href="#tab2">
37
- <svg id="Capa_1" enable-background="new 0 0 512 512" height="14" width="18" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><g><path d="m338.95 243.28-120-75c-4.625-2.89-10.453-3.043-15.222-.4-4.77 2.643-7.729 7.667-7.729 13.12v150c0 5.453 2.959 10.476 7.729 13.12 2.266 1.256 4.77 1.88 7.271 1.88 2.763 0 5.522-.763 7.95-2.28l120-75c4.386-2.741 7.05-7.548 7.05-12.72s-2.663-9.979-7.049-12.72zm-112.95 60.656v-95.873l76.698 47.937z"/><path d="m437 61h-362c-41.355 0-75 33.645-75 75v240c0 41.355 33.645 75 75 75h362c41.355 0 75-33.645 75-75v-240c0-41.355-33.645-75-75-75zm45 315c0 24.813-20.187 45-45 45h-362c-24.813 0-45-20.187-45-45v-240c0-24.813 20.187-45 45-45h362c24.813 0 45 20.187 45 45z"/></g></svg>
38
- <?php _e('Video Tutorials','wpvr'); ?>
 
 
 
 
 
39
  </a>
40
  </li>
41
 
42
  <?php
43
- if (!is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
44
- ?>
45
  <li class="tab col s3 wpvr_tabs_row">
46
  <a href="#tab3">
47
- <svg height="16px" viewBox="0 -10 511.98685 511" width="17px" xmlns="http://www.w3.org/2000/svg"><path d="m114.59375 491.140625c-5.609375 0-11.179688-1.75-15.933594-5.1875-8.855468-6.417969-12.992187-17.449219-10.582031-28.09375l32.9375-145.089844-111.703125-97.960937c-8.210938-7.167969-11.347656-18.519532-7.976562-28.90625 3.371093-10.367188 12.542968-17.707032 23.402343-18.710938l147.796875-13.417968 58.433594-136.746094c4.308594-10.046875 14.121094-16.535156 25.023438-16.535156 10.902343 0 20.714843 6.488281 25.023437 16.511718l58.433594 136.769532 147.773437 13.417968c10.882813.980469 20.054688 8.34375 23.425782 18.710938 3.371093 10.367187.253906 21.738281-7.957032 28.90625l-111.703125 97.941406 32.9375 145.085938c2.414063 10.667968-1.726562 21.699218-10.578125 28.097656-8.832031 6.398437-20.609375 6.890625-29.910156 1.300781l-127.445312-76.160156-127.445313 76.203125c-4.308594 2.558594-9.109375 3.863281-13.953125 3.863281zm141.398438-112.875c4.84375 0 9.640624 1.300781 13.953124 3.859375l120.277344 71.9375-31.085937-136.941406c-2.21875-9.746094 1.089843-19.921875 8.621093-26.515625l105.472657-92.5-139.542969-12.671875c-10.046875-.917969-18.6875-7.234375-22.613281-16.492188l-55.082031-129.046875-55.148438 129.066407c-3.882812 9.195312-12.523438 15.511718-22.546875 16.429687l-139.5625 12.671875 105.46875 92.5c7.554687 6.613281 10.859375 16.769531 8.621094 26.539062l-31.0625 136.9375 120.277343-71.914062c4.308594-2.558594 9.109376-3.859375 13.953126-3.859375zm-84.585938-221.847656s0 .023437-.023438.042969zm169.128906-.0625.023438.042969c0-.023438 0-.023438-.023438-.042969zm0 0"/></svg>
48
- <?php _e('Free vs Pro','wpvr'); ?>
 
 
49
  </a>
50
  </li>
51
- <?php
52
  }
53
  ?>
54
  <?php
55
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
56
- ?>
57
- <li class="tab col s3 wpvr_tabs_row">
58
- <a href="#tab4">
59
- <svg id="bold" enable-background="new 0 0 24 24" height="512" viewBox="0 0 24 24" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m12 6c-3.309 0-6 2.691-6 6s2.691 6 6 6 6-2.691 6-6-2.691-6-6-6zm3 7h-2v2c0 .552-.448 1-1 1s-1-.448-1-1v-2h-2c-.552 0-1-.448-1-1s.448-1 1-1h2v-2c0-.552.448-1 1-1s1 .448 1 1v2h2c.552 0 1 .448 1 1s-.448 1-1 1z"/><path d="m1.5 12c0-5.789 4.71-10.5 10.5-10.5 2.079 0 4.055.607 5.732 1.707l-1.512 1.513c-.472.47-.139 1.28.53 1.28h4.5c.414 0 .75-.336.75-.75v-4.5c0-.665-.806-1.004-1.28-.53l-1.914 1.914c-1.971-1.369-4.322-2.134-6.806-2.134-6.617 0-12 5.383-12 12 0 1.173.173 2.339.513 3.466.119.395.534.621.935.502.396-.12.621-.538.501-.935-.298-.987-.449-2.007-.449-3.033z"/><path d="m23.487 8.534c-.12-.397-.535-.623-.935-.502-.396.12-.621.538-.501.935.298.987.449 2.007.449 3.033 0 5.789-4.71 10.5-10.5 10.5-2.075 0-4.048-.604-5.722-1.7l1.505-1.522c.468-.474.132-1.278-.533-1.278h-4.5c-.2 0-.393.08-.533.223s-.219.335-.217.535l.05 4.5c.006.666.819.99 1.283.519l1.878-1.899c1.967 1.362 4.312 2.122 6.789 2.122 6.617 0 12-5.383 12-12 0-1.173-.173-2.339-.513-3.466z"/></svg>
60
- <?php _e('Import','wpvr'); ?>
61
- </a>
62
- </li>
63
- <?php
 
 
 
 
64
  }
65
  ?>
66
 
67
  <li class="tab col s3 wpvr_tabs_row">
68
  <a href="#tab5">
69
- <svg id="Layer_1" enable-background="new 0 0 512 512" height="17px" viewBox="0 0 512 512" width="17px" xmlns="http://www.w3.org/2000/svg"><path d="m272.066 512h-32.133c-25.989 0-47.134-21.144-47.134-47.133v-10.871c-11.049-3.53-21.784-7.986-32.097-13.323l-7.704 7.704c-18.659 18.682-48.548 18.134-66.665-.007l-22.711-22.71c-18.149-18.129-18.671-48.008.006-66.665l7.698-7.698c-5.337-10.313-9.792-21.046-13.323-32.097h-10.87c-25.988 0-47.133-21.144-47.133-47.133v-32.134c0-25.989 21.145-47.133 47.134-47.133h10.87c3.531-11.05 7.986-21.784 13.323-32.097l-7.704-7.703c-18.666-18.646-18.151-48.528.006-66.665l22.713-22.712c18.159-18.184 48.041-18.638 66.664.006l7.697 7.697c10.313-5.336 21.048-9.792 32.097-13.323v-10.87c0-25.989 21.144-47.133 47.134-47.133h32.133c25.989 0 47.133 21.144 47.133 47.133v10.871c11.049 3.53 21.784 7.986 32.097 13.323l7.704-7.704c18.659-18.682 48.548-18.134 66.665.007l22.711 22.71c18.149 18.129 18.671 48.008-.006 66.665l-7.698 7.698c5.337 10.313 9.792 21.046 13.323 32.097h10.87c25.989 0 47.134 21.144 47.134 47.133v32.134c0 25.989-21.145 47.133-47.134 47.133h-10.87c-3.531 11.05-7.986 21.784-13.323 32.097l7.704 7.704c18.666 18.646 18.151 48.528-.006 66.665l-22.713 22.712c-18.159 18.184-48.041 18.638-66.664-.006l-7.697-7.697c-10.313 5.336-21.048 9.792-32.097 13.323v10.871c0 25.987-21.144 47.131-47.134 47.131zm-106.349-102.83c14.327 8.473 29.747 14.874 45.831 19.025 6.624 1.709 11.252 7.683 11.252 14.524v22.148c0 9.447 7.687 17.133 17.134 17.133h32.133c9.447 0 17.134-7.686 17.134-17.133v-22.148c0-6.841 4.628-12.815 11.252-14.524 16.084-4.151 31.504-10.552 45.831-19.025 5.895-3.486 13.4-2.538 18.243 2.305l15.688 15.689c6.764 6.772 17.626 6.615 24.224.007l22.727-22.726c6.582-6.574 6.802-17.438.006-24.225l-15.695-15.695c-4.842-4.842-5.79-12.348-2.305-18.242 8.473-14.326 14.873-29.746 19.024-45.831 1.71-6.624 7.684-11.251 14.524-11.251h22.147c9.447 0 17.134-7.686 17.134-17.133v-32.134c0-9.447-7.687-17.133-17.134-17.133h-22.147c-6.841 0-12.814-4.628-14.524-11.251-4.151-16.085-10.552-31.505-19.024-45.831-3.485-5.894-2.537-13.4 2.305-18.242l15.689-15.689c6.782-6.774 6.605-17.634.006-24.225l-22.725-22.725c-6.587-6.596-17.451-6.789-24.225-.006l-15.694 15.695c-4.842 4.843-12.35 5.791-18.243 2.305-14.327-8.473-29.747-14.874-45.831-19.025-6.624-1.709-11.252-7.683-11.252-14.524v-22.15c0-9.447-7.687-17.133-17.134-17.133h-32.133c-9.447 0-17.134 7.686-17.134 17.133v22.148c0 6.841-4.628 12.815-11.252 14.524-16.084 4.151-31.504 10.552-45.831 19.025-5.896 3.485-13.401 2.537-18.243-2.305l-15.688-15.689c-6.764-6.772-17.627-6.615-24.224-.007l-22.727 22.726c-6.582 6.574-6.802 17.437-.006 24.225l15.695 15.695c4.842 4.842 5.79 12.348 2.305 18.242-8.473 14.326-14.873 29.746-19.024 45.831-1.71 6.624-7.684 11.251-14.524 11.251h-22.148c-9.447.001-17.134 7.687-17.134 17.134v32.134c0 9.447 7.687 17.133 17.134 17.133h22.147c6.841 0 12.814 4.628 14.524 11.251 4.151 16.085 10.552 31.505 19.024 45.831 3.485 5.894 2.537 13.4-2.305 18.242l-15.689 15.689c-6.782 6.774-6.605 17.634-.006 24.225l22.725 22.725c6.587 6.596 17.451 6.789 24.225.006l15.694-15.695c3.568-3.567 10.991-6.594 18.244-2.304z"/><path d="m256 367.4c-61.427 0-111.4-49.974-111.4-111.4s49.973-111.4 111.4-111.4 111.4 49.974 111.4 111.4-49.973 111.4-111.4 111.4zm0-192.8c-44.885 0-81.4 36.516-81.4 81.4s36.516 81.4 81.4 81.4 81.4-36.516 81.4-81.4-36.515-81.4-81.4-81.4z"/></svg>
70
- <?php _e('Settings','wpvr'); ?>
 
 
 
71
  </a>
72
  </li>
73
  </ul>
@@ -75,37 +88,37 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
75
  <div id="tab1" class="block-wrapper info-tab">
76
  <div class="info-wrapper">
77
  <div class="single-block banner">
78
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-banner.jpg'?>" alt="wpvr-banner">
79
  </div>
80
 
81
  <div class="single-block share-block">
82
  <div class="upgrade-pro">
83
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png'?>" alt="logo">
84
- <?php if( !is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) { ?>
85
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ','wpvr'); ?></a>
86
  <?php } ?>
87
  </div>
88
 
89
  <div class="social-share">
90
 
91
- <h4><?php _e('Share On','wpvr'); ?></h4>
92
  <ul>
93
  <li>
94
  <a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//wordpress.org/plugins/wpvr/" title="Facebook" target="_blank">
95
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/fb-regular.jpg'?>" alt="Facebook" class="regular">
96
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/fb-hover.jpg'?>" alt="Facebook" class="hover">
97
  </a>
98
  </li>
99
  <li>
100
- <a href="https://twitter.com/home?status=https%3A//wordpress.org/plugins/wpvr/" title="Twitter" target="_blank">
101
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/tw-regular.jpg'?>" alt="Twitter" class="regular">
102
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/tw-hover.jpg'?>" alt="Twitter" class="hover">
103
  </a>
104
  </li>
105
  <li>
106
- <a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//wordpress.org/plugins/wpvr/&title=&summary=&source=" title="Linkedin" target="_blank">
107
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/in-regular.jpg'?>" alt="Linked in" class="regular">
108
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/in-hover.jpg'?>" alt="Linked in" class="hover">
109
  </a>
110
  </li>
111
  </ul>
@@ -114,56 +127,56 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
114
 
115
  <div class="single-block doc">
116
  <span class="icon">
117
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/doc-icon.png'?>" class="doc-icon" alt="doc-icon">
118
  </span>
119
- <h4><?php _e('Documentation','wpvr'); ?></h4>
120
- <p><?php _e('Before You start, you can check our Documentation to get familiar with WP VR - 360 Panorama and virtual tour creator for WordPress.','wpvr'); ?></p>
121
 
122
- <a class="wpvr-btn" href="https://rextheme.com/docs/wp-vr/" target="_blank"><?php _e('Documentation','wpvr'); ?></a>
123
  </div>
124
 
125
  <div class="single-block support">
126
  <span class="icon">
127
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/support-icon.png'?>" class="support-icon" alt="support-icon">
128
  </span>
129
- <h4><?php _e('Support','wpvr'); ?></h4>
130
- <p><?php _e('Can\'t find solution on with our documentation? Just Post a ticket on Support forum. We are to solve your issue.','wpvr'); ?></p>
131
 
132
- <a class="wpvr-btn" href="https://wordpress.org/support/plugin/wpvr" target="_blank"><?php _e('Post a Ticket','wpvr'); ?></a>
133
  </div>
134
 
135
  <div class="single-block rating">
136
  <span class="icon">
137
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/rating-icon.png'?>" class="rating-icon" alt="rating-icon">
138
  </span>
139
- <h4><?php _e('Make WPVR Popular','wpvr'); ?></h4>
140
- <p><?php _e('Your rating and feedback matters to us. If you are happy with WP VR - 360 Panorama and virtual tour creator for WordPress give us a rating.','wpvr'); ?> </p>
141
 
142
- <a class="wpvr-btn" href="https://wordpress.org/plugins/wpvr/#reviews" target="_blank"><?php _e('Rate Us ','wpvr'); ?></a>
143
  </div>
144
 
145
  </div>
146
 
147
  <div class="promotion-area">
148
- <h4 class="title"><?php _e('Check out our other amazing free plugins!','wpvr'); ?></h4>
149
  <div class="single-block m2c">
150
  <span class="icon">
151
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/m2c.png'?>" alt="icon">
152
  </span>
153
- <h4><?php _e('Media Storage to Cloud','wpvr'); ?></h4>
154
- <p><?php _e('Enhance your website performance by serving website media and content through your trusted cloud portal.','wpvr'); ?></p>
155
 
156
- <a class="wpvr-btn" href="https://wordpress.org/plugins/wp-media-storage-to-cloud/" target="_blank"><?php _e('Get It Now','wpvr'); ?></a>
157
  </div>
158
 
159
  <div class="single-block sb">
160
  <span class="icon">
161
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/social-booster.png'?>" alt="icon">
162
  </span>
163
- <h4><?php _e('Social Booster','wpvr'); ?></h4>
164
- <p><?php _e('Automate social sharing of your posts & pages — instantly share or schedule your posts for social share without leaving your website.','wpvr'); ?></p>
165
 
166
- <a class="wpvr-btn" href="https://wordpress.org/plugins/social-booster/" target="_blank"><?php _e('Get It Now','wpvr'); ?></a>
167
  </div>
168
  </div>
169
 
@@ -178,9 +191,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
178
  <div class="video-right">
179
  <div class="single-block share-block">
180
  <div class="upgrade-pro">
181
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png'?>" alt="logo">
182
- <?php if( !is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) { ?>
183
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ','wpvr'); ?></a>
184
  <?php } ?>
185
  </div>
186
  </div>
@@ -189,215 +202,215 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
189
  </div>
190
  </div>
191
  <?php
192
- if (!is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
193
- ?>
194
  <div id="tab3" class="block-wrapper">
195
  <div class="wpvr-compare">
196
  <div class="compare-header">
197
- <h4><?php _e('WPVR Feature Comparison','wpvr'); ?></h4>
198
- <?php $pro_url = add_query_arg( 'wpvr-dashboard', '1', 'https://rextheme.com/wpvr/?wpvr-dashboard=1' ); ?>
199
- <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro','wpvr'); ?></a>
200
  </div>
201
 
202
  <div class="compare-tbl-wrapper">
203
  <ul class="single-feature list-header">
204
- <li class="feature"><?php _e('features','wpvr'); ?></li>
205
- <li class="free"><?php _e('free','wpvr'); ?></li>
206
- <li class="pro"><?php _e('pro','wpvr'); ?></li>
207
  </ul>
208
 
209
  <ul class="single-feature feature-list">
210
- <li class="feature"><?php _e('Unlimited Scenes and Hotspots (Free version limited to 5 Scenes & 5 Hotspots)','wpvr'); ?></li>
211
  <li class="free">
212
  <span class="icon no">
213
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
214
  </span>
215
  </li>
216
  <li class="pro">
217
  <span class="icon yes">
218
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
219
  </span>
220
  </li>
221
  </ul>
222
 
223
  <ul class="single-feature feature-list">
224
- <li class="feature"><?php _e('Tour Autoload & Auto Rotation Control','wpvr'); ?></li>
225
  <li class="free">
226
  <span class="icon yes">
227
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
228
  </span>
229
  </li>
230
  <li class="pro">
231
  <span class="icon yes">
232
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
233
  </span>
234
  </li>
235
  </ul>
236
 
237
  <ul class="single-feature feature-list">
238
- <li class="feature"><?php _e('Scene type hotspot to connect scenes','wpvr'); ?></li>
239
  <li class="free">
240
  <span class="icon yes">
241
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
242
  </span>
243
  </li>
244
  <li class="pro">
245
  <span class="icon yes">
246
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
247
  </span>
248
  </li>
249
  </ul>
250
 
251
  <ul class="single-feature feature-list">
252
- <li class="feature"><?php _e('Info type hotspots to give information, on-click or hover','wpvr'); ?></li>
253
  <li class="free">
254
  <span class="icon yes">
255
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
256
  </span>
257
  </li>
258
  <li class="pro">
259
  <span class="icon yes">
260
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
261
  </span>
262
  </li>
263
  </ul>
264
 
265
  <ul class="single-feature feature-list">
266
- <li class="feature"><?php _e('Hotspot customization with custom CSS','wpvr'); ?></li>
267
  <li class="free">
268
  <span class="icon yes">
269
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
270
  </span>
271
  </li>
272
  <li class="pro">
273
  <span class="icon yes">
274
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
275
  </span>
276
  </li>
277
  </ul>
278
 
279
  <ul class="single-feature feature-list">
280
- <li class="feature"><?php _e('Full width tour tag','wpvr'); ?></li>
281
  <li class="free">
282
  <span class="icon yes">
283
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
284
  </span>
285
  </li>
286
  <li class="pro">
287
  <span class="icon yes">
288
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
289
  </span>
290
  </li>
291
  </ul>
292
 
293
  <ul class="single-feature feature-list">
294
- <li class="feature"><?php _e('360 Video Support','wpvr'); ?></li>
295
  <li class="free">
296
  <span class="icon yes">
297
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
298
  </span>
299
  </li>
300
  <li class="pro">
301
  <span class="icon yes">
302
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
303
  </span>
304
  </li>
305
  </ul>
306
 
307
  <ul class="single-feature feature-list">
308
- <li class="feature"><?php _e('Google Street View','wpvr'); ?></li>
309
  <li class="free">
310
  <span class="icon no">
311
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
312
  </span>
313
  </li>
314
  <li class="pro">
315
  <span class="icon yes">
316
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
317
  </span>
318
  </li>
319
  </ul>
320
 
321
  <ul class="single-feature feature-list">
322
- <li class="feature"><?php _e('Partial/Flat or 180 deg panorama support','wpvr'); ?></li>
323
  <li class="free">
324
  <span class="icon no">
325
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
326
  </span>
327
  </li>
328
  <li class="pro">
329
  <span class="icon yes">
330
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
331
  </span>
332
  </li>
333
  </ul>
334
 
335
  <ul class="single-feature feature-list">
336
- <li class="feature"><?php _e('Custom scene gallery','wpvr'); ?></li>
337
  <li class="free">
338
  <span class="icon no">
339
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
340
  </span>
341
  </li>
342
  <li class="pro">
343
  <span class="icon yes">
344
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
345
  </span>
346
  </li>
347
  </ul>
348
 
349
  <ul class="single-feature feature-list">
350
- <li class="feature"><?php _e('Custom panorama controls','wpvr'); ?></li>
351
  <li class="free">
352
  <span class="icon no">
353
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
354
  </span>
355
  </li>
356
  <li class="pro">
357
  <span class="icon yes">
358
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
359
  </span>
360
  </li>
361
  </ul>
362
 
363
  <ul class="single-feature feature-list">
364
- <li class="feature"><?php _e('Custom Hotspot Icons','wpvr'); ?></li>
365
  <li class="free">
366
  <span class="icon no">
367
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
368
  </span>
369
  </li>
370
  <li class="pro">
371
  <span class="icon yes">
372
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
373
  </span>
374
  </li>
375
  </ul>
376
 
377
  <ul class="single-feature feature-list">
378
- <li class="feature"><?php _e('Color picker for custom hotspot','wpvr'); ?></li>
379
  <li class="free">
380
  <span class="icon no">
381
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
382
  </span>
383
  </li>
384
  <li class="pro">
385
  <span class="icon yes">
386
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
387
  </span>
388
  </li>
389
  </ul>
390
 
391
  <ul class="single-feature feature-list">
392
- <li class="feature"><?php _e('Zoom Range & Limit Control','wpvr'); ?></li>
393
  <li class="free">
394
  <span class="icon no">
395
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png'?>" alt="cross">
396
  </span>
397
  </li>
398
  <li class="pro">
399
  <span class="icon yes">
400
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
401
  </span>
402
  </li>
403
  </ul>
@@ -406,310 +419,303 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
406
  <!-- /compare-tbl-wrapper -->
407
 
408
  <div class="wpvr-more-feature">
409
- <h5 class="heading"><?php _e('More Pro Features','wpvr'); ?></h5>
410
  <ul>
411
  <li>
412
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
413
- <?php _e('Keyboard Control','wpvr'); ?>
414
  </li>
415
  <li>
416
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
417
- <?php _e('Mouse Scroll Control','wpvr'); ?>
418
  </li>
419
  <li>
420
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
421
- <?php _e('Control Customization','wpvr'); ?>
422
  </li>
423
  <li>
424
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
425
- <?php _e('On Screen Compass','wpvr'); ?>
426
  </li>
427
  <li>
428
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
429
- <?php _e('Scene Boundary Control','wpvr'); ?>
430
  </li>
431
  <li>
432
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
433
- <?php _e('Add scene title and description tag','wpvr'); ?>
434
  </li>
435
  <li>
436
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
437
- <?php _e('File export and import (for WPVR only)','wpvr'); ?>
438
  </li>
439
  <li>
440
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
441
- <?php _e('Duplicate tour with one click','wpvr'); ?>
442
  </li>
443
  <li>
444
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
445
- <?php _e('Gallery content scene title','wpvr'); ?>
446
  </li>
447
  <li>
448
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
449
- <?php _e('Home Button to take to Default Scene','wpvr'); ?>
450
  </li>
451
  <li>
452
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png'?>" alt="check">
453
- <?php _e('Company Logo & Description (Modal)','wpvr'); ?>
454
  </li>
455
  </ul>
456
  </div>
457
 
458
 
459
  <div class="footer-btn">
460
- <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro','wpvr'); ?></a>
461
  </div>
462
  </div>
463
  </div>
464
- <?php
465
  }
466
  ?>
467
 
468
  <?php
469
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
470
- ?>
471
  <div id="tab4" class="block-wrapper import-tab">
472
  <div class="import-tab-wrapper">
473
- <h4 class="tab-title"><?php _e('Import tour file: ','wpvr'); ?></h4>
474
  <div class="parent" style="width:100%;">
475
  <form id="wpvr_import_from">
476
  <a class="btn-floating btn-large waves-effect waves-light red" id="wpvr_button_upload"><i class="material-icons">add</i></a>
477
- <p class="vr-notice"><?php _e('Do not close or refresh the page during import process. It may take few minutes.','wpvr'); ?></p>
478
- <div class="file-path-wrapper">
479
- <input class="file-path validate" id="wpvr_file_url" type="text" value="" data-value="" >
480
- </div>
481
- <div id="wpvr_progress" class="progress" style="display:none;">
482
- <div class="indeterminate"></div>
483
- </div>
484
- <button class="wpvr-btn" type="submit" id="wpvr_button_submit" >Submit</button>
485
- </form>
486
  </div>
487
  </div>
488
  </div>
489
- <?php
490
  }
491
  ?>
492
 
493
  <div id="tab5" class="block-wrapper">
494
- <div class="rex-upgrade wpvr-settings <?php echo is_plugin_active( 'wpvr-pro/wpvr-pro.php' ) ? 'pro-active' : ''; ?>">
495
- <h4><?php _e('General Setup Options','wpvr'); ?></h4>
496
  <div class="parent settings-wrapper">
497
  <div class="wpvr_role-container">
498
  <ul>
499
  <?php
500
- $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
501
- $is_integration_module = apply_filters('is_integration_module', false);
502
-
503
- $editor_active = get_option('wpvr_editor_active');
504
- $author_active = get_option('wpvr_author_active');
505
- $fontawesome_disable = get_option('wpvr_fontawesome_disable');
506
- $mobile_media_resize = get_option('mobile_media_resize');
507
- $wpvr_script_control = get_option('wpvr_script_control');
508
- $wpvr_script_list = get_option('wpvr_script_list');
509
- $wpvr_video_script_control = get_option('wpvr_video_script_control');
510
- $wpvr_video_script_list = get_option('wpvr_video_script_list');
511
- $high_res_image = get_option('high_res_image');
512
- $dis_on_hover = get_option('dis_on_hover');
513
- $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
514
 
515
  ?>
516
  <li>
517
- <h6><?php echo __( "Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr" ); ?></h6>
518
  <span class="wpvr-switcher">
519
  <?php
520
- if ($editor_active == "true") {
521
- ?>
522
- <input id="wpvr_editor_active" type="checkbox" checked>
523
- <?php
524
- }
525
- else {
526
- ?>
527
- <input id="wpvr_editor_active" type="checkbox">
528
- <?php
529
- }
530
  ?>
531
  <label for="wpvr_editor_active"></label>
532
  </span>
533
 
534
  <span class="wpvr-tooltip">
535
  <span class="icon">
536
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
537
  </span>
538
- <p><?php echo __( 'Editors will be able to Create, Edit, Update, and Delete all virtual tours.', 'wpvr' ); ?></p>
539
  </span>
540
  </li>
541
 
542
  <li>
543
- <h6><?php echo __( "Allow the Authors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr" ); ?></h6>
544
 
545
  <span class="wpvr-switcher">
546
  <?php
547
- if ($author_active == "true") {
548
- ?>
549
- <input id="wpvr_author_active" type="checkbox" checked>
550
- <?php
551
- }
552
- else {
553
- ?>
554
- <input id="wpvr_author_active" type="checkbox">
555
- <?php
556
- }
557
  ?>
558
  <label for="wpvr_author_active"></label>
559
  </span>
560
 
561
  <span class="wpvr-tooltip">
562
  <span class="icon">
563
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
564
  </span>
565
- <p><?php echo __( 'Authors will be able to Create, Edit, Update, and Delete their own virtual tours only.', 'wpvr' ); ?></p>
566
  </span>
567
  </li>
568
 
569
  <li>
570
- <h6><?php echo __( "Disable Fontawesome from WP VR:", "wpvr" ); ?></h6>
571
 
572
  <span class="wpvr-switcher">
573
  <?php
574
- if ($fontawesome_disable == "true") {
575
- ?>
576
- <input id="wpvr_fontawesome_disable" type="checkbox" checked>
577
- <?php
578
- }
579
- else {
580
- ?>
581
- <input id="wpvr_fontawesome_disable" type="checkbox">
582
- <?php
583
- }
584
  ?>
585
  <label for="wpvr_fontawesome_disable"></label>
586
  </span>
587
 
588
  <span class="wpvr-tooltip">
589
  <span class="icon">
590
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
591
  </span>
592
- <p><?php echo __( 'WPVR will not load Font Awesome library.', 'wpvr' ); ?></p>
593
  </span>
594
  </li>
595
 
596
  <li>
597
- <h6><?php echo __( "Enable mobile media resizer:", "wpvr" ); ?></h6>
598
 
599
  <span class="wpvr-switcher">
600
  <?php
601
- if ($mobile_media_resize == "true") {
602
- ?>
603
- <input id="mobile_media_resize" type="checkbox" checked>
604
- <?php
605
- }
606
- else {
607
- ?>
608
- <input id="mobile_media_resize" type="checkbox">
609
- <?php
610
- }
611
  ?>
612
  <label for="mobile_media_resize"></label>
613
  </span>
614
 
615
  <span class="wpvr-tooltip">
616
  <span class="icon">
617
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
618
  </span>
619
- <p><?php echo __( 'WPVR will resize each scenes for mobile devices.', 'wpvr' ); ?></p>
620
  </span>
621
  </li>
622
 
623
  <li>
624
- <h6><?php echo __( "Disable WordPress Large Image Handler on WP VR:", "wpvr" ); ?></h6>
625
 
626
  <span class="wpvr-switcher">
627
  <?php
628
- if ($high_res_image == "true") {
629
- ?>
630
- <input id="high_res_image" type="checkbox" checked>
631
- <?php
632
- }
633
- else {
634
- ?>
635
- <input id="high_res_image" type="checkbox">
636
- <?php
637
- }
638
  ?>
639
  <label for="high_res_image"></label>
640
  </span>
641
 
642
  <span class="wpvr-tooltip">
643
  <span class="icon">
644
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
645
  </span>
646
- <p><?php echo __( "WordPress's default large image handler for images larger than 2560px will be disabled for WP VR. So can create virtual tours with extremely high-quality images. Enabling it will also show high res image on mobile devices. Many devices may not support that resolution.", 'wpvr' ); ?></p>
647
  </span>
648
  </li>
649
 
650
  <li>
651
- <h6><?php echo __( "Disable On Hover Content for Mobile:", "wpvr" ); ?></h6>
652
 
653
  <span class="wpvr-switcher">
654
  <?php
655
- if ($dis_on_hover == "true") {
656
- ?>
657
- <input id="dis_on_hover" type="checkbox" checked>
658
- <?php
659
- }
660
- else {
661
- ?>
662
- <input id="dis_on_hover" type="checkbox">
663
- <?php
664
- }
665
  ?>
666
  <label for="dis_on_hover"></label>
667
  </span>
668
 
669
  <span class="wpvr-tooltip">
670
  <span class="icon">
671
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
672
  </span>
673
- <p><?php echo __( "You can disable on hover content for mobile devices. As most of the devices are touch based.", 'wpvr' ); ?></p>
674
  </span>
675
  </li>
676
 
677
  <li>
678
 
679
- <h6><?php echo __( "Enable script control (It will load the WP VR scripts on the pages with virtual tours only):", "wpvr" ); ?></h6>
680
 
681
  <span class="wpvr-switcher">
682
  <?php
683
- if ($wpvr_script_control == "true") {
684
- ?>
685
- <input id="wpvr_script_control" type="checkbox" checked>
686
- <?php
687
- }
688
- else {
689
- ?>
690
- <input id="wpvr_script_control" type="checkbox">
691
- <?php
692
- }
693
  ?>
694
  <label for="wpvr_script_control"></label>
695
  </span>
696
 
697
  <span class="wpvr-tooltip">
698
  <span class="icon">
699
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
700
  </span>
701
- <p><?php echo __( "WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr' ); ?></p>
702
  </span>
703
  </li>
704
 
705
  <li class="enqueue-script wpvr_enqueue_script_list">
706
- <h6><?php echo __( 'List of allowed pages to load WP VR scripts (The URLs of the pages on your site with virtual tours):', 'wpvr' ); ?> </h6>
707
 
708
  <span class="wpvr-tooltip">
709
  <span class="icon">
710
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
711
  </span>
712
- <p><?php echo __( "List the pages with virtual tours like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr' ); ?></p>
713
  </span>
714
 
715
  <textarea id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/"><?php echo $wpvr_script_list; ?></textarea>
@@ -723,40 +729,39 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
723
 
724
  <li>
725
 
726
- <h6><?php echo __( "Enable Video JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr" ); ?></h6>
727
 
728
  <span class="wpvr-switcher">
729
  <?php
730
- if ($wpvr_video_script_control == "true") {
731
- ?>
732
- <input id="wpvr_video_script_control" type="checkbox" checked>
733
- <?php
734
- }
735
- else {
736
- ?>
737
- <input id="wpvr_video_script_control" type="checkbox">
738
- <?php
739
- }
740
  ?>
741
  <label for="wpvr_video_script_control"></label>
742
  </span>
743
 
744
  <span class="wpvr-tooltip">
745
  <span class="icon">
746
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
747
  </span>
748
- <p><?php echo __( "WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr' ); ?></p>
749
  </span>
750
  </li>
751
 
752
  <li class="enqueue-video-script wpvr_enqueue_video_script_list">
753
- <h6><?php echo __( 'List of allowed pages to load WP VR Video JS library (The URLs of the pages on your site, You want to load Video JS):', 'wpvr' ); ?> </h6>
754
 
755
  <span class="wpvr-tooltip">
756
  <span class="icon">
757
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
758
  </span>
759
- <p><?php echo __( "List the pages like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr' ); ?></p>
760
  </span>
761
 
762
  <textarea id="wpvr_video_script_list" class="materialize-textarea" placeholder="https://example.com/video-tour1/,https://example.com/video-tour2/"><?php echo $wpvr_video_script_list; ?></textarea>
@@ -771,37 +776,36 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
771
  <!-- WPVR front-end notice -->
772
  <li class="enqueue-script front-notice">
773
  <?php
774
- $wpvr_frontend_notice = false;
775
- $wpvr_frontend_notice_area = '';
776
- $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
777
- $wpvr_frontend_notice_area = get_option('wpvr_frontend_notice_area');
778
- if( ! $wpvr_frontend_notice_area ){
779
- $wpvr_frontend_notice_area = __( "Flip the phone to landscape mode for a better experience of the tour.", "wpvr" );
780
- }
781
  ?>
782
- <h6><?php echo __( "Front-End Notice for Mobile Visitors:", "wpvr" ); ?></h6>
783
 
784
  <span class="wpvr-switcher">
785
  <?php
786
- if ($wpvr_frontend_notice == "true") {
787
- ?>
788
- <input id="wpvr_frontend_notice" type="checkbox" checked>
789
- <?php
790
- }
791
- else {
792
- ?>
793
- <input id="wpvr_frontend_notice" type="checkbox">
794
- <?php
795
- }
796
  ?>
797
  <label for="wpvr_frontend_notice"></label>
798
  </span>
799
 
800
  <span class="wpvr-tooltip">
801
  <span class="icon">
802
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
803
  </span>
804
- <p><?php echo __( "The notice will appear on the front end of the virtual tour if viewed from a mobile device.", 'wpvr' ); ?></p>
805
  </span>
806
  <textarea id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here"><?php echo $wpvr_frontend_notice_area; ?></textarea>
807
  </li>
@@ -809,18 +813,18 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
809
 
810
  <li>
811
  <form class="wpvr-version">
812
- <h6><?php _e('Select a Version to Rollback','wpvr'); ?></h6>
813
  <select name="wpvr_version">
814
- <option value="7.3.4">7.3.4</option>
815
- <option value="7.3.3">7.3.3</option>
816
- <option value="7.3.2">7.3.2</option>
817
- <option value="7.3.1">7.3.1</option>
818
- <option value="7.3.0">7.3.0</option>
819
- <option value="7.2.9">7.2.9</option>
820
- <option value="7.2.8">7.2.8</option>
821
- <option value="7.2.7">7.2.7</option>
822
- <option value="7.2.6">7.2.6</option>
823
- <option value="7.2.5">7.2.5</option>
824
  </select>
825
  <input class="wpvr-btn" type="submit" value="Rollback">
826
  </form>
@@ -833,13 +837,13 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
833
  </div>
834
  </div>
835
 
836
- <button class="btn wpvr-btn" type="submit" id="wpvr_role_submit" ><?php echo __( 'Save', 'wpvr' ); ?></button>
837
  </div>
838
 
839
- <?php if( !is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) { ?>
840
  <div class="upgrade-pro">
841
- <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png'?>" alt="logo">
842
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ','wpvr'); ?></a>
843
  </div>
844
  <?php } ?>
845
 
@@ -848,4 +852,4 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
848
  </div>
849
 
850
  </div>
851
- <?php include('wpvr_confirmation_alert.php');?>
1
  <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
  /**
4
  * Provide a admin area view for the plugin
5
  *
18
  <ul class="tabs tabs-icon rex-tabs">
19
  <li class="tab col s3 wpvr_tabs_row">
20
  <a href="#tab1">
21
+ <svg height="20px" width="20px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330 330" xml:space="preserve">
 
22
  <path d="M165,0C74.019,0,0,74.02,0,165.001C0,255.982,74.019,330,165,330s165-74.018,165-164.999C330,74.02,255.981,0,165,0z
23
+ M165,300c-74.44,0-135-60.56-135-134.999C30,90.562,90.56,30,165,30s135,60.562,135,135.001C300,239.44,239.439,300,165,300z" />
24
  <path d="M164.998,70c-11.026,0-19.996,8.976-19.996,20.009c0,11.023,8.97,19.991,19.996,19.991
25
+ c11.026,0,19.996-8.968,19.996-19.991C184.994,78.976,176.024,70,164.998,70z" />
26
  <path d="M165,140c-8.284,0-15,6.716-15,15v90c0,8.284,6.716,15,15,15c8.284,0,15-6.716,15-15v-90C180,146.716,173.284,140,165,140z
27
+ " />
28
  </svg>
29
 
30
+ <?php _e('Info', 'wpvr'); ?>
31
  </a>
32
  </li>
33
 
34
  <li class="tab col s3 wpvr_tabs_row">
35
  <a href="#tab2">
36
+ <svg id="Capa_1" enable-background="new 0 0 512 512" height="14" width="18" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
37
+ <g>
38
+ <path d="m338.95 243.28-120-75c-4.625-2.89-10.453-3.043-15.222-.4-4.77 2.643-7.729 7.667-7.729 13.12v150c0 5.453 2.959 10.476 7.729 13.12 2.266 1.256 4.77 1.88 7.271 1.88 2.763 0 5.522-.763 7.95-2.28l120-75c4.386-2.741 7.05-7.548 7.05-12.72s-2.663-9.979-7.049-12.72zm-112.95 60.656v-95.873l76.698 47.937z" />
39
+ <path d="m437 61h-362c-41.355 0-75 33.645-75 75v240c0 41.355 33.645 75 75 75h362c41.355 0 75-33.645 75-75v-240c0-41.355-33.645-75-75-75zm45 315c0 24.813-20.187 45-45 45h-362c-24.813 0-45-20.187-45-45v-240c0-24.813 20.187-45 45-45h362c24.813 0 45 20.187 45 45z" />
40
+ </g>
41
+ </svg>
42
+ <?php _e('Video Tutorials', 'wpvr'); ?>
43
  </a>
44
  </li>
45
 
46
  <?php
47
+ if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) {
48
+ ?>
49
  <li class="tab col s3 wpvr_tabs_row">
50
  <a href="#tab3">
51
+ <svg height="16px" viewBox="0 -10 511.98685 511" width="17px" xmlns="http://www.w3.org/2000/svg">
52
+ <path d="m114.59375 491.140625c-5.609375 0-11.179688-1.75-15.933594-5.1875-8.855468-6.417969-12.992187-17.449219-10.582031-28.09375l32.9375-145.089844-111.703125-97.960937c-8.210938-7.167969-11.347656-18.519532-7.976562-28.90625 3.371093-10.367188 12.542968-17.707032 23.402343-18.710938l147.796875-13.417968 58.433594-136.746094c4.308594-10.046875 14.121094-16.535156 25.023438-16.535156 10.902343 0 20.714843 6.488281 25.023437 16.511718l58.433594 136.769532 147.773437 13.417968c10.882813.980469 20.054688 8.34375 23.425782 18.710938 3.371093 10.367187.253906 21.738281-7.957032 28.90625l-111.703125 97.941406 32.9375 145.085938c2.414063 10.667968-1.726562 21.699218-10.578125 28.097656-8.832031 6.398437-20.609375 6.890625-29.910156 1.300781l-127.445312-76.160156-127.445313 76.203125c-4.308594 2.558594-9.109375 3.863281-13.953125 3.863281zm141.398438-112.875c4.84375 0 9.640624 1.300781 13.953124 3.859375l120.277344 71.9375-31.085937-136.941406c-2.21875-9.746094 1.089843-19.921875 8.621093-26.515625l105.472657-92.5-139.542969-12.671875c-10.046875-.917969-18.6875-7.234375-22.613281-16.492188l-55.082031-129.046875-55.148438 129.066407c-3.882812 9.195312-12.523438 15.511718-22.546875 16.429687l-139.5625 12.671875 105.46875 92.5c7.554687 6.613281 10.859375 16.769531 8.621094 26.539062l-31.0625 136.9375 120.277343-71.914062c4.308594-2.558594 9.109376-3.859375 13.953126-3.859375zm-84.585938-221.847656s0 .023437-.023438.042969zm169.128906-.0625.023438.042969c0-.023438 0-.023438-.023438-.042969zm0 0" />
53
+ </svg>
54
+ <?php _e('Free vs Pro', 'wpvr'); ?>
55
  </a>
56
  </li>
57
+ <?php
58
  }
59
  ?>
60
  <?php
61
+ if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
62
+ ?>
63
+ <li class="tab col s3 wpvr_tabs_row">
64
+ <a href="#tab4">
65
+ <svg id="bold" enable-background="new 0 0 24 24" height="512" viewBox="0 0 24 24" width="512" xmlns="http://www.w3.org/2000/svg">
66
+ <path d="m12 6c-3.309 0-6 2.691-6 6s2.691 6 6 6 6-2.691 6-6-2.691-6-6-6zm3 7h-2v2c0 .552-.448 1-1 1s-1-.448-1-1v-2h-2c-.552 0-1-.448-1-1s.448-1 1-1h2v-2c0-.552.448-1 1-1s1 .448 1 1v2h2c.552 0 1 .448 1 1s-.448 1-1 1z" />
67
+ <path d="m1.5 12c0-5.789 4.71-10.5 10.5-10.5 2.079 0 4.055.607 5.732 1.707l-1.512 1.513c-.472.47-.139 1.28.53 1.28h4.5c.414 0 .75-.336.75-.75v-4.5c0-.665-.806-1.004-1.28-.53l-1.914 1.914c-1.971-1.369-4.322-2.134-6.806-2.134-6.617 0-12 5.383-12 12 0 1.173.173 2.339.513 3.466.119.395.534.621.935.502.396-.12.621-.538.501-.935-.298-.987-.449-2.007-.449-3.033z" />
68
+ <path d="m23.487 8.534c-.12-.397-.535-.623-.935-.502-.396.12-.621.538-.501.935.298.987.449 2.007.449 3.033 0 5.789-4.71 10.5-10.5 10.5-2.075 0-4.048-.604-5.722-1.7l1.505-1.522c.468-.474.132-1.278-.533-1.278h-4.5c-.2 0-.393.08-.533.223s-.219.335-.217.535l.05 4.5c.006.666.819.99 1.283.519l1.878-1.899c1.967 1.362 4.312 2.122 6.789 2.122 6.617 0 12-5.383 12-12 0-1.173-.173-2.339-.513-3.466z" />
69
+ </svg>
70
+ <?php _e('Import', 'wpvr'); ?>
71
+ </a>
72
+ </li>
73
+ <?php
74
  }
75
  ?>
76
 
77
  <li class="tab col s3 wpvr_tabs_row">
78
  <a href="#tab5">
79
+ <svg id="Layer_1" enable-background="new 0 0 512 512" height="17px" viewBox="0 0 512 512" width="17px" xmlns="http://www.w3.org/2000/svg">
80
+ <path d="m272.066 512h-32.133c-25.989 0-47.134-21.144-47.134-47.133v-10.871c-11.049-3.53-21.784-7.986-32.097-13.323l-7.704 7.704c-18.659 18.682-48.548 18.134-66.665-.007l-22.711-22.71c-18.149-18.129-18.671-48.008.006-66.665l7.698-7.698c-5.337-10.313-9.792-21.046-13.323-32.097h-10.87c-25.988 0-47.133-21.144-47.133-47.133v-32.134c0-25.989 21.145-47.133 47.134-47.133h10.87c3.531-11.05 7.986-21.784 13.323-32.097l-7.704-7.703c-18.666-18.646-18.151-48.528.006-66.665l22.713-22.712c18.159-18.184 48.041-18.638 66.664.006l7.697 7.697c10.313-5.336 21.048-9.792 32.097-13.323v-10.87c0-25.989 21.144-47.133 47.134-47.133h32.133c25.989 0 47.133 21.144 47.133 47.133v10.871c11.049 3.53 21.784 7.986 32.097 13.323l7.704-7.704c18.659-18.682 48.548-18.134 66.665.007l22.711 22.71c18.149 18.129 18.671 48.008-.006 66.665l-7.698 7.698c5.337 10.313 9.792 21.046 13.323 32.097h10.87c25.989 0 47.134 21.144 47.134 47.133v32.134c0 25.989-21.145 47.133-47.134 47.133h-10.87c-3.531 11.05-7.986 21.784-13.323 32.097l7.704 7.704c18.666 18.646 18.151 48.528-.006 66.665l-22.713 22.712c-18.159 18.184-48.041 18.638-66.664-.006l-7.697-7.697c-10.313 5.336-21.048 9.792-32.097 13.323v10.871c0 25.987-21.144 47.131-47.134 47.131zm-106.349-102.83c14.327 8.473 29.747 14.874 45.831 19.025 6.624 1.709 11.252 7.683 11.252 14.524v22.148c0 9.447 7.687 17.133 17.134 17.133h32.133c9.447 0 17.134-7.686 17.134-17.133v-22.148c0-6.841 4.628-12.815 11.252-14.524 16.084-4.151 31.504-10.552 45.831-19.025 5.895-3.486 13.4-2.538 18.243 2.305l15.688 15.689c6.764 6.772 17.626 6.615 24.224.007l22.727-22.726c6.582-6.574 6.802-17.438.006-24.225l-15.695-15.695c-4.842-4.842-5.79-12.348-2.305-18.242 8.473-14.326 14.873-29.746 19.024-45.831 1.71-6.624 7.684-11.251 14.524-11.251h22.147c9.447 0 17.134-7.686 17.134-17.133v-32.134c0-9.447-7.687-17.133-17.134-17.133h-22.147c-6.841 0-12.814-4.628-14.524-11.251-4.151-16.085-10.552-31.505-19.024-45.831-3.485-5.894-2.537-13.4 2.305-18.242l15.689-15.689c6.782-6.774 6.605-17.634.006-24.225l-22.725-22.725c-6.587-6.596-17.451-6.789-24.225-.006l-15.694 15.695c-4.842 4.843-12.35 5.791-18.243 2.305-14.327-8.473-29.747-14.874-45.831-19.025-6.624-1.709-11.252-7.683-11.252-14.524v-22.15c0-9.447-7.687-17.133-17.134-17.133h-32.133c-9.447 0-17.134 7.686-17.134 17.133v22.148c0 6.841-4.628 12.815-11.252 14.524-16.084 4.151-31.504 10.552-45.831 19.025-5.896 3.485-13.401 2.537-18.243-2.305l-15.688-15.689c-6.764-6.772-17.627-6.615-24.224-.007l-22.727 22.726c-6.582 6.574-6.802 17.437-.006 24.225l15.695 15.695c4.842 4.842 5.79 12.348 2.305 18.242-8.473 14.326-14.873 29.746-19.024 45.831-1.71 6.624-7.684 11.251-14.524 11.251h-22.148c-9.447.001-17.134 7.687-17.134 17.134v32.134c0 9.447 7.687 17.133 17.134 17.133h22.147c6.841 0 12.814 4.628 14.524 11.251 4.151 16.085 10.552 31.505 19.024 45.831 3.485 5.894 2.537 13.4-2.305 18.242l-15.689 15.689c-6.782 6.774-6.605 17.634-.006 24.225l22.725 22.725c6.587 6.596 17.451 6.789 24.225.006l15.694-15.695c3.568-3.567 10.991-6.594 18.244-2.304z" />
81
+ <path d="m256 367.4c-61.427 0-111.4-49.974-111.4-111.4s49.973-111.4 111.4-111.4 111.4 49.974 111.4 111.4-49.973 111.4-111.4 111.4zm0-192.8c-44.885 0-81.4 36.516-81.4 81.4s36.516 81.4 81.4 81.4 81.4-36.516 81.4-81.4-36.515-81.4-81.4-81.4z" />
82
+ </svg>
83
+ <?php _e('Settings', 'wpvr'); ?>
84
  </a>
85
  </li>
86
  </ul>
88
  <div id="tab1" class="block-wrapper info-tab">
89
  <div class="info-wrapper">
90
  <div class="single-block banner">
91
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-banner.jpg' ?>" alt="wpvr-banner">
92
  </div>
93
 
94
  <div class="single-block share-block">
95
  <div class="upgrade-pro">
96
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
97
+ <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
98
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
99
  <?php } ?>
100
  </div>
101
 
102
  <div class="social-share">
103
 
104
+ <h4><?php _e('Share On', 'wpvr'); ?></h4>
105
  <ul>
106
  <li>
107
  <a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//wordpress.org/plugins/wpvr/" title="Facebook" target="_blank">
108
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/fb-regular.jpg' ?>" alt="Facebook" class="regular">
109
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/fb-hover.jpg' ?>" alt="Facebook" class="hover">
110
  </a>
111
  </li>
112
  <li>
113
+ <a href="https://twitter.com/home?status=https%3A//wordpress.org/plugins/wpvr/" title="Twitter" target="_blank">
114
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/tw-regular.jpg' ?>" alt="Twitter" class="regular">
115
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/tw-hover.jpg' ?>" alt="Twitter" class="hover">
116
  </a>
117
  </li>
118
  <li>
119
+ <a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//wordpress.org/plugins/wpvr/&title=&summary=&source=" title="Linkedin" target="_blank">
120
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/in-regular.jpg' ?>" alt="Linked in" class="regular">
121
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/in-hover.jpg' ?>" alt="Linked in" class="hover">
122
  </a>
123
  </li>
124
  </ul>
127
 
128
  <div class="single-block doc">
129
  <span class="icon">
130
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/doc-icon.png' ?>" class="doc-icon" alt="doc-icon">
131
  </span>
132
+ <h4><?php _e('Documentation', 'wpvr'); ?></h4>
133
+ <p><?php _e('Before You start, you can check our Documentation to get familiar with WP VR - 360 Panorama and virtual tour creator for WordPress.', 'wpvr'); ?></p>
134
 
135
+ <a class="wpvr-btn" href="https://rextheme.com/docs/wp-vr/" target="_blank"><?php _e('Documentation', 'wpvr'); ?></a>
136
  </div>
137
 
138
  <div class="single-block support">
139
  <span class="icon">
140
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/support-icon.png' ?>" class="support-icon" alt="support-icon">
141
  </span>
142
+ <h4><?php _e('Support', 'wpvr'); ?></h4>
143
+ <p><?php _e('Can\'t find solution on with our documentation? Just Post a ticket on Support forum. We are to solve your issue.', 'wpvr'); ?></p>
144
 
145
+ <a class="wpvr-btn" href="https://wordpress.org/support/plugin/wpvr" target="_blank"><?php _e('Post a Ticket', 'wpvr'); ?></a>
146
  </div>
147
 
148
  <div class="single-block rating">
149
  <span class="icon">
150
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/rating-icon.png' ?>" class="rating-icon" alt="rating-icon">
151
  </span>
152
+ <h4><?php _e('Make WPVR Popular', 'wpvr'); ?></h4>
153
+ <p><?php _e('Your rating and feedback matters to us. If you are happy with WP VR - 360 Panorama and virtual tour creator for WordPress give us a rating.', 'wpvr'); ?> </p>
154
 
155
+ <a class="wpvr-btn" href="https://wordpress.org/plugins/wpvr/#reviews" target="_blank"><?php _e('Rate Us ', 'wpvr'); ?></a>
156
  </div>
157
 
158
  </div>
159
 
160
  <div class="promotion-area">
161
+ <h4 class="title"><?php _e('Check out our other amazing free plugins!', 'wpvr'); ?></h4>
162
  <div class="single-block m2c">
163
  <span class="icon">
164
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/m2c.png' ?>" alt="icon">
165
  </span>
166
+ <h4><?php _e('Media Storage to Cloud', 'wpvr'); ?></h4>
167
+ <p><?php _e('Enhance your website performance by serving website media and content through your trusted cloud portal.', 'wpvr'); ?></p>
168
 
169
+ <a class="wpvr-btn" href="https://wordpress.org/plugins/wp-media-storage-to-cloud/" target="_blank"><?php _e('Get It Now', 'wpvr'); ?></a>
170
  </div>
171
 
172
  <div class="single-block sb">
173
  <span class="icon">
174
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/social-booster.png' ?>" alt="icon">
175
  </span>
176
+ <h4><?php _e('Social Booster', 'wpvr'); ?></h4>
177
+ <p><?php _e('Automate social sharing of your posts & pages — instantly share or schedule your posts for social share without leaving your website.', 'wpvr'); ?></p>
178
 
179
+ <a class="wpvr-btn" href="https://wordpress.org/plugins/social-booster/" target="_blank"><?php _e('Get It Now', 'wpvr'); ?></a>
180
  </div>
181
  </div>
182
 
191
  <div class="video-right">
192
  <div class="single-block share-block">
193
  <div class="upgrade-pro">
194
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
195
+ <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
196
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
197
  <?php } ?>
198
  </div>
199
  </div>
202
  </div>
203
  </div>
204
  <?php
205
+ if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) {
206
+ ?>
207
  <div id="tab3" class="block-wrapper">
208
  <div class="wpvr-compare">
209
  <div class="compare-header">
210
+ <h4><?php _e('WPVR Feature Comparison', 'wpvr'); ?></h4>
211
+ <?php $pro_url = add_query_arg('wpvr-dashboard', '1', 'https://rextheme.com/wpvr/?wpvr-dashboard=1'); ?>
212
+ <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro', 'wpvr'); ?></a>
213
  </div>
214
 
215
  <div class="compare-tbl-wrapper">
216
  <ul class="single-feature list-header">
217
+ <li class="feature"><?php _e('features', 'wpvr'); ?></li>
218
+ <li class="free"><?php _e('free', 'wpvr'); ?></li>
219
+ <li class="pro"><?php _e('pro', 'wpvr'); ?></li>
220
  </ul>
221
 
222
  <ul class="single-feature feature-list">
223
+ <li class="feature"><?php _e('Unlimited Scenes and Hotspots (Free version limited to 5 Scenes & 5 Hotspots)', 'wpvr'); ?></li>
224
  <li class="free">
225
  <span class="icon no">
226
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
227
  </span>
228
  </li>
229
  <li class="pro">
230
  <span class="icon yes">
231
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
232
  </span>
233
  </li>
234
  </ul>
235
 
236
  <ul class="single-feature feature-list">
237
+ <li class="feature"><?php _e('Tour Autoload & Auto Rotation Control', 'wpvr'); ?></li>
238
  <li class="free">
239
  <span class="icon yes">
240
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
241
  </span>
242
  </li>
243
  <li class="pro">
244
  <span class="icon yes">
245
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
246
  </span>
247
  </li>
248
  </ul>
249
 
250
  <ul class="single-feature feature-list">
251
+ <li class="feature"><?php _e('Scene type hotspot to connect scenes', 'wpvr'); ?></li>
252
  <li class="free">
253
  <span class="icon yes">
254
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
255
  </span>
256
  </li>
257
  <li class="pro">
258
  <span class="icon yes">
259
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
260
  </span>
261
  </li>
262
  </ul>
263
 
264
  <ul class="single-feature feature-list">
265
+ <li class="feature"><?php _e('Info type hotspots to give information, on-click or hover', 'wpvr'); ?></li>
266
  <li class="free">
267
  <span class="icon yes">
268
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
269
  </span>
270
  </li>
271
  <li class="pro">
272
  <span class="icon yes">
273
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
274
  </span>
275
  </li>
276
  </ul>
277
 
278
  <ul class="single-feature feature-list">
279
+ <li class="feature"><?php _e('Hotspot customization with custom CSS', 'wpvr'); ?></li>
280
  <li class="free">
281
  <span class="icon yes">
282
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
283
  </span>
284
  </li>
285
  <li class="pro">
286
  <span class="icon yes">
287
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
288
  </span>
289
  </li>
290
  </ul>
291
 
292
  <ul class="single-feature feature-list">
293
+ <li class="feature"><?php _e('Full width tour tag', 'wpvr'); ?></li>
294
  <li class="free">
295
  <span class="icon yes">
296
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
297
  </span>
298
  </li>
299
  <li class="pro">
300
  <span class="icon yes">
301
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
302
  </span>
303
  </li>
304
  </ul>
305
 
306
  <ul class="single-feature feature-list">
307
+ <li class="feature"><?php _e('360 Video Support', 'wpvr'); ?></li>
308
  <li class="free">
309
  <span class="icon yes">
310
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
311
  </span>
312
  </li>
313
  <li class="pro">
314
  <span class="icon yes">
315
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
316
  </span>
317
  </li>
318
  </ul>
319
 
320
  <ul class="single-feature feature-list">
321
+ <li class="feature"><?php _e('Google Street View', 'wpvr'); ?></li>
322
  <li class="free">
323
  <span class="icon no">
324
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
325
  </span>
326
  </li>
327
  <li class="pro">
328
  <span class="icon yes">
329
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
330
  </span>
331
  </li>
332
  </ul>
333
 
334
  <ul class="single-feature feature-list">
335
+ <li class="feature"><?php _e('Partial/Flat or 180 deg panorama support', 'wpvr'); ?></li>
336
  <li class="free">
337
  <span class="icon no">
338
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
339
  </span>
340
  </li>
341
  <li class="pro">
342
  <span class="icon yes">
343
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
344
  </span>
345
  </li>
346
  </ul>
347
 
348
  <ul class="single-feature feature-list">
349
+ <li class="feature"><?php _e('Custom scene gallery', 'wpvr'); ?></li>
350
  <li class="free">
351
  <span class="icon no">
352
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
353
  </span>
354
  </li>
355
  <li class="pro">
356
  <span class="icon yes">
357
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
358
  </span>
359
  </li>
360
  </ul>
361
 
362
  <ul class="single-feature feature-list">
363
+ <li class="feature"><?php _e('Custom panorama controls', 'wpvr'); ?></li>
364
  <li class="free">
365
  <span class="icon no">
366
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
367
  </span>
368
  </li>
369
  <li class="pro">
370
  <span class="icon yes">
371
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
372
  </span>
373
  </li>
374
  </ul>
375
 
376
  <ul class="single-feature feature-list">
377
+ <li class="feature"><?php _e('Custom Hotspot Icons', 'wpvr'); ?></li>
378
  <li class="free">
379
  <span class="icon no">
380
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
381
  </span>
382
  </li>
383
  <li class="pro">
384
  <span class="icon yes">
385
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
386
  </span>
387
  </li>
388
  </ul>
389
 
390
  <ul class="single-feature feature-list">
391
+ <li class="feature"><?php _e('Color picker for custom hotspot', 'wpvr'); ?></li>
392
  <li class="free">
393
  <span class="icon no">
394
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
395
  </span>
396
  </li>
397
  <li class="pro">
398
  <span class="icon yes">
399
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
400
  </span>
401
  </li>
402
  </ul>
403
 
404
  <ul class="single-feature feature-list">
405
+ <li class="feature"><?php _e('Zoom Range & Limit Control', 'wpvr'); ?></li>
406
  <li class="free">
407
  <span class="icon no">
408
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cross.png' ?>" alt="cross">
409
  </span>
410
  </li>
411
  <li class="pro">
412
  <span class="icon yes">
413
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
414
  </span>
415
  </li>
416
  </ul>
419
  <!-- /compare-tbl-wrapper -->
420
 
421
  <div class="wpvr-more-feature">
422
+ <h5 class="heading"><?php _e('More Pro Features', 'wpvr'); ?></h5>
423
  <ul>
424
  <li>
425
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
426
+ <?php _e('Keyboard Control', 'wpvr'); ?>
427
  </li>
428
  <li>
429
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
430
+ <?php _e('Mouse Scroll Control', 'wpvr'); ?>
431
  </li>
432
  <li>
433
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
434
+ <?php _e('Control Customization', 'wpvr'); ?>
435
  </li>
436
  <li>
437
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
438
+ <?php _e('On Screen Compass', 'wpvr'); ?>
439
  </li>
440
  <li>
441
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
442
+ <?php _e('Scene Boundary Control', 'wpvr'); ?>
443
  </li>
444
  <li>
445
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
446
+ <?php _e('Add scene title and description tag', 'wpvr'); ?>
447
  </li>
448
  <li>
449
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
450
+ <?php _e('File export and import (for WPVR only)', 'wpvr'); ?>
451
  </li>
452
  <li>
453
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
454
+ <?php _e('Duplicate tour with one click', 'wpvr'); ?>
455
  </li>
456
  <li>
457
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
458
+ <?php _e('Gallery content scene title', 'wpvr'); ?>
459
  </li>
460
  <li>
461
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
462
+ <?php _e('Home Button to take to Default Scene', 'wpvr'); ?>
463
  </li>
464
  <li>
465
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/check.png' ?>" alt="check">
466
+ <?php _e('Company Logo & Description (Modal)', 'wpvr'); ?>
467
  </li>
468
  </ul>
469
  </div>
470
 
471
 
472
  <div class="footer-btn">
473
+ <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro', 'wpvr'); ?></a>
474
  </div>
475
  </div>
476
  </div>
477
+ <?php
478
  }
479
  ?>
480
 
481
  <?php
482
+ if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
483
+ ?>
484
  <div id="tab4" class="block-wrapper import-tab">
485
  <div class="import-tab-wrapper">
486
+ <h4 class="tab-title"><?php _e('Import tour file: ', 'wpvr'); ?></h4>
487
  <div class="parent" style="width:100%;">
488
  <form id="wpvr_import_from">
489
  <a class="btn-floating btn-large waves-effect waves-light red" id="wpvr_button_upload"><i class="material-icons">add</i></a>
490
+ <p class="vr-notice"><?php _e('Do not close or refresh the page during import process. It may take few minutes.', 'wpvr'); ?></p>
491
+ <div class="file-path-wrapper">
492
+ <input class="file-path validate" id="wpvr_file_url" type="text" value="" data-value="">
493
+ </div>
494
+ <div id="wpvr_progress" class="progress" style="display:none;">
495
+ <div class="indeterminate"></div>
496
+ </div>
497
+ <button class="wpvr-btn" type="submit" id="wpvr_button_submit">Submit</button>
498
+ </form>
499
  </div>
500
  </div>
501
  </div>
502
+ <?php
503
  }
504
  ?>
505
 
506
  <div id="tab5" class="block-wrapper">
507
+ <div class="rex-upgrade wpvr-settings <?php echo is_plugin_active('wpvr-pro/wpvr-pro.php') ? 'pro-active' : ''; ?>">
508
+ <h4><?php _e('General Setup Options', 'wpvr'); ?></h4>
509
  <div class="parent settings-wrapper">
510
  <div class="wpvr_role-container">
511
  <ul>
512
  <?php
513
+ $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
514
+ $is_integration_module = apply_filters('is_integration_module', false);
515
+
516
+ $editor_active = get_option('wpvr_editor_active');
517
+ $author_active = get_option('wpvr_author_active');
518
+ $fontawesome_disable = get_option('wpvr_fontawesome_disable');
519
+ $mobile_media_resize = get_option('mobile_media_resize');
520
+ $wpvr_script_control = get_option('wpvr_script_control');
521
+ $wpvr_script_list = get_option('wpvr_script_list');
522
+ $wpvr_video_script_control = get_option('wpvr_video_script_control');
523
+ $wpvr_video_script_list = get_option('wpvr_video_script_list');
524
+ $high_res_image = get_option('high_res_image');
525
+ $dis_on_hover = get_option('dis_on_hover');
526
+ $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
527
 
528
  ?>
529
  <li>
530
+ <h6><?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?></h6>
531
  <span class="wpvr-switcher">
532
  <?php
533
+ if ($editor_active == "true") {
534
+ ?>
535
+ <input id="wpvr_editor_active" type="checkbox" checked>
536
+ <?php
537
+ } else {
538
+ ?>
539
+ <input id="wpvr_editor_active" type="checkbox">
540
+ <?php
541
+ }
 
542
  ?>
543
  <label for="wpvr_editor_active"></label>
544
  </span>
545
 
546
  <span class="wpvr-tooltip">
547
  <span class="icon">
548
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
549
  </span>
550
+ <p><?php echo __('Editors will be able to Create, Edit, Update, and Delete all virtual tours.', 'wpvr'); ?></p>
551
  </span>
552
  </li>
553
 
554
  <li>
555
+ <h6><?php echo __("Allow the Authors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?></h6>
556
 
557
  <span class="wpvr-switcher">
558
  <?php
559
+ if ($author_active == "true") {
560
+ ?>
561
+ <input id="wpvr_author_active" type="checkbox" checked>
562
+ <?php
563
+ } else {
564
+ ?>
565
+ <input id="wpvr_author_active" type="checkbox">
566
+ <?php
567
+ }
 
568
  ?>
569
  <label for="wpvr_author_active"></label>
570
  </span>
571
 
572
  <span class="wpvr-tooltip">
573
  <span class="icon">
574
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
575
  </span>
576
+ <p><?php echo __('Authors will be able to Create, Edit, Update, and Delete their own virtual tours only.', 'wpvr'); ?></p>
577
  </span>
578
  </li>
579
 
580
  <li>
581
+ <h6><?php echo __("Disable Fontawesome from WP VR:", "wpvr"); ?></h6>
582
 
583
  <span class="wpvr-switcher">
584
  <?php
585
+ if ($fontawesome_disable == "true") {
586
+ ?>
587
+ <input id="wpvr_fontawesome_disable" type="checkbox" checked>
588
+ <?php
589
+ } else {
590
+ ?>
591
+ <input id="wpvr_fontawesome_disable" type="checkbox">
592
+ <?php
593
+ }
 
594
  ?>
595
  <label for="wpvr_fontawesome_disable"></label>
596
  </span>
597
 
598
  <span class="wpvr-tooltip">
599
  <span class="icon">
600
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
601
  </span>
602
+ <p><?php echo __('WPVR will not load Font Awesome library.', 'wpvr'); ?></p>
603
  </span>
604
  </li>
605
 
606
  <li>
607
+ <h6><?php echo __("Enable mobile media resizer:", "wpvr"); ?></h6>
608
 
609
  <span class="wpvr-switcher">
610
  <?php
611
+ if ($mobile_media_resize == "true") {
612
+ ?>
613
+ <input id="mobile_media_resize" type="checkbox" checked>
614
+ <?php
615
+ } else {
616
+ ?>
617
+ <input id="mobile_media_resize" type="checkbox">
618
+ <?php
619
+ }
 
620
  ?>
621
  <label for="mobile_media_resize"></label>
622
  </span>
623
 
624
  <span class="wpvr-tooltip">
625
  <span class="icon">
626
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
627
  </span>
628
+ <p><?php echo __('WPVR will resize each scenes for mobile devices.', 'wpvr'); ?></p>
629
  </span>
630
  </li>
631
 
632
  <li>
633
+ <h6><?php echo __("Disable WordPress Large Image Handler on WP VR:", "wpvr"); ?></h6>
634
 
635
  <span class="wpvr-switcher">
636
  <?php
637
+ if ($high_res_image == "true") {
638
+ ?>
639
+ <input id="high_res_image" type="checkbox" checked>
640
+ <?php
641
+ } else {
642
+ ?>
643
+ <input id="high_res_image" type="checkbox">
644
+ <?php
645
+ }
 
646
  ?>
647
  <label for="high_res_image"></label>
648
  </span>
649
 
650
  <span class="wpvr-tooltip">
651
  <span class="icon">
652
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
653
  </span>
654
+ <p><?php echo __("WordPress's default large image handler for images larger than 2560px will be disabled for WP VR. So can create virtual tours with extremely high-quality images. Enabling it will also show high res image on mobile devices. Many devices may not support that resolution.", 'wpvr'); ?></p>
655
  </span>
656
  </li>
657
 
658
  <li>
659
+ <h6><?php echo __("Disable On Hover Content for Mobile:", "wpvr"); ?></h6>
660
 
661
  <span class="wpvr-switcher">
662
  <?php
663
+ if ($dis_on_hover == "true") {
664
+ ?>
665
+ <input id="dis_on_hover" type="checkbox" checked>
666
+ <?php
667
+ } else {
668
+ ?>
669
+ <input id="dis_on_hover" type="checkbox">
670
+ <?php
671
+ }
 
672
  ?>
673
  <label for="dis_on_hover"></label>
674
  </span>
675
 
676
  <span class="wpvr-tooltip">
677
  <span class="icon">
678
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
679
  </span>
680
+ <p><?php echo __("You can disable on hover content for mobile devices. As most of the devices are touch based.", 'wpvr'); ?></p>
681
  </span>
682
  </li>
683
 
684
  <li>
685
 
686
+ <h6><?php echo __("Enable script control (It will load the WP VR scripts on the pages with virtual tours only):", "wpvr"); ?></h6>
687
 
688
  <span class="wpvr-switcher">
689
  <?php
690
+ if ($wpvr_script_control == "true") {
691
+ ?>
692
+ <input id="wpvr_script_control" type="checkbox" checked>
693
+ <?php
694
+ } else {
695
+ ?>
696
+ <input id="wpvr_script_control" type="checkbox">
697
+ <?php
698
+ }
 
699
  ?>
700
  <label for="wpvr_script_control"></label>
701
  </span>
702
 
703
  <span class="wpvr-tooltip">
704
  <span class="icon">
705
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
706
  </span>
707
+ <p><?php echo __("WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr'); ?></p>
708
  </span>
709
  </li>
710
 
711
  <li class="enqueue-script wpvr_enqueue_script_list">
712
+ <h6><?php echo __('List of allowed pages to load WP VR scripts (The URLs of the pages on your site with virtual tours):', 'wpvr'); ?> </h6>
713
 
714
  <span class="wpvr-tooltip">
715
  <span class="icon">
716
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
717
  </span>
718
+ <p><?php echo __("List the pages with virtual tours like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></p>
719
  </span>
720
 
721
  <textarea id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/"><?php echo $wpvr_script_list; ?></textarea>
729
 
730
  <li>
731
 
732
+ <h6><?php echo __("Enable Video JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?></h6>
733
 
734
  <span class="wpvr-switcher">
735
  <?php
736
+ if ($wpvr_video_script_control == "true") {
737
+ ?>
738
+ <input id="wpvr_video_script_control" type="checkbox" checked>
739
+ <?php
740
+ } else {
741
+ ?>
742
+ <input id="wpvr_video_script_control" type="checkbox">
743
+ <?php
744
+ }
 
745
  ?>
746
  <label for="wpvr_video_script_control"></label>
747
  </span>
748
 
749
  <span class="wpvr-tooltip">
750
  <span class="icon">
751
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
752
  </span>
753
+ <p><?php echo __("WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr'); ?></p>
754
  </span>
755
  </li>
756
 
757
  <li class="enqueue-video-script wpvr_enqueue_video_script_list">
758
+ <h6><?php echo __('List of allowed pages to load WP VR Video JS library (The URLs of the pages on your site, You want to load Video JS):', 'wpvr'); ?> </h6>
759
 
760
  <span class="wpvr-tooltip">
761
  <span class="icon">
762
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
763
  </span>
764
+ <p><?php echo __("List the pages like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></p>
765
  </span>
766
 
767
  <textarea id="wpvr_video_script_list" class="materialize-textarea" placeholder="https://example.com/video-tour1/,https://example.com/video-tour2/"><?php echo $wpvr_video_script_list; ?></textarea>
776
  <!-- WPVR front-end notice -->
777
  <li class="enqueue-script front-notice">
778
  <?php
779
+ $wpvr_frontend_notice = false;
780
+ $wpvr_frontend_notice_area = '';
781
+ $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
782
+ $wpvr_frontend_notice_area = get_option('wpvr_frontend_notice_area');
783
+ if (!$wpvr_frontend_notice_area) {
784
+ $wpvr_frontend_notice_area = __("Flip the phone to landscape mode for a better experience of the tour.", "wpvr");
785
+ }
786
  ?>
787
+ <h6><?php echo __("Front-End Notice for Mobile Visitors:", "wpvr"); ?></h6>
788
 
789
  <span class="wpvr-switcher">
790
  <?php
791
+ if ($wpvr_frontend_notice == "true") {
792
+ ?>
793
+ <input id="wpvr_frontend_notice" type="checkbox" checked>
794
+ <?php
795
+ } else {
796
+ ?>
797
+ <input id="wpvr_frontend_notice" type="checkbox">
798
+ <?php
799
+ }
 
800
  ?>
801
  <label for="wpvr_frontend_notice"></label>
802
  </span>
803
 
804
  <span class="wpvr-tooltip">
805
  <span class="icon">
806
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
807
  </span>
808
+ <p><?php echo __("The notice will appear on the front end of the virtual tour if viewed from a mobile device.", 'wpvr'); ?></p>
809
  </span>
810
  <textarea id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here"><?php echo $wpvr_frontend_notice_area; ?></textarea>
811
  </li>
813
 
814
  <li>
815
  <form class="wpvr-version">
816
+ <h6><?php _e('Select a Version to Rollback', 'wpvr'); ?></h6>
817
  <select name="wpvr_version">
818
+ <option value="7.3.5">7.3.5</option>
819
+ <option value="7.3.4">7.3.4</option>
820
+ <option value="7.3.3">7.3.3</option>
821
+ <option value="7.3.2">7.3.2</option>
822
+ <option value="7.3.1">7.3.1</option>
823
+ <option value="7.3.0">7.3.0</option>
824
+ <option value="7.2.9">7.2.9</option>
825
+ <option value="7.2.8">7.2.8</option>
826
+ <option value="7.2.7">7.2.7</option>
827
+ <option value="7.2.6">7.2.6</option>
828
  </select>
829
  <input class="wpvr-btn" type="submit" value="Rollback">
830
  </form>
837
  </div>
838
  </div>
839
 
840
+ <button class="btn wpvr-btn" type="submit" id="wpvr_role_submit"><?php echo __('Save', 'wpvr'); ?></button>
841
  </div>
842
 
843
+ <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
844
  <div class="upgrade-pro">
845
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
846
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
847
  </div>
848
  <?php } ?>
849
 
852
  </div>
853
 
854
  </div>
855
+ <?php include('wpvr_confirmation_alert.php'); ?>
build/index.build.js CHANGED
@@ -93,7 +93,7 @@
93
  /*! no static exports found */
94
  /***/ (function(module, exports) {
95
 
96
- eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\nvar Component = wp.element.Component;\nvar el = wp.element.createElement,\n registerBlockType = wp.blocks.registerBlockType,\n TextControl = wp.components.TextControl,\n SelectControl = wp.components.SelectControl,\n InspectorControls = wp.editor.InspectorControls,\n blockStyle = {\n fontFamily: 'Roboto',\n backgroundColor: '#900',\n color: '#fff',\n padding: '20px'\n};\nvar iconEl = el('svg', {\n width: 20,\n height: 20\n}, el('path', {\n d: \"M16.1,16.6h-2.5c-1,0-1.9-0.6-2.4-1.5L11,14.5c-0.2-0.4-0.5-0.6-0.9-0.6c-0.4,0-0.8,0.2-0.9,0.6l-0.3,0.6 c-0.4,0.9-1.3,1.5-2.4,1.5H3.9c-2.2,0-3.9-1.8-3.9-3.9V7.3c0-2.2,1.8-3.9,3.9-3.9h12.2c2.2,0,3.9,1.8,3.9,3.9v1.5 c0,0.4-0.3,0.8-0.8,0.8c-0.4,0-0.8-0.3-0.8-0.8V7.3c0-1.3-1.1-2.3-2.3-2.3H3.9C2.6,4.9,1.6,6,1.6,7.3v5.4c0,1.3,1.1,2.3,2.3,2.3 h2.6c0.4,0,0.8-0.2,0.9-0.6l0.3-0.6c0.4-0.9,1.3-1.5,2.4-1.5c1,0,1.9,0.6,2.4,1.5l0.3,0.6c0.2,0.4,0.5,0.6,0.9,0.6h2.5 c1.3,0,2.3-1.1,2.3-2.3c0-0.4,0.3-0.8,0.8-0.8c0.4,0,0.8,0.3,0.8,0.8C20,14.9,18.2,16.6,16.1,16.6L16.1,16.6z M16.7,9.4 c0-1.3-1.1-2.3-2.3-2.3C13,7.1,12,8.1,12,9.4s1.1,2.3,2.3,2.3C15.6,11.7,16.7,10.7,16.7,9.4L16.7,9.4z M15.1,9.4 c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8C14.8,8.6,15.1,9,15.1,9.4L15.1,9.4z M8,9.4C8,8.1,7,7.1,5.7,7.1 S3.3,8.1,3.3,9.4s1.1,2.3,2.3,2.3S8,10.7,8,9.4L8,9.4z M6.4,9.4c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8 C6.1,8.6,6.4,9,6.4,9.4L6.4,9.4z M6.4,9.4\"\n}));\n\nvar wpvredit = /*#__PURE__*/function (_Component) {\n _inherits(wpvredit, _Component);\n\n var _super = _createSuper(wpvredit);\n\n function wpvredit() {\n var _this;\n\n _classCallCheck(this, wpvredit);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n data: [{\n value: \"0\",\n label: \"None\"\n }]\n };\n return _this;\n }\n\n _createClass(wpvredit, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n wp.apiFetch({\n path: 'wpvr/v1/panodata'\n }).then(function (data) {\n _this2.setState({\n data: data\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return [el(InspectorControls, {}, el(SelectControl, {\n className: 'wpvr-base-control',\n label: 'Id',\n value: this.props.attributes.id,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n id: value\n });\n },\n options: this.state.data\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Width',\n value: this.props.attributes.width,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n width: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Height',\n value: this.props.attributes.height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Radius',\n value: this.props.attributes.radius,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n radius: value\n });\n }\n })), /*#__PURE__*/React.createElement(\"p\", {\n className: \"wpvr-block-content\"\n }, \"WPVR id=\", this.props.attributes.id, \", Width=\", this.props.attributes.width, \"px, Height=\", this.props.attributes.height, \"px, Radius=\", this.props.attributes.radius, \"px\")];\n }\n }]);\n\n return wpvredit;\n}(Component);\n\nregisterBlockType('wpvr/wpvr-block', {\n title: 'WPVR',\n icon: iconEl,\n category: 'common',\n edit: wpvredit,\n save: function save(props) {\n return null;\n }\n});\n\n//# sourceURL=webpack:///./src/index.js?");
97
 
98
  /***/ })
99
 
93
  /*! no static exports found */
94
  /***/ (function(module, exports) {
95
 
96
+ eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\nvar Component = wp.element.Component;\nvar el = wp.element.createElement,\n registerBlockType = wp.blocks.registerBlockType,\n TextControl = wp.components.TextControl,\n SelectControl = wp.components.SelectControl,\n InspectorControls = wp.editor.InspectorControls,\n blockStyle = {\n fontFamily: 'Roboto',\n backgroundColor: '#900',\n color: '#fff',\n padding: '20px'\n};\nvar iconEl = el('svg', {\n width: 20,\n height: 20\n}, el('path', {\n d: \"M16.1,16.6h-2.5c-1,0-1.9-0.6-2.4-1.5L11,14.5c-0.2-0.4-0.5-0.6-0.9-0.6c-0.4,0-0.8,0.2-0.9,0.6l-0.3,0.6 c-0.4,0.9-1.3,1.5-2.4,1.5H3.9c-2.2,0-3.9-1.8-3.9-3.9V7.3c0-2.2,1.8-3.9,3.9-3.9h12.2c2.2,0,3.9,1.8,3.9,3.9v1.5 c0,0.4-0.3,0.8-0.8,0.8c-0.4,0-0.8-0.3-0.8-0.8V7.3c0-1.3-1.1-2.3-2.3-2.3H3.9C2.6,4.9,1.6,6,1.6,7.3v5.4c0,1.3,1.1,2.3,2.3,2.3 h2.6c0.4,0,0.8-0.2,0.9-0.6l0.3-0.6c0.4-0.9,1.3-1.5,2.4-1.5c1,0,1.9,0.6,2.4,1.5l0.3,0.6c0.2,0.4,0.5,0.6,0.9,0.6h2.5 c1.3,0,2.3-1.1,2.3-2.3c0-0.4,0.3-0.8,0.8-0.8c0.4,0,0.8,0.3,0.8,0.8C20,14.9,18.2,16.6,16.1,16.6L16.1,16.6z M16.7,9.4 c0-1.3-1.1-2.3-2.3-2.3C13,7.1,12,8.1,12,9.4s1.1,2.3,2.3,2.3C15.6,11.7,16.7,10.7,16.7,9.4L16.7,9.4z M15.1,9.4 c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8C14.8,8.6,15.1,9,15.1,9.4L15.1,9.4z M8,9.4C8,8.1,7,7.1,5.7,7.1 S3.3,8.1,3.3,9.4s1.1,2.3,2.3,2.3S8,10.7,8,9.4L8,9.4z M6.4,9.4c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8 C6.1,8.6,6.4,9,6.4,9.4L6.4,9.4z M6.4,9.4\"\n}));\n\nvar wpvredit = /*#__PURE__*/function (_Component) {\n _inherits(wpvredit, _Component);\n\n var _super = _createSuper(wpvredit);\n\n function wpvredit() {\n var _this;\n\n _classCallCheck(this, wpvredit);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n data: [{\n value: \"0\",\n label: \"None\"\n }]\n };\n return _this;\n }\n\n _createClass(wpvredit, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n wp.apiFetch({\n path: 'wpvr/v1/panodata'\n }).then(function (data) {\n _this2.setState({\n data: data\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return [el(InspectorControls, {}, el(SelectControl, {\n className: 'wpvr-base-control',\n label: 'Id',\n value: this.props.attributes.id,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n id: value\n });\n },\n options: this.state.data\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Width',\n value: this.props.attributes.width,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n width: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Height',\n value: this.props.attributes.height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Mobile Height',\n value: this.props.attributes.mobile_height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n mobile_height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Radius',\n value: this.props.attributes.radius,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n radius: value\n });\n }\n })), /*#__PURE__*/React.createElement(\"p\", {\n className: \"wpvr-block-content\"\n }, \"WPVR id=\", this.props.attributes.id, \", Width=\", this.props.attributes.width, \"px, Height=\", this.props.attributes.height, \"px, Mobile Height=\", this.props.attributes.mobile_height, \"px, Radius=\", this.props.attributes.radius, \"px\")];\n }\n }]);\n\n return wpvredit;\n}(Component);\n\nregisterBlockType('wpvr/wpvr-block', {\n title: 'WPVR',\n icon: iconEl,\n category: 'common',\n edit: wpvredit,\n save: function save(props) {\n return null;\n }\n});\n\n//# sourceURL=webpack:///./src/index.js?");
97
 
98
  /***/ })
99
 
package-lock.json CHANGED
@@ -1,8 +1,6253 @@
1
  {
2
  "name": "wpvr",
3
  "version": "1.0.2",
4
- "lockfileVersion": 1,
5
  "requires": true,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  "dependencies": {
7
  "@babel/code-frame": {
8
  "version": "7.10.4",
@@ -1344,13 +7589,15 @@
1344
  "version": "1.0.1",
1345
  "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
1346
  "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
1347
- "dev": true
 
1348
  },
1349
  "ajv-keywords": {
1350
  "version": "3.5.1",
1351
  "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz",
1352
  "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==",
1353
- "dev": true
 
1354
  },
1355
  "ansi-regex": {
1356
  "version": "4.1.0",
@@ -4533,6 +10780,15 @@
4533
  "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
4534
  "dev": true
4535
  },
 
 
 
 
 
 
 
 
 
4536
  "string-width": {
4537
  "version": "3.1.0",
4538
  "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@@ -4544,15 +10800,6 @@
4544
  "strip-ansi": "^5.1.0"
4545
  }
4546
  },
4547
- "string_decoder": {
4548
- "version": "1.1.1",
4549
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
4550
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
4551
- "dev": true,
4552
- "requires": {
4553
- "safe-buffer": "~5.1.0"
4554
- }
4555
- },
4556
  "strip-ansi": {
4557
  "version": "5.2.0",
4558
  "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1
  {
2
  "name": "wpvr",
3
  "version": "1.0.2",
4
+ "lockfileVersion": 2,
5
  "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "wpvr",
9
+ "version": "1.0.2",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@wordpress/api-fetch": "^3.18.0",
13
+ "axios": "^0.21.1"
14
+ },
15
+ "devDependencies": {
16
+ "@babel/core": "^7.10.5",
17
+ "@babel/preset-env": "^7.10.4",
18
+ "@babel/preset-react": "^7.10.4",
19
+ "babel-loader": "^8.1.0",
20
+ "webpack": "^4.43.0",
21
+ "webpack-cli": "^3.3.12"
22
+ }
23
+ },
24
+ "node_modules/@babel/code-frame": {
25
+ "version": "7.10.4",
26
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
27
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
28
+ "dev": true,
29
+ "dependencies": {
30
+ "@babel/highlight": "^7.10.4"
31
+ }
32
+ },
33
+ "node_modules/@babel/compat-data": {
34
+ "version": "7.10.5",
35
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.5.tgz",
36
+ "integrity": "sha512-mPVoWNzIpYJHbWje0if7Ck36bpbtTvIxOi9+6WSK9wjGEXearAqlwBoTQvVjsAY2VIwgcs8V940geY3okzRCEw==",
37
+ "dev": true,
38
+ "dependencies": {
39
+ "browserslist": "^4.12.0",
40
+ "invariant": "^2.2.4",
41
+ "semver": "^5.5.0"
42
+ }
43
+ },
44
+ "node_modules/@babel/core": {
45
+ "version": "7.10.5",
46
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
47
+ "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
48
+ "dev": true,
49
+ "dependencies": {
50
+ "@babel/code-frame": "^7.10.4",
51
+ "@babel/generator": "^7.10.5",
52
+ "@babel/helper-module-transforms": "^7.10.5",
53
+ "@babel/helpers": "^7.10.4",
54
+ "@babel/parser": "^7.10.5",
55
+ "@babel/template": "^7.10.4",
56
+ "@babel/traverse": "^7.10.5",
57
+ "@babel/types": "^7.10.5",
58
+ "convert-source-map": "^1.7.0",
59
+ "debug": "^4.1.0",
60
+ "gensync": "^1.0.0-beta.1",
61
+ "json5": "^2.1.2",
62
+ "lodash": "^4.17.19",
63
+ "resolve": "^1.3.2",
64
+ "semver": "^5.4.1",
65
+ "source-map": "^0.5.0"
66
+ },
67
+ "engines": {
68
+ "node": ">=6.9.0"
69
+ },
70
+ "funding": {
71
+ "type": "opencollective",
72
+ "url": "https://opencollective.com/babel"
73
+ }
74
+ },
75
+ "node_modules/@babel/generator": {
76
+ "version": "7.10.5",
77
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz",
78
+ "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==",
79
+ "dev": true,
80
+ "dependencies": {
81
+ "@babel/types": "^7.10.5",
82
+ "jsesc": "^2.5.1",
83
+ "source-map": "^0.5.0"
84
+ }
85
+ },
86
+ "node_modules/@babel/helper-annotate-as-pure": {
87
+ "version": "7.10.4",
88
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz",
89
+ "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==",
90
+ "dev": true,
91
+ "dependencies": {
92
+ "@babel/types": "^7.10.4"
93
+ }
94
+ },
95
+ "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
96
+ "version": "7.10.4",
97
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz",
98
+ "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==",
99
+ "dev": true,
100
+ "dependencies": {
101
+ "@babel/helper-explode-assignable-expression": "^7.10.4",
102
+ "@babel/types": "^7.10.4"
103
+ }
104
+ },
105
+ "node_modules/@babel/helper-builder-react-jsx": {
106
+ "version": "7.10.4",
107
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz",
108
+ "integrity": "sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg==",
109
+ "dev": true,
110
+ "dependencies": {
111
+ "@babel/helper-annotate-as-pure": "^7.10.4",
112
+ "@babel/types": "^7.10.4"
113
+ }
114
+ },
115
+ "node_modules/@babel/helper-builder-react-jsx-experimental": {
116
+ "version": "7.10.5",
117
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.10.5.tgz",
118
+ "integrity": "sha512-Buewnx6M4ttG+NLkKyt7baQn7ScC/Td+e99G914fRU8fGIUivDDgVIQeDHFa5e4CRSJQt58WpNHhsAZgtzVhsg==",
119
+ "dev": true,
120
+ "dependencies": {
121
+ "@babel/helper-annotate-as-pure": "^7.10.4",
122
+ "@babel/helper-module-imports": "^7.10.4",
123
+ "@babel/types": "^7.10.5"
124
+ }
125
+ },
126
+ "node_modules/@babel/helper-compilation-targets": {
127
+ "version": "7.10.4",
128
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz",
129
+ "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==",
130
+ "dev": true,
131
+ "dependencies": {
132
+ "@babel/compat-data": "^7.10.4",
133
+ "browserslist": "^4.12.0",
134
+ "invariant": "^2.2.4",
135
+ "levenary": "^1.1.1",
136
+ "semver": "^5.5.0"
137
+ },
138
+ "peerDependencies": {
139
+ "@babel/core": "^7.0.0"
140
+ }
141
+ },
142
+ "node_modules/@babel/helper-create-class-features-plugin": {
143
+ "version": "7.10.5",
144
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz",
145
+ "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==",
146
+ "dev": true,
147
+ "dependencies": {
148
+ "@babel/helper-function-name": "^7.10.4",
149
+ "@babel/helper-member-expression-to-functions": "^7.10.5",
150
+ "@babel/helper-optimise-call-expression": "^7.10.4",
151
+ "@babel/helper-plugin-utils": "^7.10.4",
152
+ "@babel/helper-replace-supers": "^7.10.4",
153
+ "@babel/helper-split-export-declaration": "^7.10.4"
154
+ },
155
+ "peerDependencies": {
156
+ "@babel/core": "^7.0.0"
157
+ }
158
+ },
159
+ "node_modules/@babel/helper-create-regexp-features-plugin": {
160
+ "version": "7.10.4",
161
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz",
162
+ "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==",
163
+ "dev": true,
164
+ "dependencies": {
165
+ "@babel/helper-annotate-as-pure": "^7.10.4",
166
+ "@babel/helper-regex": "^7.10.4",
167
+ "regexpu-core": "^4.7.0"
168
+ },
169
+ "peerDependencies": {
170
+ "@babel/core": "^7.0.0"
171
+ }
172
+ },
173
+ "node_modules/@babel/helper-define-map": {
174
+ "version": "7.10.5",
175
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz",
176
+ "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==",
177
+ "dev": true,
178
+ "dependencies": {
179
+ "@babel/helper-function-name": "^7.10.4",
180
+ "@babel/types": "^7.10.5",
181
+ "lodash": "^4.17.19"
182
+ }
183
+ },
184
+ "node_modules/@babel/helper-explode-assignable-expression": {
185
+ "version": "7.10.4",
186
+ "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz",
187
+ "integrity": "sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==",
188
+ "dev": true,
189
+ "dependencies": {
190
+ "@babel/traverse": "^7.10.4",
191
+ "@babel/types": "^7.10.4"
192
+ }
193
+ },
194
+ "node_modules/@babel/helper-function-name": {
195
+ "version": "7.10.4",
196
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
197
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
198
+ "dev": true,
199
+ "dependencies": {
200
+ "@babel/helper-get-function-arity": "^7.10.4",
201
+ "@babel/template": "^7.10.4",
202
+ "@babel/types": "^7.10.4"
203
+ }
204
+ },
205
+ "node_modules/@babel/helper-get-function-arity": {
206
+ "version": "7.10.4",
207
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
208
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
209
+ "dev": true,
210
+ "dependencies": {
211
+ "@babel/types": "^7.10.4"
212
+ }
213
+ },
214
+ "node_modules/@babel/helper-hoist-variables": {
215
+ "version": "7.10.4",
216
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz",
217
+ "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==",
218
+ "dev": true,
219
+ "dependencies": {
220
+ "@babel/types": "^7.10.4"
221
+ }
222
+ },
223
+ "node_modules/@babel/helper-member-expression-to-functions": {
224
+ "version": "7.10.5",
225
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz",
226
+ "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==",
227
+ "dev": true,
228
+ "dependencies": {
229
+ "@babel/types": "^7.10.5"
230
+ }
231
+ },
232
+ "node_modules/@babel/helper-module-imports": {
233
+ "version": "7.10.4",
234
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz",
235
+ "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==",
236
+ "dev": true,
237
+ "dependencies": {
238
+ "@babel/types": "^7.10.4"
239
+ }
240
+ },
241
+ "node_modules/@babel/helper-module-transforms": {
242
+ "version": "7.10.5",
243
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz",
244
+ "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==",
245
+ "dev": true,
246
+ "dependencies": {
247
+ "@babel/helper-module-imports": "^7.10.4",
248
+ "@babel/helper-replace-supers": "^7.10.4",
249
+ "@babel/helper-simple-access": "^7.10.4",
250
+ "@babel/helper-split-export-declaration": "^7.10.4",
251
+ "@babel/template": "^7.10.4",
252
+ "@babel/types": "^7.10.5",
253
+ "lodash": "^4.17.19"
254
+ }
255
+ },
256
+ "node_modules/@babel/helper-optimise-call-expression": {
257
+ "version": "7.10.4",
258
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
259
+ "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
260
+ "dev": true,
261
+ "dependencies": {
262
+ "@babel/types": "^7.10.4"
263
+ }
264
+ },
265
+ "node_modules/@babel/helper-plugin-utils": {
266
+ "version": "7.10.4",
267
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
268
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
269
+ "dev": true
270
+ },
271
+ "node_modules/@babel/helper-regex": {
272
+ "version": "7.10.5",
273
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz",
274
+ "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==",
275
+ "dev": true,
276
+ "dependencies": {
277
+ "lodash": "^4.17.19"
278
+ }
279
+ },
280
+ "node_modules/@babel/helper-remap-async-to-generator": {
281
+ "version": "7.10.4",
282
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz",
283
+ "integrity": "sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==",
284
+ "dev": true,
285
+ "dependencies": {
286
+ "@babel/helper-annotate-as-pure": "^7.10.4",
287
+ "@babel/helper-wrap-function": "^7.10.4",
288
+ "@babel/template": "^7.10.4",
289
+ "@babel/traverse": "^7.10.4",
290
+ "@babel/types": "^7.10.4"
291
+ }
292
+ },
293
+ "node_modules/@babel/helper-replace-supers": {
294
+ "version": "7.10.4",
295
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz",
296
+ "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==",
297
+ "dev": true,
298
+ "dependencies": {
299
+ "@babel/helper-member-expression-to-functions": "^7.10.4",
300
+ "@babel/helper-optimise-call-expression": "^7.10.4",
301
+ "@babel/traverse": "^7.10.4",
302
+ "@babel/types": "^7.10.4"
303
+ }
304
+ },
305
+ "node_modules/@babel/helper-simple-access": {
306
+ "version": "7.10.4",
307
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz",
308
+ "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==",
309
+ "dev": true,
310
+ "dependencies": {
311
+ "@babel/template": "^7.10.4",
312
+ "@babel/types": "^7.10.4"
313
+ }
314
+ },
315
+ "node_modules/@babel/helper-split-export-declaration": {
316
+ "version": "7.10.4",
317
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz",
318
+ "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==",
319
+ "dev": true,
320
+ "dependencies": {
321
+ "@babel/types": "^7.10.4"
322
+ }
323
+ },
324
+ "node_modules/@babel/helper-validator-identifier": {
325
+ "version": "7.10.4",
326
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
327
+ "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
328
+ "dev": true
329
+ },
330
+ "node_modules/@babel/helper-wrap-function": {
331
+ "version": "7.10.4",
332
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz",
333
+ "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==",
334
+ "dev": true,
335
+ "dependencies": {
336
+ "@babel/helper-function-name": "^7.10.4",
337
+ "@babel/template": "^7.10.4",
338
+ "@babel/traverse": "^7.10.4",
339
+ "@babel/types": "^7.10.4"
340
+ }
341
+ },
342
+ "node_modules/@babel/helpers": {
343
+ "version": "7.10.4",
344
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz",
345
+ "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==",
346
+ "dev": true,
347
+ "dependencies": {
348
+ "@babel/template": "^7.10.4",
349
+ "@babel/traverse": "^7.10.4",
350
+ "@babel/types": "^7.10.4"
351
+ }
352
+ },
353
+ "node_modules/@babel/highlight": {
354
+ "version": "7.10.4",
355
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
356
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
357
+ "dev": true,
358
+ "dependencies": {
359
+ "@babel/helper-validator-identifier": "^7.10.4",
360
+ "chalk": "^2.0.0",
361
+ "js-tokens": "^4.0.0"
362
+ }
363
+ },
364
+ "node_modules/@babel/parser": {
365
+ "version": "7.10.5",
366
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz",
367
+ "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==",
368
+ "dev": true,
369
+ "bin": {
370
+ "parser": "bin/babel-parser.js"
371
+ },
372
+ "engines": {
373
+ "node": ">=6.0.0"
374
+ }
375
+ },
376
+ "node_modules/@babel/plugin-proposal-async-generator-functions": {
377
+ "version": "7.10.5",
378
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz",
379
+ "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==",
380
+ "dev": true,
381
+ "dependencies": {
382
+ "@babel/helper-plugin-utils": "^7.10.4",
383
+ "@babel/helper-remap-async-to-generator": "^7.10.4",
384
+ "@babel/plugin-syntax-async-generators": "^7.8.0"
385
+ },
386
+ "peerDependencies": {
387
+ "@babel/core": "^7.0.0-0"
388
+ }
389
+ },
390
+ "node_modules/@babel/plugin-proposal-class-properties": {
391
+ "version": "7.10.4",
392
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz",
393
+ "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==",
394
+ "dev": true,
395
+ "dependencies": {
396
+ "@babel/helper-create-class-features-plugin": "^7.10.4",
397
+ "@babel/helper-plugin-utils": "^7.10.4"
398
+ },
399
+ "peerDependencies": {
400
+ "@babel/core": "^7.0.0-0"
401
+ }
402
+ },
403
+ "node_modules/@babel/plugin-proposal-dynamic-import": {
404
+ "version": "7.10.4",
405
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz",
406
+ "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==",
407
+ "dev": true,
408
+ "dependencies": {
409
+ "@babel/helper-plugin-utils": "^7.10.4",
410
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0"
411
+ },
412
+ "peerDependencies": {
413
+ "@babel/core": "^7.0.0-0"
414
+ }
415
+ },
416
+ "node_modules/@babel/plugin-proposal-json-strings": {
417
+ "version": "7.10.4",
418
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz",
419
+ "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==",
420
+ "dev": true,
421
+ "dependencies": {
422
+ "@babel/helper-plugin-utils": "^7.10.4",
423
+ "@babel/plugin-syntax-json-strings": "^7.8.0"
424
+ },
425
+ "peerDependencies": {
426
+ "@babel/core": "^7.0.0-0"
427
+ }
428
+ },
429
+ "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": {
430
+ "version": "7.10.4",
431
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz",
432
+ "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==",
433
+ "dev": true,
434
+ "dependencies": {
435
+ "@babel/helper-plugin-utils": "^7.10.4",
436
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
437
+ },
438
+ "peerDependencies": {
439
+ "@babel/core": "^7.0.0-0"
440
+ }
441
+ },
442
+ "node_modules/@babel/plugin-proposal-numeric-separator": {
443
+ "version": "7.10.4",
444
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz",
445
+ "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==",
446
+ "dev": true,
447
+ "dependencies": {
448
+ "@babel/helper-plugin-utils": "^7.10.4",
449
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4"
450
+ },
451
+ "peerDependencies": {
452
+ "@babel/core": "^7.0.0-0"
453
+ }
454
+ },
455
+ "node_modules/@babel/plugin-proposal-object-rest-spread": {
456
+ "version": "7.10.4",
457
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz",
458
+ "integrity": "sha512-6vh4SqRuLLarjgeOf4EaROJAHjvu9Gl+/346PbDH9yWbJyfnJ/ah3jmYKYtswEyCoWZiidvVHjHshd4WgjB9BA==",
459
+ "dev": true,
460
+ "dependencies": {
461
+ "@babel/helper-plugin-utils": "^7.10.4",
462
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
463
+ "@babel/plugin-transform-parameters": "^7.10.4"
464
+ },
465
+ "peerDependencies": {
466
+ "@babel/core": "^7.0.0-0"
467
+ }
468
+ },
469
+ "node_modules/@babel/plugin-proposal-optional-catch-binding": {
470
+ "version": "7.10.4",
471
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz",
472
+ "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==",
473
+ "dev": true,
474
+ "dependencies": {
475
+ "@babel/helper-plugin-utils": "^7.10.4",
476
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
477
+ },
478
+ "peerDependencies": {
479
+ "@babel/core": "^7.0.0-0"
480
+ }
481
+ },
482
+ "node_modules/@babel/plugin-proposal-optional-chaining": {
483
+ "version": "7.10.4",
484
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.4.tgz",
485
+ "integrity": "sha512-ZIhQIEeavTgouyMSdZRap4VPPHqJJ3NEs2cuHs5p0erH+iz6khB0qfgU8g7UuJkG88+fBMy23ZiU+nuHvekJeQ==",
486
+ "dev": true,
487
+ "dependencies": {
488
+ "@babel/helper-plugin-utils": "^7.10.4",
489
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0"
490
+ },
491
+ "peerDependencies": {
492
+ "@babel/core": "^7.0.0-0"
493
+ }
494
+ },
495
+ "node_modules/@babel/plugin-proposal-private-methods": {
496
+ "version": "7.10.4",
497
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz",
498
+ "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==",
499
+ "dev": true,
500
+ "dependencies": {
501
+ "@babel/helper-create-class-features-plugin": "^7.10.4",
502
+ "@babel/helper-plugin-utils": "^7.10.4"
503
+ },
504
+ "peerDependencies": {
505
+ "@babel/core": "^7.0.0-0"
506
+ }
507
+ },
508
+ "node_modules/@babel/plugin-proposal-unicode-property-regex": {
509
+ "version": "7.10.4",
510
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz",
511
+ "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==",
512
+ "dev": true,
513
+ "dependencies": {
514
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
515
+ "@babel/helper-plugin-utils": "^7.10.4"
516
+ },
517
+ "engines": {
518
+ "node": ">=4"
519
+ },
520
+ "peerDependencies": {
521
+ "@babel/core": "^7.0.0-0"
522
+ }
523
+ },
524
+ "node_modules/@babel/plugin-syntax-async-generators": {
525
+ "version": "7.8.4",
526
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
527
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
528
+ "dev": true,
529
+ "dependencies": {
530
+ "@babel/helper-plugin-utils": "^7.8.0"
531
+ },
532
+ "peerDependencies": {
533
+ "@babel/core": "^7.0.0-0"
534
+ }
535
+ },
536
+ "node_modules/@babel/plugin-syntax-class-properties": {
537
+ "version": "7.10.4",
538
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz",
539
+ "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==",
540
+ "dev": true,
541
+ "dependencies": {
542
+ "@babel/helper-plugin-utils": "^7.10.4"
543
+ },
544
+ "peerDependencies": {
545
+ "@babel/core": "^7.0.0-0"
546
+ }
547
+ },
548
+ "node_modules/@babel/plugin-syntax-dynamic-import": {
549
+ "version": "7.8.3",
550
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
551
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
552
+ "dev": true,
553
+ "dependencies": {
554
+ "@babel/helper-plugin-utils": "^7.8.0"
555
+ },
556
+ "peerDependencies": {
557
+ "@babel/core": "^7.0.0-0"
558
+ }
559
+ },
560
+ "node_modules/@babel/plugin-syntax-json-strings": {
561
+ "version": "7.8.3",
562
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
563
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
564
+ "dev": true,
565
+ "dependencies": {
566
+ "@babel/helper-plugin-utils": "^7.8.0"
567
+ },
568
+ "peerDependencies": {
569
+ "@babel/core": "^7.0.0-0"
570
+ }
571
+ },
572
+ "node_modules/@babel/plugin-syntax-jsx": {
573
+ "version": "7.10.4",
574
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz",
575
+ "integrity": "sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g==",
576
+ "dev": true,
577
+ "dependencies": {
578
+ "@babel/helper-plugin-utils": "^7.10.4"
579
+ },
580
+ "peerDependencies": {
581
+ "@babel/core": "^7.0.0-0"
582
+ }
583
+ },
584
+ "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
585
+ "version": "7.8.3",
586
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
587
+ "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
588
+ "dev": true,
589
+ "dependencies": {
590
+ "@babel/helper-plugin-utils": "^7.8.0"
591
+ },
592
+ "peerDependencies": {
593
+ "@babel/core": "^7.0.0-0"
594
+ }
595
+ },
596
+ "node_modules/@babel/plugin-syntax-numeric-separator": {
597
+ "version": "7.10.4",
598
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
599
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
600
+ "dev": true,
601
+ "dependencies": {
602
+ "@babel/helper-plugin-utils": "^7.10.4"
603
+ },
604
+ "peerDependencies": {
605
+ "@babel/core": "^7.0.0-0"
606
+ }
607
+ },
608
+ "node_modules/@babel/plugin-syntax-object-rest-spread": {
609
+ "version": "7.8.3",
610
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
611
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
612
+ "dev": true,
613
+ "dependencies": {
614
+ "@babel/helper-plugin-utils": "^7.8.0"
615
+ },
616
+ "peerDependencies": {
617
+ "@babel/core": "^7.0.0-0"
618
+ }
619
+ },
620
+ "node_modules/@babel/plugin-syntax-optional-catch-binding": {
621
+ "version": "7.8.3",
622
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
623
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
624
+ "dev": true,
625
+ "dependencies": {
626
+ "@babel/helper-plugin-utils": "^7.8.0"
627
+ },
628
+ "peerDependencies": {
629
+ "@babel/core": "^7.0.0-0"
630
+ }
631
+ },
632
+ "node_modules/@babel/plugin-syntax-optional-chaining": {
633
+ "version": "7.8.3",
634
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
635
+ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
636
+ "dev": true,
637
+ "dependencies": {
638
+ "@babel/helper-plugin-utils": "^7.8.0"
639
+ },
640
+ "peerDependencies": {
641
+ "@babel/core": "^7.0.0-0"
642
+ }
643
+ },
644
+ "node_modules/@babel/plugin-syntax-top-level-await": {
645
+ "version": "7.10.4",
646
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz",
647
+ "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==",
648
+ "dev": true,
649
+ "dependencies": {
650
+ "@babel/helper-plugin-utils": "^7.10.4"
651
+ },
652
+ "peerDependencies": {
653
+ "@babel/core": "^7.0.0-0"
654
+ }
655
+ },
656
+ "node_modules/@babel/plugin-transform-arrow-functions": {
657
+ "version": "7.10.4",
658
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz",
659
+ "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==",
660
+ "dev": true,
661
+ "dependencies": {
662
+ "@babel/helper-plugin-utils": "^7.10.4"
663
+ },
664
+ "peerDependencies": {
665
+ "@babel/core": "^7.0.0-0"
666
+ }
667
+ },
668
+ "node_modules/@babel/plugin-transform-async-to-generator": {
669
+ "version": "7.10.4",
670
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz",
671
+ "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==",
672
+ "dev": true,
673
+ "dependencies": {
674
+ "@babel/helper-module-imports": "^7.10.4",
675
+ "@babel/helper-plugin-utils": "^7.10.4",
676
+ "@babel/helper-remap-async-to-generator": "^7.10.4"
677
+ },
678
+ "peerDependencies": {
679
+ "@babel/core": "^7.0.0-0"
680
+ }
681
+ },
682
+ "node_modules/@babel/plugin-transform-block-scoped-functions": {
683
+ "version": "7.10.4",
684
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz",
685
+ "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==",
686
+ "dev": true,
687
+ "dependencies": {
688
+ "@babel/helper-plugin-utils": "^7.10.4"
689
+ },
690
+ "peerDependencies": {
691
+ "@babel/core": "^7.0.0-0"
692
+ }
693
+ },
694
+ "node_modules/@babel/plugin-transform-block-scoping": {
695
+ "version": "7.10.5",
696
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.5.tgz",
697
+ "integrity": "sha512-6Ycw3hjpQti0qssQcA6AMSFDHeNJ++R6dIMnpRqUjFeBBTmTDPa8zgF90OVfTvAo11mXZTlVUViY1g8ffrURLg==",
698
+ "dev": true,
699
+ "dependencies": {
700
+ "@babel/helper-plugin-utils": "^7.10.4"
701
+ },
702
+ "peerDependencies": {
703
+ "@babel/core": "^7.0.0-0"
704
+ }
705
+ },
706
+ "node_modules/@babel/plugin-transform-classes": {
707
+ "version": "7.10.4",
708
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz",
709
+ "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==",
710
+ "dev": true,
711
+ "dependencies": {
712
+ "@babel/helper-annotate-as-pure": "^7.10.4",
713
+ "@babel/helper-define-map": "^7.10.4",
714
+ "@babel/helper-function-name": "^7.10.4",
715
+ "@babel/helper-optimise-call-expression": "^7.10.4",
716
+ "@babel/helper-plugin-utils": "^7.10.4",
717
+ "@babel/helper-replace-supers": "^7.10.4",
718
+ "@babel/helper-split-export-declaration": "^7.10.4",
719
+ "globals": "^11.1.0"
720
+ },
721
+ "peerDependencies": {
722
+ "@babel/core": "^7.0.0-0"
723
+ }
724
+ },
725
+ "node_modules/@babel/plugin-transform-computed-properties": {
726
+ "version": "7.10.4",
727
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz",
728
+ "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==",
729
+ "dev": true,
730
+ "dependencies": {
731
+ "@babel/helper-plugin-utils": "^7.10.4"
732
+ },
733
+ "peerDependencies": {
734
+ "@babel/core": "^7.0.0-0"
735
+ }
736
+ },
737
+ "node_modules/@babel/plugin-transform-destructuring": {
738
+ "version": "7.10.4",
739
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz",
740
+ "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==",
741
+ "dev": true,
742
+ "dependencies": {
743
+ "@babel/helper-plugin-utils": "^7.10.4"
744
+ },
745
+ "peerDependencies": {
746
+ "@babel/core": "^7.0.0-0"
747
+ }
748
+ },
749
+ "node_modules/@babel/plugin-transform-dotall-regex": {
750
+ "version": "7.10.4",
751
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz",
752
+ "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==",
753
+ "dev": true,
754
+ "dependencies": {
755
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
756
+ "@babel/helper-plugin-utils": "^7.10.4"
757
+ },
758
+ "peerDependencies": {
759
+ "@babel/core": "^7.0.0-0"
760
+ }
761
+ },
762
+ "node_modules/@babel/plugin-transform-duplicate-keys": {
763
+ "version": "7.10.4",
764
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz",
765
+ "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==",
766
+ "dev": true,
767
+ "dependencies": {
768
+ "@babel/helper-plugin-utils": "^7.10.4"
769
+ },
770
+ "peerDependencies": {
771
+ "@babel/core": "^7.0.0-0"
772
+ }
773
+ },
774
+ "node_modules/@babel/plugin-transform-exponentiation-operator": {
775
+ "version": "7.10.4",
776
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz",
777
+ "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==",
778
+ "dev": true,
779
+ "dependencies": {
780
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4",
781
+ "@babel/helper-plugin-utils": "^7.10.4"
782
+ },
783
+ "peerDependencies": {
784
+ "@babel/core": "^7.0.0-0"
785
+ }
786
+ },
787
+ "node_modules/@babel/plugin-transform-for-of": {
788
+ "version": "7.10.4",
789
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz",
790
+ "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==",
791
+ "dev": true,
792
+ "dependencies": {
793
+ "@babel/helper-plugin-utils": "^7.10.4"
794
+ },
795
+ "peerDependencies": {
796
+ "@babel/core": "^7.0.0-0"
797
+ }
798
+ },
799
+ "node_modules/@babel/plugin-transform-function-name": {
800
+ "version": "7.10.4",
801
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz",
802
+ "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==",
803
+ "dev": true,
804
+ "dependencies": {
805
+ "@babel/helper-function-name": "^7.10.4",
806
+ "@babel/helper-plugin-utils": "^7.10.4"
807
+ },
808
+ "peerDependencies": {
809
+ "@babel/core": "^7.0.0-0"
810
+ }
811
+ },
812
+ "node_modules/@babel/plugin-transform-literals": {
813
+ "version": "7.10.4",
814
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz",
815
+ "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==",
816
+ "dev": true,
817
+ "dependencies": {
818
+ "@babel/helper-plugin-utils": "^7.10.4"
819
+ },
820
+ "peerDependencies": {
821
+ "@babel/core": "^7.0.0-0"
822
+ }
823
+ },
824
+ "node_modules/@babel/plugin-transform-member-expression-literals": {
825
+ "version": "7.10.4",
826
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz",
827
+ "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==",
828
+ "dev": true,
829
+ "dependencies": {
830
+ "@babel/helper-plugin-utils": "^7.10.4"
831
+ },
832
+ "peerDependencies": {
833
+ "@babel/core": "^7.0.0-0"
834
+ }
835
+ },
836
+ "node_modules/@babel/plugin-transform-modules-amd": {
837
+ "version": "7.10.5",
838
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz",
839
+ "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==",
840
+ "dev": true,
841
+ "dependencies": {
842
+ "@babel/helper-module-transforms": "^7.10.5",
843
+ "@babel/helper-plugin-utils": "^7.10.4",
844
+ "babel-plugin-dynamic-import-node": "^2.3.3"
845
+ },
846
+ "peerDependencies": {
847
+ "@babel/core": "^7.0.0-0"
848
+ }
849
+ },
850
+ "node_modules/@babel/plugin-transform-modules-commonjs": {
851
+ "version": "7.10.4",
852
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz",
853
+ "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==",
854
+ "dev": true,
855
+ "dependencies": {
856
+ "@babel/helper-module-transforms": "^7.10.4",
857
+ "@babel/helper-plugin-utils": "^7.10.4",
858
+ "@babel/helper-simple-access": "^7.10.4",
859
+ "babel-plugin-dynamic-import-node": "^2.3.3"
860
+ },
861
+ "peerDependencies": {
862
+ "@babel/core": "^7.0.0-0"
863
+ }
864
+ },
865
+ "node_modules/@babel/plugin-transform-modules-systemjs": {
866
+ "version": "7.10.5",
867
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz",
868
+ "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==",
869
+ "dev": true,
870
+ "dependencies": {
871
+ "@babel/helper-hoist-variables": "^7.10.4",
872
+ "@babel/helper-module-transforms": "^7.10.5",
873
+ "@babel/helper-plugin-utils": "^7.10.4",
874
+ "babel-plugin-dynamic-import-node": "^2.3.3"
875
+ },
876
+ "peerDependencies": {
877
+ "@babel/core": "^7.0.0-0"
878
+ }
879
+ },
880
+ "node_modules/@babel/plugin-transform-modules-umd": {
881
+ "version": "7.10.4",
882
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz",
883
+ "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==",
884
+ "dev": true,
885
+ "dependencies": {
886
+ "@babel/helper-module-transforms": "^7.10.4",
887
+ "@babel/helper-plugin-utils": "^7.10.4"
888
+ },
889
+ "peerDependencies": {
890
+ "@babel/core": "^7.0.0-0"
891
+ }
892
+ },
893
+ "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
894
+ "version": "7.10.4",
895
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz",
896
+ "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==",
897
+ "dev": true,
898
+ "dependencies": {
899
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4"
900
+ },
901
+ "peerDependencies": {
902
+ "@babel/core": "^7.0.0"
903
+ }
904
+ },
905
+ "node_modules/@babel/plugin-transform-new-target": {
906
+ "version": "7.10.4",
907
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz",
908
+ "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==",
909
+ "dev": true,
910
+ "dependencies": {
911
+ "@babel/helper-plugin-utils": "^7.10.4"
912
+ },
913
+ "peerDependencies": {
914
+ "@babel/core": "^7.0.0-0"
915
+ }
916
+ },
917
+ "node_modules/@babel/plugin-transform-object-super": {
918
+ "version": "7.10.4",
919
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz",
920
+ "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==",
921
+ "dev": true,
922
+ "dependencies": {
923
+ "@babel/helper-plugin-utils": "^7.10.4",
924
+ "@babel/helper-replace-supers": "^7.10.4"
925
+ },
926
+ "peerDependencies": {
927
+ "@babel/core": "^7.0.0-0"
928
+ }
929
+ },
930
+ "node_modules/@babel/plugin-transform-parameters": {
931
+ "version": "7.10.5",
932
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz",
933
+ "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==",
934
+ "dev": true,
935
+ "dependencies": {
936
+ "@babel/helper-get-function-arity": "^7.10.4",
937
+ "@babel/helper-plugin-utils": "^7.10.4"
938
+ },
939
+ "peerDependencies": {
940
+ "@babel/core": "^7.0.0-0"
941
+ }
942
+ },
943
+ "node_modules/@babel/plugin-transform-property-literals": {
944
+ "version": "7.10.4",
945
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz",
946
+ "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==",
947
+ "dev": true,
948
+ "dependencies": {
949
+ "@babel/helper-plugin-utils": "^7.10.4"
950
+ },
951
+ "peerDependencies": {
952
+ "@babel/core": "^7.0.0-0"
953
+ }
954
+ },
955
+ "node_modules/@babel/plugin-transform-react-display-name": {
956
+ "version": "7.10.4",
957
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.10.4.tgz",
958
+ "integrity": "sha512-Zd4X54Mu9SBfPGnEcaGcOrVAYOtjT2on8QZkLKEq1S/tHexG39d9XXGZv19VfRrDjPJzFmPfTAqOQS1pfFOujw==",
959
+ "dev": true,
960
+ "dependencies": {
961
+ "@babel/helper-plugin-utils": "^7.10.4"
962
+ },
963
+ "peerDependencies": {
964
+ "@babel/core": "^7.0.0-0"
965
+ }
966
+ },
967
+ "node_modules/@babel/plugin-transform-react-jsx": {
968
+ "version": "7.10.4",
969
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.10.4.tgz",
970
+ "integrity": "sha512-L+MfRhWjX0eI7Js093MM6MacKU4M6dnCRa/QPDwYMxjljzSCzzlzKzj9Pk4P3OtrPcxr2N3znR419nr3Xw+65A==",
971
+ "dev": true,
972
+ "dependencies": {
973
+ "@babel/helper-builder-react-jsx": "^7.10.4",
974
+ "@babel/helper-builder-react-jsx-experimental": "^7.10.4",
975
+ "@babel/helper-plugin-utils": "^7.10.4",
976
+ "@babel/plugin-syntax-jsx": "^7.10.4"
977
+ },
978
+ "peerDependencies": {
979
+ "@babel/core": "^7.0.0-0"
980
+ }
981
+ },
982
+ "node_modules/@babel/plugin-transform-react-jsx-development": {
983
+ "version": "7.10.4",
984
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.10.4.tgz",
985
+ "integrity": "sha512-RM3ZAd1sU1iQ7rI2dhrZRZGv0aqzNQMbkIUCS1txYpi9wHQ2ZHNjo5TwX+UD6pvFW4AbWqLVYvKy5qJSAyRGjQ==",
986
+ "dev": true,
987
+ "dependencies": {
988
+ "@babel/helper-builder-react-jsx-experimental": "^7.10.4",
989
+ "@babel/helper-plugin-utils": "^7.10.4",
990
+ "@babel/plugin-syntax-jsx": "^7.10.4"
991
+ },
992
+ "peerDependencies": {
993
+ "@babel/core": "^7.0.0-0"
994
+ }
995
+ },
996
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
997
+ "version": "7.10.4",
998
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.4.tgz",
999
+ "integrity": "sha512-yOvxY2pDiVJi0axdTWHSMi5T0DILN+H+SaeJeACHKjQLezEzhLx9nEF9xgpBLPtkZsks9cnb5P9iBEi21En3gg==",
1000
+ "dev": true,
1001
+ "dependencies": {
1002
+ "@babel/helper-plugin-utils": "^7.10.4",
1003
+ "@babel/plugin-syntax-jsx": "^7.10.4"
1004
+ },
1005
+ "peerDependencies": {
1006
+ "@babel/core": "^7.0.0-0"
1007
+ }
1008
+ },
1009
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
1010
+ "version": "7.10.5",
1011
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.10.5.tgz",
1012
+ "integrity": "sha512-wTeqHVkN1lfPLubRiZH3o73f4rfon42HpgxUSs86Nc+8QIcm/B9s8NNVXu/gwGcOyd7yDib9ikxoDLxJP0UiDA==",
1013
+ "dev": true,
1014
+ "dependencies": {
1015
+ "@babel/helper-plugin-utils": "^7.10.4",
1016
+ "@babel/plugin-syntax-jsx": "^7.10.4"
1017
+ },
1018
+ "peerDependencies": {
1019
+ "@babel/core": "^7.0.0-0"
1020
+ }
1021
+ },
1022
+ "node_modules/@babel/plugin-transform-react-pure-annotations": {
1023
+ "version": "7.10.4",
1024
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.4.tgz",
1025
+ "integrity": "sha512-+njZkqcOuS8RaPakrnR9KvxjoG1ASJWpoIv/doyWngId88JoFlPlISenGXjrVacZUIALGUr6eodRs1vmPnF23A==",
1026
+ "dev": true,
1027
+ "dependencies": {
1028
+ "@babel/helper-annotate-as-pure": "^7.10.4",
1029
+ "@babel/helper-plugin-utils": "^7.10.4"
1030
+ },
1031
+ "peerDependencies": {
1032
+ "@babel/core": "^7.0.0-0"
1033
+ }
1034
+ },
1035
+ "node_modules/@babel/plugin-transform-regenerator": {
1036
+ "version": "7.10.4",
1037
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz",
1038
+ "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==",
1039
+ "dev": true,
1040
+ "dependencies": {
1041
+ "regenerator-transform": "^0.14.2"
1042
+ },
1043
+ "peerDependencies": {
1044
+ "@babel/core": "^7.0.0-0"
1045
+ }
1046
+ },
1047
+ "node_modules/@babel/plugin-transform-reserved-words": {
1048
+ "version": "7.10.4",
1049
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz",
1050
+ "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==",
1051
+ "dev": true,
1052
+ "dependencies": {
1053
+ "@babel/helper-plugin-utils": "^7.10.4"
1054
+ },
1055
+ "peerDependencies": {
1056
+ "@babel/core": "^7.0.0-0"
1057
+ }
1058
+ },
1059
+ "node_modules/@babel/plugin-transform-shorthand-properties": {
1060
+ "version": "7.10.4",
1061
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz",
1062
+ "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==",
1063
+ "dev": true,
1064
+ "dependencies": {
1065
+ "@babel/helper-plugin-utils": "^7.10.4"
1066
+ },
1067
+ "peerDependencies": {
1068
+ "@babel/core": "^7.0.0-0"
1069
+ }
1070
+ },
1071
+ "node_modules/@babel/plugin-transform-spread": {
1072
+ "version": "7.10.4",
1073
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.4.tgz",
1074
+ "integrity": "sha512-1e/51G/Ni+7uH5gktbWv+eCED9pP8ZpRhZB3jOaI3mmzfvJTWHkuyYTv0Z5PYtyM+Tr2Ccr9kUdQxn60fI5WuQ==",
1075
+ "dev": true,
1076
+ "dependencies": {
1077
+ "@babel/helper-plugin-utils": "^7.10.4"
1078
+ },
1079
+ "peerDependencies": {
1080
+ "@babel/core": "^7.0.0-0"
1081
+ }
1082
+ },
1083
+ "node_modules/@babel/plugin-transform-sticky-regex": {
1084
+ "version": "7.10.4",
1085
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz",
1086
+ "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==",
1087
+ "dev": true,
1088
+ "dependencies": {
1089
+ "@babel/helper-plugin-utils": "^7.10.4",
1090
+ "@babel/helper-regex": "^7.10.4"
1091
+ },
1092
+ "peerDependencies": {
1093
+ "@babel/core": "^7.0.0-0"
1094
+ }
1095
+ },
1096
+ "node_modules/@babel/plugin-transform-template-literals": {
1097
+ "version": "7.10.5",
1098
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz",
1099
+ "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==",
1100
+ "dev": true,
1101
+ "dependencies": {
1102
+ "@babel/helper-annotate-as-pure": "^7.10.4",
1103
+ "@babel/helper-plugin-utils": "^7.10.4"
1104
+ },
1105
+ "peerDependencies": {
1106
+ "@babel/core": "^7.0.0-0"
1107
+ }
1108
+ },
1109
+ "node_modules/@babel/plugin-transform-typeof-symbol": {
1110
+ "version": "7.10.4",
1111
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz",
1112
+ "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==",
1113
+ "dev": true,
1114
+ "dependencies": {
1115
+ "@babel/helper-plugin-utils": "^7.10.4"
1116
+ },
1117
+ "peerDependencies": {
1118
+ "@babel/core": "^7.0.0-0"
1119
+ }
1120
+ },
1121
+ "node_modules/@babel/plugin-transform-unicode-escapes": {
1122
+ "version": "7.10.4",
1123
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz",
1124
+ "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==",
1125
+ "dev": true,
1126
+ "dependencies": {
1127
+ "@babel/helper-plugin-utils": "^7.10.4"
1128
+ },
1129
+ "peerDependencies": {
1130
+ "@babel/core": "^7.0.0-0"
1131
+ }
1132
+ },
1133
+ "node_modules/@babel/plugin-transform-unicode-regex": {
1134
+ "version": "7.10.4",
1135
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz",
1136
+ "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==",
1137
+ "dev": true,
1138
+ "dependencies": {
1139
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
1140
+ "@babel/helper-plugin-utils": "^7.10.4"
1141
+ },
1142
+ "peerDependencies": {
1143
+ "@babel/core": "^7.0.0-0"
1144
+ }
1145
+ },
1146
+ "node_modules/@babel/preset-env": {
1147
+ "version": "7.10.4",
1148
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.4.tgz",
1149
+ "integrity": "sha512-tcmuQ6vupfMZPrLrc38d0sF2OjLT3/bZ0dry5HchNCQbrokoQi4reXqclvkkAT5b+gWc23meVWpve5P/7+w/zw==",
1150
+ "dev": true,
1151
+ "dependencies": {
1152
+ "@babel/compat-data": "^7.10.4",
1153
+ "@babel/helper-compilation-targets": "^7.10.4",
1154
+ "@babel/helper-module-imports": "^7.10.4",
1155
+ "@babel/helper-plugin-utils": "^7.10.4",
1156
+ "@babel/plugin-proposal-async-generator-functions": "^7.10.4",
1157
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
1158
+ "@babel/plugin-proposal-dynamic-import": "^7.10.4",
1159
+ "@babel/plugin-proposal-json-strings": "^7.10.4",
1160
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
1161
+ "@babel/plugin-proposal-numeric-separator": "^7.10.4",
1162
+ "@babel/plugin-proposal-object-rest-spread": "^7.10.4",
1163
+ "@babel/plugin-proposal-optional-catch-binding": "^7.10.4",
1164
+ "@babel/plugin-proposal-optional-chaining": "^7.10.4",
1165
+ "@babel/plugin-proposal-private-methods": "^7.10.4",
1166
+ "@babel/plugin-proposal-unicode-property-regex": "^7.10.4",
1167
+ "@babel/plugin-syntax-async-generators": "^7.8.0",
1168
+ "@babel/plugin-syntax-class-properties": "^7.10.4",
1169
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0",
1170
+ "@babel/plugin-syntax-json-strings": "^7.8.0",
1171
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
1172
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4",
1173
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
1174
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
1175
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0",
1176
+ "@babel/plugin-syntax-top-level-await": "^7.10.4",
1177
+ "@babel/plugin-transform-arrow-functions": "^7.10.4",
1178
+ "@babel/plugin-transform-async-to-generator": "^7.10.4",
1179
+ "@babel/plugin-transform-block-scoped-functions": "^7.10.4",
1180
+ "@babel/plugin-transform-block-scoping": "^7.10.4",
1181
+ "@babel/plugin-transform-classes": "^7.10.4",
1182
+ "@babel/plugin-transform-computed-properties": "^7.10.4",
1183
+ "@babel/plugin-transform-destructuring": "^7.10.4",
1184
+ "@babel/plugin-transform-dotall-regex": "^7.10.4",
1185
+ "@babel/plugin-transform-duplicate-keys": "^7.10.4",
1186
+ "@babel/plugin-transform-exponentiation-operator": "^7.10.4",
1187
+ "@babel/plugin-transform-for-of": "^7.10.4",
1188
+ "@babel/plugin-transform-function-name": "^7.10.4",
1189
+ "@babel/plugin-transform-literals": "^7.10.4",
1190
+ "@babel/plugin-transform-member-expression-literals": "^7.10.4",
1191
+ "@babel/plugin-transform-modules-amd": "^7.10.4",
1192
+ "@babel/plugin-transform-modules-commonjs": "^7.10.4",
1193
+ "@babel/plugin-transform-modules-systemjs": "^7.10.4",
1194
+ "@babel/plugin-transform-modules-umd": "^7.10.4",
1195
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4",
1196
+ "@babel/plugin-transform-new-target": "^7.10.4",
1197
+ "@babel/plugin-transform-object-super": "^7.10.4",
1198
+ "@babel/plugin-transform-parameters": "^7.10.4",
1199
+ "@babel/plugin-transform-property-literals": "^7.10.4",
1200
+ "@babel/plugin-transform-regenerator": "^7.10.4",
1201
+ "@babel/plugin-transform-reserved-words": "^7.10.4",
1202
+ "@babel/plugin-transform-shorthand-properties": "^7.10.4",
1203
+ "@babel/plugin-transform-spread": "^7.10.4",
1204
+ "@babel/plugin-transform-sticky-regex": "^7.10.4",
1205
+ "@babel/plugin-transform-template-literals": "^7.10.4",
1206
+ "@babel/plugin-transform-typeof-symbol": "^7.10.4",
1207
+ "@babel/plugin-transform-unicode-escapes": "^7.10.4",
1208
+ "@babel/plugin-transform-unicode-regex": "^7.10.4",
1209
+ "@babel/preset-modules": "^0.1.3",
1210
+ "@babel/types": "^7.10.4",
1211
+ "browserslist": "^4.12.0",
1212
+ "core-js-compat": "^3.6.2",
1213
+ "invariant": "^2.2.2",
1214
+ "levenary": "^1.1.1",
1215
+ "semver": "^5.5.0"
1216
+ },
1217
+ "peerDependencies": {
1218
+ "@babel/core": "^7.0.0-0"
1219
+ }
1220
+ },
1221
+ "node_modules/@babel/preset-modules": {
1222
+ "version": "0.1.3",
1223
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz",
1224
+ "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==",
1225
+ "dev": true,
1226
+ "dependencies": {
1227
+ "@babel/helper-plugin-utils": "^7.0.0",
1228
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
1229
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
1230
+ "@babel/types": "^7.4.4",
1231
+ "esutils": "^2.0.2"
1232
+ },
1233
+ "peerDependencies": {
1234
+ "@babel/core": "^7.0.0-0"
1235
+ }
1236
+ },
1237
+ "node_modules/@babel/preset-react": {
1238
+ "version": "7.10.4",
1239
+ "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.10.4.tgz",
1240
+ "integrity": "sha512-BrHp4TgOIy4M19JAfO1LhycVXOPWdDbTRep7eVyatf174Hff+6Uk53sDyajqZPu8W1qXRBiYOfIamek6jA7YVw==",
1241
+ "dev": true,
1242
+ "dependencies": {
1243
+ "@babel/helper-plugin-utils": "^7.10.4",
1244
+ "@babel/plugin-transform-react-display-name": "^7.10.4",
1245
+ "@babel/plugin-transform-react-jsx": "^7.10.4",
1246
+ "@babel/plugin-transform-react-jsx-development": "^7.10.4",
1247
+ "@babel/plugin-transform-react-jsx-self": "^7.10.4",
1248
+ "@babel/plugin-transform-react-jsx-source": "^7.10.4",
1249
+ "@babel/plugin-transform-react-pure-annotations": "^7.10.4"
1250
+ },
1251
+ "peerDependencies": {
1252
+ "@babel/core": "^7.0.0-0"
1253
+ }
1254
+ },
1255
+ "node_modules/@babel/runtime": {
1256
+ "version": "7.10.5",
1257
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz",
1258
+ "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==",
1259
+ "dependencies": {
1260
+ "regenerator-runtime": "^0.13.4"
1261
+ }
1262
+ },
1263
+ "node_modules/@babel/template": {
1264
+ "version": "7.10.4",
1265
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
1266
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
1267
+ "dev": true,
1268
+ "dependencies": {
1269
+ "@babel/code-frame": "^7.10.4",
1270
+ "@babel/parser": "^7.10.4",
1271
+ "@babel/types": "^7.10.4"
1272
+ }
1273
+ },
1274
+ "node_modules/@babel/traverse": {
1275
+ "version": "7.10.5",
1276
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz",
1277
+ "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==",
1278
+ "dev": true,
1279
+ "dependencies": {
1280
+ "@babel/code-frame": "^7.10.4",
1281
+ "@babel/generator": "^7.10.5",
1282
+ "@babel/helper-function-name": "^7.10.4",
1283
+ "@babel/helper-split-export-declaration": "^7.10.4",
1284
+ "@babel/parser": "^7.10.5",
1285
+ "@babel/types": "^7.10.5",
1286
+ "debug": "^4.1.0",
1287
+ "globals": "^11.1.0",
1288
+ "lodash": "^4.17.19"
1289
+ }
1290
+ },
1291
+ "node_modules/@babel/types": {
1292
+ "version": "7.10.5",
1293
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz",
1294
+ "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==",
1295
+ "dev": true,
1296
+ "dependencies": {
1297
+ "@babel/helper-validator-identifier": "^7.10.4",
1298
+ "lodash": "^4.17.19",
1299
+ "to-fast-properties": "^2.0.0"
1300
+ }
1301
+ },
1302
+ "node_modules/@tannin/compile": {
1303
+ "version": "1.1.0",
1304
+ "resolved": "https://registry.npmjs.org/@tannin/compile/-/compile-1.1.0.tgz",
1305
+ "integrity": "sha512-n8m9eNDfoNZoxdvWiTfW/hSPhehzLJ3zW7f8E7oT6mCROoMNWCB4TYtv041+2FMAxweiE0j7i1jubQU4MEC/Gg==",
1306
+ "dependencies": {
1307
+ "@tannin/evaluate": "^1.2.0",
1308
+ "@tannin/postfix": "^1.1.0"
1309
+ }
1310
+ },
1311
+ "node_modules/@tannin/evaluate": {
1312
+ "version": "1.2.0",
1313
+ "resolved": "https://registry.npmjs.org/@tannin/evaluate/-/evaluate-1.2.0.tgz",
1314
+ "integrity": "sha512-3ioXvNowbO/wSrxsDG5DKIMxC81P0QrQTYai8zFNY+umuoHWRPbQ/TuuDEOju9E+jQDXmj6yI5GyejNuh8I+eg=="
1315
+ },
1316
+ "node_modules/@tannin/plural-forms": {
1317
+ "version": "1.1.0",
1318
+ "resolved": "https://registry.npmjs.org/@tannin/plural-forms/-/plural-forms-1.1.0.tgz",
1319
+ "integrity": "sha512-xl9R2mDZO/qiHam1AgMnAES6IKIg7OBhcXqy6eDsRCdXuxAFPcjrej9HMjyCLE0DJ/8cHf0i5OQTstuBRhpbHw==",
1320
+ "dependencies": {
1321
+ "@tannin/compile": "^1.1.0"
1322
+ }
1323
+ },
1324
+ "node_modules/@tannin/postfix": {
1325
+ "version": "1.1.0",
1326
+ "resolved": "https://registry.npmjs.org/@tannin/postfix/-/postfix-1.1.0.tgz",
1327
+ "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw=="
1328
+ },
1329
+ "node_modules/@types/json-schema": {
1330
+ "version": "7.0.5",
1331
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz",
1332
+ "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==",
1333
+ "dev": true
1334
+ },
1335
+ "node_modules/@webassemblyjs/ast": {
1336
+ "version": "1.9.0",
1337
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
1338
+ "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==",
1339
+ "dev": true,
1340
+ "dependencies": {
1341
+ "@webassemblyjs/helper-module-context": "1.9.0",
1342
+ "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
1343
+ "@webassemblyjs/wast-parser": "1.9.0"
1344
+ }
1345
+ },
1346
+ "node_modules/@webassemblyjs/floating-point-hex-parser": {
1347
+ "version": "1.9.0",
1348
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz",
1349
+ "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==",
1350
+ "dev": true
1351
+ },
1352
+ "node_modules/@webassemblyjs/helper-api-error": {
1353
+ "version": "1.9.0",
1354
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz",
1355
+ "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==",
1356
+ "dev": true
1357
+ },
1358
+ "node_modules/@webassemblyjs/helper-buffer": {
1359
+ "version": "1.9.0",
1360
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz",
1361
+ "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==",
1362
+ "dev": true
1363
+ },
1364
+ "node_modules/@webassemblyjs/helper-code-frame": {
1365
+ "version": "1.9.0",
1366
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz",
1367
+ "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==",
1368
+ "dev": true,
1369
+ "dependencies": {
1370
+ "@webassemblyjs/wast-printer": "1.9.0"
1371
+ }
1372
+ },
1373
+ "node_modules/@webassemblyjs/helper-fsm": {
1374
+ "version": "1.9.0",
1375
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz",
1376
+ "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==",
1377
+ "dev": true
1378
+ },
1379
+ "node_modules/@webassemblyjs/helper-module-context": {
1380
+ "version": "1.9.0",
1381
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz",
1382
+ "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==",
1383
+ "dev": true,
1384
+ "dependencies": {
1385
+ "@webassemblyjs/ast": "1.9.0"
1386
+ }
1387
+ },
1388
+ "node_modules/@webassemblyjs/helper-wasm-bytecode": {
1389
+ "version": "1.9.0",
1390
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz",
1391
+ "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==",
1392
+ "dev": true
1393
+ },
1394
+ "node_modules/@webassemblyjs/helper-wasm-section": {
1395
+ "version": "1.9.0",
1396
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz",
1397
+ "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==",
1398
+ "dev": true,
1399
+ "dependencies": {
1400
+ "@webassemblyjs/ast": "1.9.0",
1401
+ "@webassemblyjs/helper-buffer": "1.9.0",
1402
+ "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
1403
+ "@webassemblyjs/wasm-gen": "1.9.0"
1404
+ }
1405
+ },
1406
+ "node_modules/@webassemblyjs/ieee754": {
1407
+ "version": "1.9.0",
1408
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz",
1409
+ "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==",
1410
+ "dev": true,
1411
+ "dependencies": {
1412
+ "@xtuc/ieee754": "^1.2.0"
1413
+ }
1414
+ },
1415
+ "node_modules/@webassemblyjs/leb128": {
1416
+ "version": "1.9.0",
1417
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz",
1418
+ "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==",
1419
+ "dev": true,
1420
+ "dependencies": {
1421
+ "@xtuc/long": "4.2.2"
1422
+ }
1423
+ },
1424
+ "node_modules/@webassemblyjs/utf8": {
1425
+ "version": "1.9.0",
1426
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz",
1427
+ "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==",
1428
+ "dev": true
1429
+ },
1430
+ "node_modules/@webassemblyjs/wasm-edit": {
1431
+ "version": "1.9.0",
1432
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz",
1433
+ "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==",
1434
+ "dev": true,
1435
+ "dependencies": {
1436
+ "@webassemblyjs/ast": "1.9.0",
1437
+ "@webassemblyjs/helper-buffer": "1.9.0",
1438
+ "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
1439
+ "@webassemblyjs/helper-wasm-section": "1.9.0",
1440
+ "@webassemblyjs/wasm-gen": "1.9.0",
1441
+ "@webassemblyjs/wasm-opt": "1.9.0",
1442
+ "@webassemblyjs/wasm-parser": "1.9.0",
1443
+ "@webassemblyjs/wast-printer": "1.9.0"
1444
+ }
1445
+ },
1446
+ "node_modules/@webassemblyjs/wasm-gen": {
1447
+ "version": "1.9.0",
1448
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz",
1449
+ "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==",
1450
+ "dev": true,
1451
+ "dependencies": {
1452
+ "@webassemblyjs/ast": "1.9.0",
1453
+ "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
1454
+ "@webassemblyjs/ieee754": "1.9.0",
1455
+ "@webassemblyjs/leb128": "1.9.0",
1456
+ "@webassemblyjs/utf8": "1.9.0"
1457
+ }
1458
+ },
1459
+ "node_modules/@webassemblyjs/wasm-opt": {
1460
+ "version": "1.9.0",
1461
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz",
1462
+ "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==",
1463
+ "dev": true,
1464
+ "dependencies": {
1465
+ "@webassemblyjs/ast": "1.9.0",
1466
+ "@webassemblyjs/helper-buffer": "1.9.0",
1467
+ "@webassemblyjs/wasm-gen": "1.9.0",
1468
+ "@webassemblyjs/wasm-parser": "1.9.0"
1469
+ }
1470
+ },
1471
+ "node_modules/@webassemblyjs/wasm-parser": {
1472
+ "version": "1.9.0",
1473
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz",
1474
+ "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==",
1475
+ "dev": true,
1476
+ "dependencies": {
1477
+ "@webassemblyjs/ast": "1.9.0",
1478
+ "@webassemblyjs/helper-api-error": "1.9.0",
1479
+ "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
1480
+ "@webassemblyjs/ieee754": "1.9.0",
1481
+ "@webassemblyjs/leb128": "1.9.0",
1482
+ "@webassemblyjs/utf8": "1.9.0"
1483
+ }
1484
+ },
1485
+ "node_modules/@webassemblyjs/wast-parser": {
1486
+ "version": "1.9.0",
1487
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz",
1488
+ "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==",
1489
+ "dev": true,
1490
+ "dependencies": {
1491
+ "@webassemblyjs/ast": "1.9.0",
1492
+ "@webassemblyjs/floating-point-hex-parser": "1.9.0",
1493
+ "@webassemblyjs/helper-api-error": "1.9.0",
1494
+ "@webassemblyjs/helper-code-frame": "1.9.0",
1495
+ "@webassemblyjs/helper-fsm": "1.9.0",
1496
+ "@xtuc/long": "4.2.2"
1497
+ }
1498
+ },
1499
+ "node_modules/@webassemblyjs/wast-printer": {
1500
+ "version": "1.9.0",
1501
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz",
1502
+ "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==",
1503
+ "dev": true,
1504
+ "dependencies": {
1505
+ "@webassemblyjs/ast": "1.9.0",
1506
+ "@webassemblyjs/wast-parser": "1.9.0",
1507
+ "@xtuc/long": "4.2.2"
1508
+ }
1509
+ },
1510
+ "node_modules/@wordpress/api-fetch": {
1511
+ "version": "3.18.0",
1512
+ "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-3.18.0.tgz",
1513
+ "integrity": "sha512-sNT/9yOC9G/G/6QOd4b1d4tckwWS1IrLVulxRFcyhBSorB0XCu07j40nQxhrPKANgi8dLawke4hlfJdlQ9CSZQ==",
1514
+ "dependencies": {
1515
+ "@babel/runtime": "^7.9.2",
1516
+ "@wordpress/i18n": "^3.14.0",
1517
+ "@wordpress/url": "^2.17.0"
1518
+ }
1519
+ },
1520
+ "node_modules/@wordpress/i18n": {
1521
+ "version": "3.14.0",
1522
+ "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.14.0.tgz",
1523
+ "integrity": "sha512-FQbSggdvkdS+IWMNhTl3n1nThqfzAPxORvoFpjDma7DOwuRKOA8iPyomwacfeG/krAeaurj1DIDzDvZh9Ex79w==",
1524
+ "dependencies": {
1525
+ "@babel/runtime": "^7.9.2",
1526
+ "gettext-parser": "^1.3.1",
1527
+ "lodash": "^4.17.15",
1528
+ "memize": "^1.1.0",
1529
+ "sprintf-js": "^1.1.1",
1530
+ "tannin": "^1.2.0"
1531
+ },
1532
+ "bin": {
1533
+ "pot-to-php": "tools/pot-to-php.js"
1534
+ }
1535
+ },
1536
+ "node_modules/@wordpress/url": {
1537
+ "version": "2.17.0",
1538
+ "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.17.0.tgz",
1539
+ "integrity": "sha512-4OBUy8IKZlobXe41GASw+p5xP/Nvh+HSzfhTN+BU0OggnIsXvZpf0iBYRYGp6M60ne8MkeEoQg9rMM22Osh9Cg==",
1540
+ "dependencies": {
1541
+ "@babel/runtime": "^7.9.2",
1542
+ "lodash": "^4.17.15",
1543
+ "qs": "^6.5.2",
1544
+ "react-native-url-polyfill": "^1.1.2"
1545
+ }
1546
+ },
1547
+ "node_modules/@xtuc/ieee754": {
1548
+ "version": "1.2.0",
1549
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
1550
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
1551
+ "dev": true
1552
+ },
1553
+ "node_modules/@xtuc/long": {
1554
+ "version": "4.2.2",
1555
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
1556
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
1557
+ "dev": true
1558
+ },
1559
+ "node_modules/acorn": {
1560
+ "version": "6.4.1",
1561
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
1562
+ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
1563
+ "dev": true,
1564
+ "bin": {
1565
+ "acorn": "bin/acorn"
1566
+ },
1567
+ "engines": {
1568
+ "node": ">=0.4.0"
1569
+ }
1570
+ },
1571
+ "node_modules/ajv": {
1572
+ "version": "6.12.3",
1573
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
1574
+ "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
1575
+ "dev": true,
1576
+ "dependencies": {
1577
+ "fast-deep-equal": "^3.1.1",
1578
+ "fast-json-stable-stringify": "^2.0.0",
1579
+ "json-schema-traverse": "^0.4.1",
1580
+ "uri-js": "^4.2.2"
1581
+ },
1582
+ "funding": {
1583
+ "type": "github",
1584
+ "url": "https://github.com/sponsors/epoberezkin"
1585
+ }
1586
+ },
1587
+ "node_modules/ajv-errors": {
1588
+ "version": "1.0.1",
1589
+ "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
1590
+ "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
1591
+ "dev": true,
1592
+ "peerDependencies": {
1593
+ "ajv": ">=5.0.0"
1594
+ }
1595
+ },
1596
+ "node_modules/ajv-keywords": {
1597
+ "version": "3.5.1",
1598
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz",
1599
+ "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==",
1600
+ "dev": true,
1601
+ "peerDependencies": {
1602
+ "ajv": "^6.9.1"
1603
+ }
1604
+ },
1605
+ "node_modules/ansi-regex": {
1606
+ "version": "4.1.0",
1607
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1608
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1609
+ "dev": true,
1610
+ "engines": {
1611
+ "node": ">=6"
1612
+ }
1613
+ },
1614
+ "node_modules/ansi-styles": {
1615
+ "version": "3.2.1",
1616
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1617
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
1618
+ "dev": true,
1619
+ "dependencies": {
1620
+ "color-convert": "^1.9.0"
1621
+ },
1622
+ "engines": {
1623
+ "node": ">=4"
1624
+ }
1625
+ },
1626
+ "node_modules/anymatch": {
1627
+ "version": "3.1.1",
1628
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
1629
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
1630
+ "dev": true,
1631
+ "optional": true,
1632
+ "dependencies": {
1633
+ "normalize-path": "^3.0.0",
1634
+ "picomatch": "^2.0.4"
1635
+ },
1636
+ "engines": {
1637
+ "node": ">= 8"
1638
+ }
1639
+ },
1640
+ "node_modules/aproba": {
1641
+ "version": "1.2.0",
1642
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
1643
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
1644
+ "dev": true
1645
+ },
1646
+ "node_modules/arr-diff": {
1647
+ "version": "4.0.0",
1648
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
1649
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
1650
+ "dev": true,
1651
+ "engines": {
1652
+ "node": ">=0.10.0"
1653
+ }
1654
+ },
1655
+ "node_modules/arr-flatten": {
1656
+ "version": "1.1.0",
1657
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
1658
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
1659
+ "dev": true,
1660
+ "engines": {
1661
+ "node": ">=0.10.0"
1662
+ }
1663
+ },
1664
+ "node_modules/arr-union": {
1665
+ "version": "3.1.0",
1666
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
1667
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
1668
+ "dev": true,
1669
+ "engines": {
1670
+ "node": ">=0.10.0"
1671
+ }
1672
+ },
1673
+ "node_modules/array-unique": {
1674
+ "version": "0.3.2",
1675
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
1676
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
1677
+ "dev": true,
1678
+ "engines": {
1679
+ "node": ">=0.10.0"
1680
+ }
1681
+ },
1682
+ "node_modules/asn1.js": {
1683
+ "version": "4.10.1",
1684
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
1685
+ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
1686
+ "dev": true,
1687
+ "dependencies": {
1688
+ "bn.js": "^4.0.0",
1689
+ "inherits": "^2.0.1",
1690
+ "minimalistic-assert": "^1.0.0"
1691
+ }
1692
+ },
1693
+ "node_modules/asn1.js/node_modules/bn.js": {
1694
+ "version": "4.11.9",
1695
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
1696
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
1697
+ "dev": true
1698
+ },
1699
+ "node_modules/assert": {
1700
+ "version": "1.5.0",
1701
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
1702
+ "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
1703
+ "dev": true,
1704
+ "dependencies": {
1705
+ "object-assign": "^4.1.1",
1706
+ "util": "0.10.3"
1707
+ }
1708
+ },
1709
+ "node_modules/assert/node_modules/inherits": {
1710
+ "version": "2.0.1",
1711
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
1712
+ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
1713
+ "dev": true
1714
+ },
1715
+ "node_modules/assert/node_modules/util": {
1716
+ "version": "0.10.3",
1717
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
1718
+ "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
1719
+ "dev": true,
1720
+ "dependencies": {
1721
+ "inherits": "2.0.1"
1722
+ }
1723
+ },
1724
+ "node_modules/assign-symbols": {
1725
+ "version": "1.0.0",
1726
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
1727
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
1728
+ "dev": true,
1729
+ "engines": {
1730
+ "node": ">=0.10.0"
1731
+ }
1732
+ },
1733
+ "node_modules/async-each": {
1734
+ "version": "1.0.3",
1735
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
1736
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
1737
+ "dev": true,
1738
+ "optional": true
1739
+ },
1740
+ "node_modules/atob": {
1741
+ "version": "2.1.2",
1742
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
1743
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
1744
+ "dev": true,
1745
+ "bin": {
1746
+ "atob": "bin/atob.js"
1747
+ },
1748
+ "engines": {
1749
+ "node": ">= 4.5.0"
1750
+ }
1751
+ },
1752
+ "node_modules/axios": {
1753
+ "version": "0.21.1",
1754
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
1755
+ "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
1756
+ "dependencies": {
1757
+ "follow-redirects": "^1.10.0"
1758
+ }
1759
+ },
1760
+ "node_modules/babel-loader": {
1761
+ "version": "8.1.0",
1762
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz",
1763
+ "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==",
1764
+ "dev": true,
1765
+ "dependencies": {
1766
+ "find-cache-dir": "^2.1.0",
1767
+ "loader-utils": "^1.4.0",
1768
+ "mkdirp": "^0.5.3",
1769
+ "pify": "^4.0.1",
1770
+ "schema-utils": "^2.6.5"
1771
+ },
1772
+ "engines": {
1773
+ "node": ">= 6.9"
1774
+ },
1775
+ "peerDependencies": {
1776
+ "@babel/core": "^7.0.0",
1777
+ "webpack": ">=2"
1778
+ }
1779
+ },
1780
+ "node_modules/babel-plugin-dynamic-import-node": {
1781
+ "version": "2.3.3",
1782
+ "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
1783
+ "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
1784
+ "dev": true,
1785
+ "dependencies": {
1786
+ "object.assign": "^4.1.0"
1787
+ }
1788
+ },
1789
+ "node_modules/balanced-match": {
1790
+ "version": "1.0.0",
1791
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
1792
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
1793
+ "dev": true
1794
+ },
1795
+ "node_modules/base": {
1796
+ "version": "0.11.2",
1797
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
1798
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
1799
+ "dev": true,
1800
+ "dependencies": {
1801
+ "cache-base": "^1.0.1",
1802
+ "class-utils": "^0.3.5",
1803
+ "component-emitter": "^1.2.1",
1804
+ "define-property": "^1.0.0",
1805
+ "isobject": "^3.0.1",
1806
+ "mixin-deep": "^1.2.0",
1807
+ "pascalcase": "^0.1.1"
1808
+ },
1809
+ "engines": {
1810
+ "node": ">=0.10.0"
1811
+ }
1812
+ },
1813
+ "node_modules/base/node_modules/define-property": {
1814
+ "version": "1.0.0",
1815
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
1816
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
1817
+ "dev": true,
1818
+ "dependencies": {
1819
+ "is-descriptor": "^1.0.0"
1820
+ },
1821
+ "engines": {
1822
+ "node": ">=0.10.0"
1823
+ }
1824
+ },
1825
+ "node_modules/base/node_modules/is-accessor-descriptor": {
1826
+ "version": "1.0.0",
1827
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
1828
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
1829
+ "dev": true,
1830
+ "dependencies": {
1831
+ "kind-of": "^6.0.0"
1832
+ },
1833
+ "engines": {
1834
+ "node": ">=0.10.0"
1835
+ }
1836
+ },
1837
+ "node_modules/base/node_modules/is-data-descriptor": {
1838
+ "version": "1.0.0",
1839
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
1840
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
1841
+ "dev": true,
1842
+ "dependencies": {
1843
+ "kind-of": "^6.0.0"
1844
+ },
1845
+ "engines": {
1846
+ "node": ">=0.10.0"
1847
+ }
1848
+ },
1849
+ "node_modules/base/node_modules/is-descriptor": {
1850
+ "version": "1.0.2",
1851
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
1852
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
1853
+ "dev": true,
1854
+ "dependencies": {
1855
+ "is-accessor-descriptor": "^1.0.0",
1856
+ "is-data-descriptor": "^1.0.0",
1857
+ "kind-of": "^6.0.2"
1858
+ },
1859
+ "engines": {
1860
+ "node": ">=0.10.0"
1861
+ }
1862
+ },
1863
+ "node_modules/base64-js": {
1864
+ "version": "1.3.1",
1865
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
1866
+ "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
1867
+ },
1868
+ "node_modules/big.js": {
1869
+ "version": "5.2.2",
1870
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
1871
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
1872
+ "dev": true,
1873
+ "engines": {
1874
+ "node": "*"
1875
+ }
1876
+ },
1877
+ "node_modules/binary-extensions": {
1878
+ "version": "2.1.0",
1879
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
1880
+ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
1881
+ "dev": true,
1882
+ "optional": true,
1883
+ "engines": {
1884
+ "node": ">=8"
1885
+ }
1886
+ },
1887
+ "node_modules/bindings": {
1888
+ "version": "1.5.0",
1889
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
1890
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
1891
+ "dev": true,
1892
+ "optional": true,
1893
+ "dependencies": {
1894
+ "file-uri-to-path": "1.0.0"
1895
+ }
1896
+ },
1897
+ "node_modules/bluebird": {
1898
+ "version": "3.7.2",
1899
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
1900
+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
1901
+ "dev": true
1902
+ },
1903
+ "node_modules/bn.js": {
1904
+ "version": "5.1.2",
1905
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz",
1906
+ "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==",
1907
+ "dev": true
1908
+ },
1909
+ "node_modules/brace-expansion": {
1910
+ "version": "1.1.11",
1911
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
1912
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
1913
+ "dev": true,
1914
+ "dependencies": {
1915
+ "balanced-match": "^1.0.0",
1916
+ "concat-map": "0.0.1"
1917
+ }
1918
+ },
1919
+ "node_modules/braces": {
1920
+ "version": "2.3.2",
1921
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
1922
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
1923
+ "dev": true,
1924
+ "dependencies": {
1925
+ "arr-flatten": "^1.1.0",
1926
+ "array-unique": "^0.3.2",
1927
+ "extend-shallow": "^2.0.1",
1928
+ "fill-range": "^4.0.0",
1929
+ "isobject": "^3.0.1",
1930
+ "repeat-element": "^1.1.2",
1931
+ "snapdragon": "^0.8.1",
1932
+ "snapdragon-node": "^2.0.1",
1933
+ "split-string": "^3.0.2",
1934
+ "to-regex": "^3.0.1"
1935
+ },
1936
+ "engines": {
1937
+ "node": ">=0.10.0"
1938
+ }
1939
+ },
1940
+ "node_modules/braces/node_modules/extend-shallow": {
1941
+ "version": "2.0.1",
1942
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1943
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1944
+ "dev": true,
1945
+ "dependencies": {
1946
+ "is-extendable": "^0.1.0"
1947
+ },
1948
+ "engines": {
1949
+ "node": ">=0.10.0"
1950
+ }
1951
+ },
1952
+ "node_modules/brorand": {
1953
+ "version": "1.1.0",
1954
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
1955
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
1956
+ "dev": true
1957
+ },
1958
+ "node_modules/browserify-aes": {
1959
+ "version": "1.2.0",
1960
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
1961
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
1962
+ "dev": true,
1963
+ "dependencies": {
1964
+ "buffer-xor": "^1.0.3",
1965
+ "cipher-base": "^1.0.0",
1966
+ "create-hash": "^1.1.0",
1967
+ "evp_bytestokey": "^1.0.3",
1968
+ "inherits": "^2.0.1",
1969
+ "safe-buffer": "^5.0.1"
1970
+ }
1971
+ },
1972
+ "node_modules/browserify-cipher": {
1973
+ "version": "1.0.1",
1974
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
1975
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
1976
+ "dev": true,
1977
+ "dependencies": {
1978
+ "browserify-aes": "^1.0.4",
1979
+ "browserify-des": "^1.0.0",
1980
+ "evp_bytestokey": "^1.0.0"
1981
+ }
1982
+ },
1983
+ "node_modules/browserify-des": {
1984
+ "version": "1.0.2",
1985
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
1986
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
1987
+ "dev": true,
1988
+ "dependencies": {
1989
+ "cipher-base": "^1.0.1",
1990
+ "des.js": "^1.0.0",
1991
+ "inherits": "^2.0.1",
1992
+ "safe-buffer": "^5.1.2"
1993
+ }
1994
+ },
1995
+ "node_modules/browserify-rsa": {
1996
+ "version": "4.0.1",
1997
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
1998
+ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
1999
+ "dev": true,
2000
+ "dependencies": {
2001
+ "bn.js": "^4.1.0",
2002
+ "randombytes": "^2.0.1"
2003
+ }
2004
+ },
2005
+ "node_modules/browserify-rsa/node_modules/bn.js": {
2006
+ "version": "4.11.9",
2007
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
2008
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
2009
+ "dev": true
2010
+ },
2011
+ "node_modules/browserify-sign": {
2012
+ "version": "4.2.0",
2013
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz",
2014
+ "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==",
2015
+ "dev": true,
2016
+ "dependencies": {
2017
+ "bn.js": "^5.1.1",
2018
+ "browserify-rsa": "^4.0.1",
2019
+ "create-hash": "^1.2.0",
2020
+ "create-hmac": "^1.1.7",
2021
+ "elliptic": "^6.5.2",
2022
+ "inherits": "^2.0.4",
2023
+ "parse-asn1": "^5.1.5",
2024
+ "readable-stream": "^3.6.0",
2025
+ "safe-buffer": "^5.2.0"
2026
+ }
2027
+ },
2028
+ "node_modules/browserify-sign/node_modules/readable-stream": {
2029
+ "version": "3.6.0",
2030
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
2031
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
2032
+ "dev": true,
2033
+ "dependencies": {
2034
+ "inherits": "^2.0.3",
2035
+ "string_decoder": "^1.1.1",
2036
+ "util-deprecate": "^1.0.1"
2037
+ },
2038
+ "engines": {
2039
+ "node": ">= 6"
2040
+ }
2041
+ },
2042
+ "node_modules/browserify-sign/node_modules/safe-buffer": {
2043
+ "version": "5.2.1",
2044
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
2045
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
2046
+ "dev": true,
2047
+ "funding": [
2048
+ {
2049
+ "type": "github",
2050
+ "url": "https://github.com/sponsors/feross"
2051
+ },
2052
+ {
2053
+ "type": "patreon",
2054
+ "url": "https://www.patreon.com/feross"
2055
+ },
2056
+ {
2057
+ "type": "consulting",
2058
+ "url": "https://feross.org/support"
2059
+ }
2060
+ ]
2061
+ },
2062
+ "node_modules/browserify-zlib": {
2063
+ "version": "0.2.0",
2064
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
2065
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
2066
+ "dev": true,
2067
+ "dependencies": {
2068
+ "pako": "~1.0.5"
2069
+ }
2070
+ },
2071
+ "node_modules/browserslist": {
2072
+ "version": "4.13.0",
2073
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz",
2074
+ "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==",
2075
+ "dev": true,
2076
+ "dependencies": {
2077
+ "caniuse-lite": "^1.0.30001093",
2078
+ "electron-to-chromium": "^1.3.488",
2079
+ "escalade": "^3.0.1",
2080
+ "node-releases": "^1.1.58"
2081
+ },
2082
+ "bin": {
2083
+ "browserslist": "cli.js"
2084
+ },
2085
+ "engines": {
2086
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
2087
+ },
2088
+ "funding": {
2089
+ "type": "tidelift",
2090
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
2091
+ }
2092
+ },
2093
+ "node_modules/buffer": {
2094
+ "version": "5.6.0",
2095
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
2096
+ "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
2097
+ "dependencies": {
2098
+ "base64-js": "^1.0.2",
2099
+ "ieee754": "^1.1.4"
2100
+ }
2101
+ },
2102
+ "node_modules/buffer-from": {
2103
+ "version": "1.1.1",
2104
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
2105
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
2106
+ "dev": true
2107
+ },
2108
+ "node_modules/buffer-xor": {
2109
+ "version": "1.0.3",
2110
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
2111
+ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
2112
+ "dev": true
2113
+ },
2114
+ "node_modules/builtin-status-codes": {
2115
+ "version": "3.0.0",
2116
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
2117
+ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
2118
+ "dev": true
2119
+ },
2120
+ "node_modules/cacache": {
2121
+ "version": "12.0.4",
2122
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz",
2123
+ "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==",
2124
+ "dev": true,
2125
+ "dependencies": {
2126
+ "bluebird": "^3.5.5",
2127
+ "chownr": "^1.1.1",
2128
+ "figgy-pudding": "^3.5.1",
2129
+ "glob": "^7.1.4",
2130
+ "graceful-fs": "^4.1.15",
2131
+ "infer-owner": "^1.0.3",
2132
+ "lru-cache": "^5.1.1",
2133
+ "mississippi": "^3.0.0",
2134
+ "mkdirp": "^0.5.1",
2135
+ "move-concurrently": "^1.0.1",
2136
+ "promise-inflight": "^1.0.1",
2137
+ "rimraf": "^2.6.3",
2138
+ "ssri": "^6.0.1",
2139
+ "unique-filename": "^1.1.1",
2140
+ "y18n": "^4.0.0"
2141
+ }
2142
+ },
2143
+ "node_modules/cache-base": {
2144
+ "version": "1.0.1",
2145
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
2146
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
2147
+ "dev": true,
2148
+ "dependencies": {
2149
+ "collection-visit": "^1.0.0",
2150
+ "component-emitter": "^1.2.1",
2151
+ "get-value": "^2.0.6",
2152
+ "has-value": "^1.0.0",
2153
+ "isobject": "^3.0.1",
2154
+ "set-value": "^2.0.0",
2155
+ "to-object-path": "^0.3.0",
2156
+ "union-value": "^1.0.0",
2157
+ "unset-value": "^1.0.0"
2158
+ },
2159
+ "engines": {
2160
+ "node": ">=0.10.0"
2161
+ }
2162
+ },
2163
+ "node_modules/camelcase": {
2164
+ "version": "5.3.1",
2165
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
2166
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
2167
+ "dev": true,
2168
+ "engines": {
2169
+ "node": ">=6"
2170
+ }
2171
+ },
2172
+ "node_modules/caniuse-lite": {
2173
+ "version": "1.0.30001100",
2174
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001100.tgz",
2175
+ "integrity": "sha512-0eYdp1+wFCnMlCj2oudciuQn2B9xAFq3WpgpcBIZTxk/1HNA/O2YA7rpeYhnOqsqAJq1AHUgx6i1jtafg7m2zA==",
2176
+ "dev": true
2177
+ },
2178
+ "node_modules/chalk": {
2179
+ "version": "2.4.2",
2180
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2181
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2182
+ "dev": true,
2183
+ "dependencies": {
2184
+ "ansi-styles": "^3.2.1",
2185
+ "escape-string-regexp": "^1.0.5",
2186
+ "supports-color": "^5.3.0"
2187
+ },
2188
+ "engines": {
2189
+ "node": ">=4"
2190
+ }
2191
+ },
2192
+ "node_modules/chokidar": {
2193
+ "version": "3.4.0",
2194
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
2195
+ "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
2196
+ "dev": true,
2197
+ "optional": true,
2198
+ "dependencies": {
2199
+ "anymatch": "~3.1.1",
2200
+ "braces": "~3.0.2",
2201
+ "glob-parent": "~5.1.0",
2202
+ "is-binary-path": "~2.1.0",
2203
+ "is-glob": "~4.0.1",
2204
+ "normalize-path": "~3.0.0",
2205
+ "readdirp": "~3.4.0"
2206
+ },
2207
+ "engines": {
2208
+ "node": ">= 8.10.0"
2209
+ },
2210
+ "optionalDependencies": {
2211
+ "fsevents": "~2.1.2"
2212
+ }
2213
+ },
2214
+ "node_modules/chokidar/node_modules/braces": {
2215
+ "version": "3.0.2",
2216
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
2217
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
2218
+ "dev": true,
2219
+ "optional": true,
2220
+ "dependencies": {
2221
+ "fill-range": "^7.0.1"
2222
+ },
2223
+ "engines": {
2224
+ "node": ">=8"
2225
+ }
2226
+ },
2227
+ "node_modules/chokidar/node_modules/fill-range": {
2228
+ "version": "7.0.1",
2229
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
2230
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
2231
+ "dev": true,
2232
+ "optional": true,
2233
+ "dependencies": {
2234
+ "to-regex-range": "^5.0.1"
2235
+ },
2236
+ "engines": {
2237
+ "node": ">=8"
2238
+ }
2239
+ },
2240
+ "node_modules/chokidar/node_modules/is-number": {
2241
+ "version": "7.0.0",
2242
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
2243
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
2244
+ "dev": true,
2245
+ "optional": true,
2246
+ "engines": {
2247
+ "node": ">=0.12.0"
2248
+ }
2249
+ },
2250
+ "node_modules/chokidar/node_modules/to-regex-range": {
2251
+ "version": "5.0.1",
2252
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
2253
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
2254
+ "dev": true,
2255
+ "optional": true,
2256
+ "dependencies": {
2257
+ "is-number": "^7.0.0"
2258
+ },
2259
+ "engines": {
2260
+ "node": ">=8.0"
2261
+ }
2262
+ },
2263
+ "node_modules/chownr": {
2264
+ "version": "1.1.4",
2265
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
2266
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
2267
+ "dev": true
2268
+ },
2269
+ "node_modules/chrome-trace-event": {
2270
+ "version": "1.0.2",
2271
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz",
2272
+ "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==",
2273
+ "dev": true,
2274
+ "dependencies": {
2275
+ "tslib": "^1.9.0"
2276
+ },
2277
+ "engines": {
2278
+ "node": ">=6.0"
2279
+ }
2280
+ },
2281
+ "node_modules/cipher-base": {
2282
+ "version": "1.0.4",
2283
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
2284
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
2285
+ "dev": true,
2286
+ "dependencies": {
2287
+ "inherits": "^2.0.1",
2288
+ "safe-buffer": "^5.0.1"
2289
+ }
2290
+ },
2291
+ "node_modules/class-utils": {
2292
+ "version": "0.3.6",
2293
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
2294
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
2295
+ "dev": true,
2296
+ "dependencies": {
2297
+ "arr-union": "^3.1.0",
2298
+ "define-property": "^0.2.5",
2299
+ "isobject": "^3.0.0",
2300
+ "static-extend": "^0.1.1"
2301
+ },
2302
+ "engines": {
2303
+ "node": ">=0.10.0"
2304
+ }
2305
+ },
2306
+ "node_modules/class-utils/node_modules/define-property": {
2307
+ "version": "0.2.5",
2308
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2309
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2310
+ "dev": true,
2311
+ "dependencies": {
2312
+ "is-descriptor": "^0.1.0"
2313
+ },
2314
+ "engines": {
2315
+ "node": ">=0.10.0"
2316
+ }
2317
+ },
2318
+ "node_modules/cliui": {
2319
+ "version": "5.0.0",
2320
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
2321
+ "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
2322
+ "dev": true,
2323
+ "dependencies": {
2324
+ "string-width": "^3.1.0",
2325
+ "strip-ansi": "^5.2.0",
2326
+ "wrap-ansi": "^5.1.0"
2327
+ }
2328
+ },
2329
+ "node_modules/collection-visit": {
2330
+ "version": "1.0.0",
2331
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
2332
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
2333
+ "dev": true,
2334
+ "dependencies": {
2335
+ "map-visit": "^1.0.0",
2336
+ "object-visit": "^1.0.0"
2337
+ },
2338
+ "engines": {
2339
+ "node": ">=0.10.0"
2340
+ }
2341
+ },
2342
+ "node_modules/color-convert": {
2343
+ "version": "1.9.3",
2344
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
2345
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
2346
+ "dev": true,
2347
+ "dependencies": {
2348
+ "color-name": "1.1.3"
2349
+ }
2350
+ },
2351
+ "node_modules/color-name": {
2352
+ "version": "1.1.3",
2353
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
2354
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
2355
+ "dev": true
2356
+ },
2357
+ "node_modules/commander": {
2358
+ "version": "2.20.3",
2359
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
2360
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
2361
+ "dev": true
2362
+ },
2363
+ "node_modules/commondir": {
2364
+ "version": "1.0.1",
2365
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
2366
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
2367
+ "dev": true
2368
+ },
2369
+ "node_modules/component-emitter": {
2370
+ "version": "1.3.0",
2371
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
2372
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
2373
+ "dev": true
2374
+ },
2375
+ "node_modules/concat-map": {
2376
+ "version": "0.0.1",
2377
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
2378
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
2379
+ "dev": true
2380
+ },
2381
+ "node_modules/concat-stream": {
2382
+ "version": "1.6.2",
2383
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
2384
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
2385
+ "dev": true,
2386
+ "engines": [
2387
+ "node >= 0.8"
2388
+ ],
2389
+ "dependencies": {
2390
+ "buffer-from": "^1.0.0",
2391
+ "inherits": "^2.0.3",
2392
+ "readable-stream": "^2.2.2",
2393
+ "typedarray": "^0.0.6"
2394
+ }
2395
+ },
2396
+ "node_modules/console-browserify": {
2397
+ "version": "1.2.0",
2398
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
2399
+ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
2400
+ "dev": true
2401
+ },
2402
+ "node_modules/constants-browserify": {
2403
+ "version": "1.0.0",
2404
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
2405
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
2406
+ "dev": true
2407
+ },
2408
+ "node_modules/convert-source-map": {
2409
+ "version": "1.7.0",
2410
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
2411
+ "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
2412
+ "dev": true,
2413
+ "dependencies": {
2414
+ "safe-buffer": "~5.1.1"
2415
+ }
2416
+ },
2417
+ "node_modules/copy-concurrently": {
2418
+ "version": "1.0.5",
2419
+ "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
2420
+ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
2421
+ "dev": true,
2422
+ "dependencies": {
2423
+ "aproba": "^1.1.1",
2424
+ "fs-write-stream-atomic": "^1.0.8",
2425
+ "iferr": "^0.1.5",
2426
+ "mkdirp": "^0.5.1",
2427
+ "rimraf": "^2.5.4",
2428
+ "run-queue": "^1.0.0"
2429
+ }
2430
+ },
2431
+ "node_modules/copy-descriptor": {
2432
+ "version": "0.1.1",
2433
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
2434
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
2435
+ "dev": true,
2436
+ "engines": {
2437
+ "node": ">=0.10.0"
2438
+ }
2439
+ },
2440
+ "node_modules/core-js-compat": {
2441
+ "version": "3.6.5",
2442
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
2443
+ "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
2444
+ "dev": true,
2445
+ "dependencies": {
2446
+ "browserslist": "^4.8.5",
2447
+ "semver": "7.0.0"
2448
+ },
2449
+ "funding": {
2450
+ "type": "opencollective",
2451
+ "url": "https://opencollective.com/core-js"
2452
+ }
2453
+ },
2454
+ "node_modules/core-js-compat/node_modules/semver": {
2455
+ "version": "7.0.0",
2456
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
2457
+ "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
2458
+ "dev": true,
2459
+ "bin": {
2460
+ "semver": "bin/semver.js"
2461
+ }
2462
+ },
2463
+ "node_modules/core-util-is": {
2464
+ "version": "1.0.2",
2465
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
2466
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
2467
+ "dev": true
2468
+ },
2469
+ "node_modules/create-ecdh": {
2470
+ "version": "4.0.3",
2471
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
2472
+ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
2473
+ "dev": true,
2474
+ "dependencies": {
2475
+ "bn.js": "^4.1.0",
2476
+ "elliptic": "^6.0.0"
2477
+ }
2478
+ },
2479
+ "node_modules/create-ecdh/node_modules/bn.js": {
2480
+ "version": "4.11.9",
2481
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
2482
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
2483
+ "dev": true
2484
+ },
2485
+ "node_modules/create-hash": {
2486
+ "version": "1.2.0",
2487
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
2488
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
2489
+ "dev": true,
2490
+ "dependencies": {
2491
+ "cipher-base": "^1.0.1",
2492
+ "inherits": "^2.0.1",
2493
+ "md5.js": "^1.3.4",
2494
+ "ripemd160": "^2.0.1",
2495
+ "sha.js": "^2.4.0"
2496
+ }
2497
+ },
2498
+ "node_modules/create-hmac": {
2499
+ "version": "1.1.7",
2500
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
2501
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
2502
+ "dev": true,
2503
+ "dependencies": {
2504
+ "cipher-base": "^1.0.3",
2505
+ "create-hash": "^1.1.0",
2506
+ "inherits": "^2.0.1",
2507
+ "ripemd160": "^2.0.0",
2508
+ "safe-buffer": "^5.0.1",
2509
+ "sha.js": "^2.4.8"
2510
+ }
2511
+ },
2512
+ "node_modules/cross-spawn": {
2513
+ "version": "6.0.5",
2514
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
2515
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
2516
+ "dev": true,
2517
+ "dependencies": {
2518
+ "nice-try": "^1.0.4",
2519
+ "path-key": "^2.0.1",
2520
+ "semver": "^5.5.0",
2521
+ "shebang-command": "^1.2.0",
2522
+ "which": "^1.2.9"
2523
+ },
2524
+ "engines": {
2525
+ "node": ">=4.8"
2526
+ }
2527
+ },
2528
+ "node_modules/crypto-browserify": {
2529
+ "version": "3.12.0",
2530
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
2531
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
2532
+ "dev": true,
2533
+ "dependencies": {
2534
+ "browserify-cipher": "^1.0.0",
2535
+ "browserify-sign": "^4.0.0",
2536
+ "create-ecdh": "^4.0.0",
2537
+ "create-hash": "^1.1.0",
2538
+ "create-hmac": "^1.1.0",
2539
+ "diffie-hellman": "^5.0.0",
2540
+ "inherits": "^2.0.1",
2541
+ "pbkdf2": "^3.0.3",
2542
+ "public-encrypt": "^4.0.0",
2543
+ "randombytes": "^2.0.0",
2544
+ "randomfill": "^1.0.3"
2545
+ },
2546
+ "engines": {
2547
+ "node": "*"
2548
+ }
2549
+ },
2550
+ "node_modules/cyclist": {
2551
+ "version": "1.0.1",
2552
+ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz",
2553
+ "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=",
2554
+ "dev": true
2555
+ },
2556
+ "node_modules/debug": {
2557
+ "version": "4.1.1",
2558
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
2559
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
2560
+ "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
2561
+ "dev": true,
2562
+ "dependencies": {
2563
+ "ms": "^2.1.1"
2564
+ }
2565
+ },
2566
+ "node_modules/decamelize": {
2567
+ "version": "1.2.0",
2568
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
2569
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
2570
+ "dev": true,
2571
+ "engines": {
2572
+ "node": ">=0.10.0"
2573
+ }
2574
+ },
2575
+ "node_modules/decode-uri-component": {
2576
+ "version": "0.2.0",
2577
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
2578
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
2579
+ "dev": true,
2580
+ "engines": {
2581
+ "node": ">=0.10"
2582
+ }
2583
+ },
2584
+ "node_modules/define-properties": {
2585
+ "version": "1.1.3",
2586
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
2587
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
2588
+ "dev": true,
2589
+ "dependencies": {
2590
+ "object-keys": "^1.0.12"
2591
+ },
2592
+ "engines": {
2593
+ "node": ">= 0.4"
2594
+ }
2595
+ },
2596
+ "node_modules/define-property": {
2597
+ "version": "2.0.2",
2598
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
2599
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
2600
+ "dev": true,
2601
+ "dependencies": {
2602
+ "is-descriptor": "^1.0.2",
2603
+ "isobject": "^3.0.1"
2604
+ },
2605
+ "engines": {
2606
+ "node": ">=0.10.0"
2607
+ }
2608
+ },
2609
+ "node_modules/define-property/node_modules/is-accessor-descriptor": {
2610
+ "version": "1.0.0",
2611
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
2612
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
2613
+ "dev": true,
2614
+ "dependencies": {
2615
+ "kind-of": "^6.0.0"
2616
+ },
2617
+ "engines": {
2618
+ "node": ">=0.10.0"
2619
+ }
2620
+ },
2621
+ "node_modules/define-property/node_modules/is-data-descriptor": {
2622
+ "version": "1.0.0",
2623
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
2624
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
2625
+ "dev": true,
2626
+ "dependencies": {
2627
+ "kind-of": "^6.0.0"
2628
+ },
2629
+ "engines": {
2630
+ "node": ">=0.10.0"
2631
+ }
2632
+ },
2633
+ "node_modules/define-property/node_modules/is-descriptor": {
2634
+ "version": "1.0.2",
2635
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
2636
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
2637
+ "dev": true,
2638
+ "dependencies": {
2639
+ "is-accessor-descriptor": "^1.0.0",
2640
+ "is-data-descriptor": "^1.0.0",
2641
+ "kind-of": "^6.0.2"
2642
+ },
2643
+ "engines": {
2644
+ "node": ">=0.10.0"
2645
+ }
2646
+ },
2647
+ "node_modules/des.js": {
2648
+ "version": "1.0.1",
2649
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
2650
+ "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
2651
+ "dev": true,
2652
+ "dependencies": {
2653
+ "inherits": "^2.0.1",
2654
+ "minimalistic-assert": "^1.0.0"
2655
+ }
2656
+ },
2657
+ "node_modules/detect-file": {
2658
+ "version": "1.0.0",
2659
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
2660
+ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
2661
+ "dev": true,
2662
+ "engines": {
2663
+ "node": ">=0.10.0"
2664
+ }
2665
+ },
2666
+ "node_modules/diffie-hellman": {
2667
+ "version": "5.0.3",
2668
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
2669
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
2670
+ "dev": true,
2671
+ "dependencies": {
2672
+ "bn.js": "^4.1.0",
2673
+ "miller-rabin": "^4.0.0",
2674
+ "randombytes": "^2.0.0"
2675
+ }
2676
+ },
2677
+ "node_modules/diffie-hellman/node_modules/bn.js": {
2678
+ "version": "4.11.9",
2679
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
2680
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
2681
+ "dev": true
2682
+ },
2683
+ "node_modules/domain-browser": {
2684
+ "version": "1.2.0",
2685
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
2686
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
2687
+ "dev": true,
2688
+ "engines": {
2689
+ "node": ">=0.4",
2690
+ "npm": ">=1.2"
2691
+ }
2692
+ },
2693
+ "node_modules/duplexify": {
2694
+ "version": "3.7.1",
2695
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
2696
+ "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
2697
+ "dev": true,
2698
+ "dependencies": {
2699
+ "end-of-stream": "^1.0.0",
2700
+ "inherits": "^2.0.1",
2701
+ "readable-stream": "^2.0.0",
2702
+ "stream-shift": "^1.0.0"
2703
+ }
2704
+ },
2705
+ "node_modules/electron-to-chromium": {
2706
+ "version": "1.3.497",
2707
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.497.tgz",
2708
+ "integrity": "sha512-sPdW5bUDZwiFtoonuZCUwRGzsZmKzcLM0bMVhp6SMCfUG+B3faENLx3cE+o+K0Jl+MPuNA9s9cScyFjOlixZpQ==",
2709
+ "dev": true
2710
+ },
2711
+ "node_modules/elliptic": {
2712
+ "version": "6.5.4",
2713
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
2714
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
2715
+ "dev": true,
2716
+ "dependencies": {
2717
+ "bn.js": "^4.11.9",
2718
+ "brorand": "^1.1.0",
2719
+ "hash.js": "^1.0.0",
2720
+ "hmac-drbg": "^1.0.1",
2721
+ "inherits": "^2.0.4",
2722
+ "minimalistic-assert": "^1.0.1",
2723
+ "minimalistic-crypto-utils": "^1.0.1"
2724
+ }
2725
+ },
2726
+ "node_modules/elliptic/node_modules/bn.js": {
2727
+ "version": "4.12.0",
2728
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
2729
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
2730
+ "dev": true
2731
+ },
2732
+ "node_modules/emoji-regex": {
2733
+ "version": "7.0.3",
2734
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
2735
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
2736
+ "dev": true
2737
+ },
2738
+ "node_modules/emojis-list": {
2739
+ "version": "3.0.0",
2740
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
2741
+ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
2742
+ "dev": true,
2743
+ "engines": {
2744
+ "node": ">= 4"
2745
+ }
2746
+ },
2747
+ "node_modules/encoding": {
2748
+ "version": "0.1.13",
2749
+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
2750
+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
2751
+ "dependencies": {
2752
+ "iconv-lite": "^0.6.2"
2753
+ }
2754
+ },
2755
+ "node_modules/end-of-stream": {
2756
+ "version": "1.4.4",
2757
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
2758
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
2759
+ "dev": true,
2760
+ "dependencies": {
2761
+ "once": "^1.4.0"
2762
+ }
2763
+ },
2764
+ "node_modules/enhanced-resolve": {
2765
+ "version": "4.2.0",
2766
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.2.0.tgz",
2767
+ "integrity": "sha512-S7eiFb/erugyd1rLb6mQ3Vuq+EXHv5cpCkNqqIkYkBgN2QdFnyCZzFBleqwGEx4lgNGYij81BWnCrFNK7vxvjQ==",
2768
+ "dev": true,
2769
+ "dependencies": {
2770
+ "graceful-fs": "^4.1.2",
2771
+ "memory-fs": "^0.5.0",
2772
+ "tapable": "^1.0.0"
2773
+ },
2774
+ "engines": {
2775
+ "node": ">=6.9.0"
2776
+ }
2777
+ },
2778
+ "node_modules/enhanced-resolve/node_modules/memory-fs": {
2779
+ "version": "0.5.0",
2780
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz",
2781
+ "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==",
2782
+ "dev": true,
2783
+ "dependencies": {
2784
+ "errno": "^0.1.3",
2785
+ "readable-stream": "^2.0.1"
2786
+ },
2787
+ "engines": {
2788
+ "node": ">=4.3.0 <5.0.0 || >=5.10"
2789
+ }
2790
+ },
2791
+ "node_modules/errno": {
2792
+ "version": "0.1.7",
2793
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
2794
+ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
2795
+ "dev": true,
2796
+ "dependencies": {
2797
+ "prr": "~1.0.1"
2798
+ },
2799
+ "bin": {
2800
+ "errno": "cli.js"
2801
+ }
2802
+ },
2803
+ "node_modules/escalade": {
2804
+ "version": "3.0.2",
2805
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz",
2806
+ "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==",
2807
+ "dev": true,
2808
+ "engines": {
2809
+ "node": ">=6"
2810
+ }
2811
+ },
2812
+ "node_modules/escape-string-regexp": {
2813
+ "version": "1.0.5",
2814
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
2815
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
2816
+ "dev": true,
2817
+ "engines": {
2818
+ "node": ">=0.8.0"
2819
+ }
2820
+ },
2821
+ "node_modules/eslint-scope": {
2822
+ "version": "4.0.3",
2823
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
2824
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
2825
+ "dev": true,
2826
+ "dependencies": {
2827
+ "esrecurse": "^4.1.0",
2828
+ "estraverse": "^4.1.1"
2829
+ },
2830
+ "engines": {
2831
+ "node": ">=4.0.0"
2832
+ }
2833
+ },
2834
+ "node_modules/esrecurse": {
2835
+ "version": "4.2.1",
2836
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
2837
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
2838
+ "dev": true,
2839
+ "dependencies": {
2840
+ "estraverse": "^4.1.0"
2841
+ },
2842
+ "engines": {
2843
+ "node": ">=4.0"
2844
+ }
2845
+ },
2846
+ "node_modules/estraverse": {
2847
+ "version": "4.3.0",
2848
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
2849
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
2850
+ "dev": true,
2851
+ "engines": {
2852
+ "node": ">=4.0"
2853
+ }
2854
+ },
2855
+ "node_modules/esutils": {
2856
+ "version": "2.0.3",
2857
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
2858
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
2859
+ "dev": true,
2860
+ "engines": {
2861
+ "node": ">=0.10.0"
2862
+ }
2863
+ },
2864
+ "node_modules/events": {
2865
+ "version": "3.1.0",
2866
+ "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz",
2867
+ "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==",
2868
+ "dev": true,
2869
+ "engines": {
2870
+ "node": ">=0.8.x"
2871
+ }
2872
+ },
2873
+ "node_modules/evp_bytestokey": {
2874
+ "version": "1.0.3",
2875
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
2876
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
2877
+ "dev": true,
2878
+ "dependencies": {
2879
+ "md5.js": "^1.3.4",
2880
+ "safe-buffer": "^5.1.1"
2881
+ }
2882
+ },
2883
+ "node_modules/expand-brackets": {
2884
+ "version": "2.1.4",
2885
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
2886
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
2887
+ "dev": true,
2888
+ "dependencies": {
2889
+ "debug": "^2.3.3",
2890
+ "define-property": "^0.2.5",
2891
+ "extend-shallow": "^2.0.1",
2892
+ "posix-character-classes": "^0.1.0",
2893
+ "regex-not": "^1.0.0",
2894
+ "snapdragon": "^0.8.1",
2895
+ "to-regex": "^3.0.1"
2896
+ },
2897
+ "engines": {
2898
+ "node": ">=0.10.0"
2899
+ }
2900
+ },
2901
+ "node_modules/expand-brackets/node_modules/debug": {
2902
+ "version": "2.6.9",
2903
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
2904
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
2905
+ "dev": true,
2906
+ "dependencies": {
2907
+ "ms": "2.0.0"
2908
+ }
2909
+ },
2910
+ "node_modules/expand-brackets/node_modules/define-property": {
2911
+ "version": "0.2.5",
2912
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2913
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2914
+ "dev": true,
2915
+ "dependencies": {
2916
+ "is-descriptor": "^0.1.0"
2917
+ },
2918
+ "engines": {
2919
+ "node": ">=0.10.0"
2920
+ }
2921
+ },
2922
+ "node_modules/expand-brackets/node_modules/extend-shallow": {
2923
+ "version": "2.0.1",
2924
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
2925
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
2926
+ "dev": true,
2927
+ "dependencies": {
2928
+ "is-extendable": "^0.1.0"
2929
+ },
2930
+ "engines": {
2931
+ "node": ">=0.10.0"
2932
+ }
2933
+ },
2934
+ "node_modules/expand-brackets/node_modules/ms": {
2935
+ "version": "2.0.0",
2936
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2937
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
2938
+ "dev": true
2939
+ },
2940
+ "node_modules/expand-tilde": {
2941
+ "version": "2.0.2",
2942
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
2943
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
2944
+ "dev": true,
2945
+ "dependencies": {
2946
+ "homedir-polyfill": "^1.0.1"
2947
+ },
2948
+ "engines": {
2949
+ "node": ">=0.10.0"
2950
+ }
2951
+ },
2952
+ "node_modules/extend-shallow": {
2953
+ "version": "3.0.2",
2954
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
2955
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
2956
+ "dev": true,
2957
+ "dependencies": {
2958
+ "assign-symbols": "^1.0.0",
2959
+ "is-extendable": "^1.0.1"
2960
+ },
2961
+ "engines": {
2962
+ "node": ">=0.10.0"
2963
+ }
2964
+ },
2965
+ "node_modules/extend-shallow/node_modules/is-extendable": {
2966
+ "version": "1.0.1",
2967
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2968
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2969
+ "dev": true,
2970
+ "dependencies": {
2971
+ "is-plain-object": "^2.0.4"
2972
+ },
2973
+ "engines": {
2974
+ "node": ">=0.10.0"
2975
+ }
2976
+ },
2977
+ "node_modules/extglob": {
2978
+ "version": "2.0.4",
2979
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
2980
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
2981
+ "dev": true,
2982
+ "dependencies": {
2983
+ "array-unique": "^0.3.2",
2984
+ "define-property": "^1.0.0",
2985
+ "expand-brackets": "^2.1.4",
2986
+ "extend-shallow": "^2.0.1",
2987
+ "fragment-cache": "^0.2.1",
2988
+ "regex-not": "^1.0.0",
2989
+ "snapdragon": "^0.8.1",
2990
+ "to-regex": "^3.0.1"
2991
+ },
2992
+ "engines": {
2993
+ "node": ">=0.10.0"
2994
+ }
2995
+ },
2996
+ "node_modules/extglob/node_modules/define-property": {
2997
+ "version": "1.0.0",
2998
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
2999
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
3000
+ "dev": true,
3001
+ "dependencies": {
3002
+ "is-descriptor": "^1.0.0"
3003
+ },
3004
+ "engines": {
3005
+ "node": ">=0.10.0"
3006
+ }
3007
+ },
3008
+ "node_modules/extglob/node_modules/extend-shallow": {
3009
+ "version": "2.0.1",
3010
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
3011
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
3012
+ "dev": true,
3013
+ "dependencies": {
3014
+ "is-extendable": "^0.1.0"
3015
+ },
3016
+ "engines": {
3017
+ "node": ">=0.10.0"
3018
+ }
3019
+ },
3020
+ "node_modules/extglob/node_modules/is-accessor-descriptor": {
3021
+ "version": "1.0.0",
3022
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
3023
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
3024
+ "dev": true,
3025
+ "dependencies": {
3026
+ "kind-of": "^6.0.0"
3027
+ },
3028
+ "engines": {
3029
+ "node": ">=0.10.0"
3030
+ }
3031
+ },
3032
+ "node_modules/extglob/node_modules/is-data-descriptor": {
3033
+ "version": "1.0.0",
3034
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
3035
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
3036
+ "dev": true,
3037
+ "dependencies": {
3038
+ "kind-of": "^6.0.0"
3039
+ },
3040
+ "engines": {
3041
+ "node": ">=0.10.0"
3042
+ }
3043
+ },
3044
+ "node_modules/extglob/node_modules/is-descriptor": {
3045
+ "version": "1.0.2",
3046
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
3047
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
3048
+ "dev": true,
3049
+ "dependencies": {
3050
+ "is-accessor-descriptor": "^1.0.0",
3051
+ "is-data-descriptor": "^1.0.0",
3052
+ "kind-of": "^6.0.2"
3053
+ },
3054
+ "engines": {
3055
+ "node": ">=0.10.0"
3056
+ }
3057
+ },
3058
+ "node_modules/fast-deep-equal": {
3059
+ "version": "3.1.3",
3060
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
3061
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
3062
+ "dev": true
3063
+ },
3064
+ "node_modules/fast-json-stable-stringify": {
3065
+ "version": "2.1.0",
3066
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
3067
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
3068
+ "dev": true
3069
+ },
3070
+ "node_modules/figgy-pudding": {
3071
+ "version": "3.5.2",
3072
+ "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
3073
+ "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==",
3074
+ "dev": true
3075
+ },
3076
+ "node_modules/file-uri-to-path": {
3077
+ "version": "1.0.0",
3078
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
3079
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
3080
+ "dev": true,
3081
+ "optional": true
3082
+ },
3083
+ "node_modules/fill-range": {
3084
+ "version": "4.0.0",
3085
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
3086
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
3087
+ "dev": true,
3088
+ "dependencies": {
3089
+ "extend-shallow": "^2.0.1",
3090
+ "is-number": "^3.0.0",
3091
+ "repeat-string": "^1.6.1",
3092
+ "to-regex-range": "^2.1.0"
3093
+ },
3094
+ "engines": {
3095
+ "node": ">=0.10.0"
3096
+ }
3097
+ },
3098
+ "node_modules/fill-range/node_modules/extend-shallow": {
3099
+ "version": "2.0.1",
3100
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
3101
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
3102
+ "dev": true,
3103
+ "dependencies": {
3104
+ "is-extendable": "^0.1.0"
3105
+ },
3106
+ "engines": {
3107
+ "node": ">=0.10.0"
3108
+ }
3109
+ },
3110
+ "node_modules/find-cache-dir": {
3111
+ "version": "2.1.0",
3112
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
3113
+ "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
3114
+ "dev": true,
3115
+ "dependencies": {
3116
+ "commondir": "^1.0.1",
3117
+ "make-dir": "^2.0.0",
3118
+ "pkg-dir": "^3.0.0"
3119
+ },
3120
+ "engines": {
3121
+ "node": ">=6"
3122
+ }
3123
+ },
3124
+ "node_modules/find-up": {
3125
+ "version": "3.0.0",
3126
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
3127
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
3128
+ "dev": true,
3129
+ "dependencies": {
3130
+ "locate-path": "^3.0.0"
3131
+ },
3132
+ "engines": {
3133
+ "node": ">=6"
3134
+ }
3135
+ },
3136
+ "node_modules/findup-sync": {
3137
+ "version": "3.0.0",
3138
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
3139
+ "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
3140
+ "dev": true,
3141
+ "dependencies": {
3142
+ "detect-file": "^1.0.0",
3143
+ "is-glob": "^4.0.0",
3144
+ "micromatch": "^3.0.4",
3145
+ "resolve-dir": "^1.0.1"
3146
+ },
3147
+ "engines": {
3148
+ "node": ">= 0.10"
3149
+ }
3150
+ },
3151
+ "node_modules/flush-write-stream": {
3152
+ "version": "1.1.1",
3153
+ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
3154
+ "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
3155
+ "dev": true,
3156
+ "dependencies": {
3157
+ "inherits": "^2.0.3",
3158
+ "readable-stream": "^2.3.6"
3159
+ }
3160
+ },
3161
+ "node_modules/follow-redirects": {
3162
+ "version": "1.13.3",
3163
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz",
3164
+ "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==",
3165
+ "funding": [
3166
+ {
3167
+ "type": "individual",
3168
+ "url": "https://github.com/sponsors/RubenVerborgh"
3169
+ }
3170
+ ],
3171
+ "engines": {
3172
+ "node": ">=4.0"
3173
+ },
3174
+ "peerDependenciesMeta": {
3175
+ "debug": {
3176
+ "optional": true
3177
+ }
3178
+ }
3179
+ },
3180
+ "node_modules/for-in": {
3181
+ "version": "1.0.2",
3182
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
3183
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
3184
+ "dev": true,
3185
+ "engines": {
3186
+ "node": ">=0.10.0"
3187
+ }
3188
+ },
3189
+ "node_modules/fragment-cache": {
3190
+ "version": "0.2.1",
3191
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
3192
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
3193
+ "dev": true,
3194
+ "dependencies": {
3195
+ "map-cache": "^0.2.2"
3196
+ },
3197
+ "engines": {
3198
+ "node": ">=0.10.0"
3199
+ }
3200
+ },
3201
+ "node_modules/from2": {
3202
+ "version": "2.3.0",
3203
+ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
3204
+ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
3205
+ "dev": true,
3206
+ "dependencies": {
3207
+ "inherits": "^2.0.1",
3208
+ "readable-stream": "^2.0.0"
3209
+ }
3210
+ },
3211
+ "node_modules/fs-write-stream-atomic": {
3212
+ "version": "1.0.10",
3213
+ "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
3214
+ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=",
3215
+ "dev": true,
3216
+ "dependencies": {
3217
+ "graceful-fs": "^4.1.2",
3218
+ "iferr": "^0.1.5",
3219
+ "imurmurhash": "^0.1.4",
3220
+ "readable-stream": "1 || 2"
3221
+ }
3222
+ },
3223
+ "node_modules/fs.realpath": {
3224
+ "version": "1.0.0",
3225
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
3226
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
3227
+ "dev": true
3228
+ },
3229
+ "node_modules/fsevents": {
3230
+ "version": "2.1.3",
3231
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
3232
+ "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
3233
+ "deprecated": "\"Please update to latest v2.3 or v2.2\"",
3234
+ "dev": true,
3235
+ "hasInstallScript": true,
3236
+ "optional": true,
3237
+ "os": [
3238
+ "darwin"
3239
+ ],
3240
+ "engines": {
3241
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
3242
+ }
3243
+ },
3244
+ "node_modules/function-bind": {
3245
+ "version": "1.1.1",
3246
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
3247
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
3248
+ "dev": true
3249
+ },
3250
+ "node_modules/gensync": {
3251
+ "version": "1.0.0-beta.1",
3252
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
3253
+ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
3254
+ "dev": true,
3255
+ "engines": {
3256
+ "node": ">=6.9.0"
3257
+ }
3258
+ },
3259
+ "node_modules/get-caller-file": {
3260
+ "version": "2.0.5",
3261
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
3262
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
3263
+ "dev": true,
3264
+ "engines": {
3265
+ "node": "6.* || 8.* || >= 10.*"
3266
+ }
3267
+ },
3268
+ "node_modules/get-value": {
3269
+ "version": "2.0.6",
3270
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
3271
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
3272
+ "dev": true,
3273
+ "engines": {
3274
+ "node": ">=0.10.0"
3275
+ }
3276
+ },
3277
+ "node_modules/gettext-parser": {
3278
+ "version": "1.4.0",
3279
+ "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.4.0.tgz",
3280
+ "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==",
3281
+ "dependencies": {
3282
+ "encoding": "^0.1.12",
3283
+ "safe-buffer": "^5.1.1"
3284
+ }
3285
+ },
3286
+ "node_modules/glob": {
3287
+ "version": "7.1.6",
3288
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
3289
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
3290
+ "dev": true,
3291
+ "dependencies": {
3292
+ "fs.realpath": "^1.0.0",
3293
+ "inflight": "^1.0.4",
3294
+ "inherits": "2",
3295
+ "minimatch": "^3.0.4",
3296
+ "once": "^1.3.0",
3297
+ "path-is-absolute": "^1.0.0"
3298
+ },
3299
+ "engines": {
3300
+ "node": "*"
3301
+ },
3302
+ "funding": {
3303
+ "url": "https://github.com/sponsors/isaacs"
3304
+ }
3305
+ },
3306
+ "node_modules/glob-parent": {
3307
+ "version": "5.1.1",
3308
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
3309
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
3310
+ "dev": true,
3311
+ "optional": true,
3312
+ "dependencies": {
3313
+ "is-glob": "^4.0.1"
3314
+ },
3315
+ "engines": {
3316
+ "node": ">= 6"
3317
+ }
3318
+ },
3319
+ "node_modules/global-modules": {
3320
+ "version": "2.0.0",
3321
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz",
3322
+ "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==",
3323
+ "dev": true,
3324
+ "dependencies": {
3325
+ "global-prefix": "^3.0.0"
3326
+ },
3327
+ "engines": {
3328
+ "node": ">=6"
3329
+ }
3330
+ },
3331
+ "node_modules/global-modules/node_modules/global-prefix": {
3332
+ "version": "3.0.0",
3333
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz",
3334
+ "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==",
3335
+ "dev": true,
3336
+ "dependencies": {
3337
+ "ini": "^1.3.5",
3338
+ "kind-of": "^6.0.2",
3339
+ "which": "^1.3.1"
3340
+ },
3341
+ "engines": {
3342
+ "node": ">=6"
3343
+ }
3344
+ },
3345
+ "node_modules/global-prefix": {
3346
+ "version": "1.0.2",
3347
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
3348
+ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
3349
+ "dev": true,
3350
+ "dependencies": {
3351
+ "expand-tilde": "^2.0.2",
3352
+ "homedir-polyfill": "^1.0.1",
3353
+ "ini": "^1.3.4",
3354
+ "is-windows": "^1.0.1",
3355
+ "which": "^1.2.14"
3356
+ },
3357
+ "engines": {
3358
+ "node": ">=0.10.0"
3359
+ }
3360
+ },
3361
+ "node_modules/globals": {
3362
+ "version": "11.12.0",
3363
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
3364
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
3365
+ "dev": true,
3366
+ "engines": {
3367
+ "node": ">=4"
3368
+ }
3369
+ },
3370
+ "node_modules/graceful-fs": {
3371
+ "version": "4.2.4",
3372
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
3373
+ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
3374
+ "dev": true
3375
+ },
3376
+ "node_modules/has-flag": {
3377
+ "version": "3.0.0",
3378
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
3379
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
3380
+ "dev": true,
3381
+ "engines": {
3382
+ "node": ">=4"
3383
+ }
3384
+ },
3385
+ "node_modules/has-symbols": {
3386
+ "version": "1.0.1",
3387
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
3388
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
3389
+ "dev": true,
3390
+ "engines": {
3391
+ "node": ">= 0.4"
3392
+ },
3393
+ "funding": {
3394
+ "url": "https://github.com/sponsors/ljharb"
3395
+ }
3396
+ },
3397
+ "node_modules/has-value": {
3398
+ "version": "1.0.0",
3399
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
3400
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
3401
+ "dev": true,
3402
+ "dependencies": {
3403
+ "get-value": "^2.0.6",
3404
+ "has-values": "^1.0.0",
3405
+ "isobject": "^3.0.0"
3406
+ },
3407
+ "engines": {
3408
+ "node": ">=0.10.0"
3409
+ }
3410
+ },
3411
+ "node_modules/has-values": {
3412
+ "version": "1.0.0",
3413
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
3414
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
3415
+ "dev": true,
3416
+ "dependencies": {
3417
+ "is-number": "^3.0.0",
3418
+ "kind-of": "^4.0.0"
3419
+ },
3420
+ "engines": {
3421
+ "node": ">=0.10.0"
3422
+ }
3423
+ },
3424
+ "node_modules/has-values/node_modules/kind-of": {
3425
+ "version": "4.0.0",
3426
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
3427
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
3428
+ "dev": true,
3429
+ "dependencies": {
3430
+ "is-buffer": "^1.1.5"
3431
+ },
3432
+ "engines": {
3433
+ "node": ">=0.10.0"
3434
+ }
3435
+ },
3436
+ "node_modules/hash-base": {
3437
+ "version": "3.1.0",
3438
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
3439
+ "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
3440
+ "dev": true,
3441
+ "dependencies": {
3442
+ "inherits": "^2.0.4",
3443
+ "readable-stream": "^3.6.0",
3444
+ "safe-buffer": "^5.2.0"
3445
+ },
3446
+ "engines": {
3447
+ "node": ">=4"
3448
+ }
3449
+ },
3450
+ "node_modules/hash-base/node_modules/readable-stream": {
3451
+ "version": "3.6.0",
3452
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
3453
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
3454
+ "dev": true,
3455
+ "dependencies": {
3456
+ "inherits": "^2.0.3",
3457
+ "string_decoder": "^1.1.1",
3458
+ "util-deprecate": "^1.0.1"
3459
+ },
3460
+ "engines": {
3461
+ "node": ">= 6"
3462
+ }
3463
+ },
3464
+ "node_modules/hash-base/node_modules/safe-buffer": {
3465
+ "version": "5.2.1",
3466
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
3467
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
3468
+ "dev": true,
3469
+ "funding": [
3470
+ {
3471
+ "type": "github",
3472
+ "url": "https://github.com/sponsors/feross"
3473
+ },
3474
+ {
3475
+ "type": "patreon",
3476
+ "url": "https://www.patreon.com/feross"
3477
+ },
3478
+ {
3479
+ "type": "consulting",
3480
+ "url": "https://feross.org/support"
3481
+ }
3482
+ ]
3483
+ },
3484
+ "node_modules/hash.js": {
3485
+ "version": "1.1.7",
3486
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
3487
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
3488
+ "dev": true,
3489
+ "dependencies": {
3490
+ "inherits": "^2.0.3",
3491
+ "minimalistic-assert": "^1.0.1"
3492
+ }
3493
+ },
3494
+ "node_modules/hmac-drbg": {
3495
+ "version": "1.0.1",
3496
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
3497
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
3498
+ "dev": true,
3499
+ "dependencies": {
3500
+ "hash.js": "^1.0.3",
3501
+ "minimalistic-assert": "^1.0.0",
3502
+ "minimalistic-crypto-utils": "^1.0.1"
3503
+ }
3504
+ },
3505
+ "node_modules/homedir-polyfill": {
3506
+ "version": "1.0.3",
3507
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
3508
+ "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
3509
+ "dev": true,
3510
+ "dependencies": {
3511
+ "parse-passwd": "^1.0.0"
3512
+ },
3513
+ "engines": {
3514
+ "node": ">=0.10.0"
3515
+ }
3516
+ },
3517
+ "node_modules/https-browserify": {
3518
+ "version": "1.0.0",
3519
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
3520
+ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
3521
+ "dev": true
3522
+ },
3523
+ "node_modules/iconv-lite": {
3524
+ "version": "0.6.2",
3525
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
3526
+ "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
3527
+ "dependencies": {
3528
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
3529
+ },
3530
+ "engines": {
3531
+ "node": ">=0.10.0"
3532
+ }
3533
+ },
3534
+ "node_modules/ieee754": {
3535
+ "version": "1.1.13",
3536
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
3537
+ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
3538
+ },
3539
+ "node_modules/iferr": {
3540
+ "version": "0.1.5",
3541
+ "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
3542
+ "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
3543
+ "dev": true
3544
+ },
3545
+ "node_modules/import-local": {
3546
+ "version": "2.0.0",
3547
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz",
3548
+ "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==",
3549
+ "dev": true,
3550
+ "dependencies": {
3551
+ "pkg-dir": "^3.0.0",
3552
+ "resolve-cwd": "^2.0.0"
3553
+ },
3554
+ "bin": {
3555
+ "import-local-fixture": "fixtures/cli.js"
3556
+ },
3557
+ "engines": {
3558
+ "node": ">=6"
3559
+ }
3560
+ },
3561
+ "node_modules/imurmurhash": {
3562
+ "version": "0.1.4",
3563
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
3564
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
3565
+ "dev": true,
3566
+ "engines": {
3567
+ "node": ">=0.8.19"
3568
+ }
3569
+ },
3570
+ "node_modules/infer-owner": {
3571
+ "version": "1.0.4",
3572
+ "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
3573
+ "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
3574
+ "dev": true
3575
+ },
3576
+ "node_modules/inflight": {
3577
+ "version": "1.0.6",
3578
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
3579
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
3580
+ "dev": true,
3581
+ "dependencies": {
3582
+ "once": "^1.3.0",
3583
+ "wrappy": "1"
3584
+ }
3585
+ },
3586
+ "node_modules/inherits": {
3587
+ "version": "2.0.4",
3588
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
3589
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
3590
+ "dev": true
3591
+ },
3592
+ "node_modules/ini": {
3593
+ "version": "1.3.8",
3594
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
3595
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
3596
+ "dev": true
3597
+ },
3598
+ "node_modules/interpret": {
3599
+ "version": "1.4.0",
3600
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
3601
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
3602
+ "dev": true,
3603
+ "engines": {
3604
+ "node": ">= 0.10"
3605
+ }
3606
+ },
3607
+ "node_modules/invariant": {
3608
+ "version": "2.2.4",
3609
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
3610
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
3611
+ "dev": true,
3612
+ "dependencies": {
3613
+ "loose-envify": "^1.0.0"
3614
+ }
3615
+ },
3616
+ "node_modules/is-accessor-descriptor": {
3617
+ "version": "0.1.6",
3618
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
3619
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
3620
+ "dev": true,
3621
+ "dependencies": {
3622
+ "kind-of": "^3.0.2"
3623
+ },
3624
+ "engines": {
3625
+ "node": ">=0.10.0"
3626
+ }
3627
+ },
3628
+ "node_modules/is-accessor-descriptor/node_modules/kind-of": {
3629
+ "version": "3.2.2",
3630
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3631
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3632
+ "dev": true,
3633
+ "dependencies": {
3634
+ "is-buffer": "^1.1.5"
3635
+ },
3636
+ "engines": {
3637
+ "node": ">=0.10.0"
3638
+ }
3639
+ },
3640
+ "node_modules/is-binary-path": {
3641
+ "version": "2.1.0",
3642
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
3643
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
3644
+ "dev": true,
3645
+ "optional": true,
3646
+ "dependencies": {
3647
+ "binary-extensions": "^2.0.0"
3648
+ },
3649
+ "engines": {
3650
+ "node": ">=8"
3651
+ }
3652
+ },
3653
+ "node_modules/is-buffer": {
3654
+ "version": "1.1.6",
3655
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
3656
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
3657
+ "dev": true
3658
+ },
3659
+ "node_modules/is-data-descriptor": {
3660
+ "version": "0.1.4",
3661
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
3662
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
3663
+ "dev": true,
3664
+ "dependencies": {
3665
+ "kind-of": "^3.0.2"
3666
+ },
3667
+ "engines": {
3668
+ "node": ">=0.10.0"
3669
+ }
3670
+ },
3671
+ "node_modules/is-data-descriptor/node_modules/kind-of": {
3672
+ "version": "3.2.2",
3673
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3674
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3675
+ "dev": true,
3676
+ "dependencies": {
3677
+ "is-buffer": "^1.1.5"
3678
+ },
3679
+ "engines": {
3680
+ "node": ">=0.10.0"
3681
+ }
3682
+ },
3683
+ "node_modules/is-descriptor": {
3684
+ "version": "0.1.6",
3685
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
3686
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
3687
+ "dev": true,
3688
+ "dependencies": {
3689
+ "is-accessor-descriptor": "^0.1.6",
3690
+ "is-data-descriptor": "^0.1.4",
3691
+ "kind-of": "^5.0.0"
3692
+ },
3693
+ "engines": {
3694
+ "node": ">=0.10.0"
3695
+ }
3696
+ },
3697
+ "node_modules/is-descriptor/node_modules/kind-of": {
3698
+ "version": "5.1.0",
3699
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
3700
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
3701
+ "dev": true,
3702
+ "engines": {
3703
+ "node": ">=0.10.0"
3704
+ }
3705
+ },
3706
+ "node_modules/is-extendable": {
3707
+ "version": "0.1.1",
3708
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
3709
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
3710
+ "dev": true,
3711
+ "engines": {
3712
+ "node": ">=0.10.0"
3713
+ }
3714
+ },
3715
+ "node_modules/is-extglob": {
3716
+ "version": "2.1.1",
3717
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
3718
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
3719
+ "dev": true,
3720
+ "engines": {
3721
+ "node": ">=0.10.0"
3722
+ }
3723
+ },
3724
+ "node_modules/is-fullwidth-code-point": {
3725
+ "version": "2.0.0",
3726
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
3727
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
3728
+ "dev": true,
3729
+ "engines": {
3730
+ "node": ">=4"
3731
+ }
3732
+ },
3733
+ "node_modules/is-glob": {
3734
+ "version": "4.0.1",
3735
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
3736
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
3737
+ "dev": true,
3738
+ "dependencies": {
3739
+ "is-extglob": "^2.1.1"
3740
+ },
3741
+ "engines": {
3742
+ "node": ">=0.10.0"
3743
+ }
3744
+ },
3745
+ "node_modules/is-number": {
3746
+ "version": "3.0.0",
3747
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
3748
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
3749
+ "dev": true,
3750
+ "dependencies": {
3751
+ "kind-of": "^3.0.2"
3752
+ },
3753
+ "engines": {
3754
+ "node": ">=0.10.0"
3755
+ }
3756
+ },
3757
+ "node_modules/is-number/node_modules/kind-of": {
3758
+ "version": "3.2.2",
3759
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3760
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3761
+ "dev": true,
3762
+ "dependencies": {
3763
+ "is-buffer": "^1.1.5"
3764
+ },
3765
+ "engines": {
3766
+ "node": ">=0.10.0"
3767
+ }
3768
+ },
3769
+ "node_modules/is-plain-object": {
3770
+ "version": "2.0.4",
3771
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
3772
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
3773
+ "dev": true,
3774
+ "dependencies": {
3775
+ "isobject": "^3.0.1"
3776
+ },
3777
+ "engines": {
3778
+ "node": ">=0.10.0"
3779
+ }
3780
+ },
3781
+ "node_modules/is-windows": {
3782
+ "version": "1.0.2",
3783
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
3784
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
3785
+ "dev": true,
3786
+ "engines": {
3787
+ "node": ">=0.10.0"
3788
+ }
3789
+ },
3790
+ "node_modules/is-wsl": {
3791
+ "version": "1.1.0",
3792
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
3793
+ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
3794
+ "dev": true,
3795
+ "engines": {
3796
+ "node": ">=4"
3797
+ }
3798
+ },
3799
+ "node_modules/isarray": {
3800
+ "version": "1.0.0",
3801
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
3802
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
3803
+ "dev": true
3804
+ },
3805
+ "node_modules/isexe": {
3806
+ "version": "2.0.0",
3807
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
3808
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
3809
+ "dev": true
3810
+ },
3811
+ "node_modules/isobject": {
3812
+ "version": "3.0.1",
3813
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
3814
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
3815
+ "dev": true,
3816
+ "engines": {
3817
+ "node": ">=0.10.0"
3818
+ }
3819
+ },
3820
+ "node_modules/js-tokens": {
3821
+ "version": "4.0.0",
3822
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
3823
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
3824
+ "dev": true
3825
+ },
3826
+ "node_modules/jsesc": {
3827
+ "version": "2.5.2",
3828
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
3829
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
3830
+ "dev": true,
3831
+ "bin": {
3832
+ "jsesc": "bin/jsesc"
3833
+ },
3834
+ "engines": {
3835
+ "node": ">=4"
3836
+ }
3837
+ },
3838
+ "node_modules/json-parse-better-errors": {
3839
+ "version": "1.0.2",
3840
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
3841
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
3842
+ "dev": true
3843
+ },
3844
+ "node_modules/json-schema-traverse": {
3845
+ "version": "0.4.1",
3846
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
3847
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
3848
+ "dev": true
3849
+ },
3850
+ "node_modules/json5": {
3851
+ "version": "2.1.3",
3852
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
3853
+ "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
3854
+ "dev": true,
3855
+ "dependencies": {
3856
+ "minimist": "^1.2.5"
3857
+ },
3858
+ "bin": {
3859
+ "json5": "lib/cli.js"
3860
+ },
3861
+ "engines": {
3862
+ "node": ">=6"
3863
+ }
3864
+ },
3865
+ "node_modules/kind-of": {
3866
+ "version": "6.0.3",
3867
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
3868
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
3869
+ "dev": true,
3870
+ "engines": {
3871
+ "node": ">=0.10.0"
3872
+ }
3873
+ },
3874
+ "node_modules/leven": {
3875
+ "version": "3.1.0",
3876
+ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
3877
+ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
3878
+ "dev": true,
3879
+ "engines": {
3880
+ "node": ">=6"
3881
+ }
3882
+ },
3883
+ "node_modules/levenary": {
3884
+ "version": "1.1.1",
3885
+ "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz",
3886
+ "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==",
3887
+ "dev": true,
3888
+ "dependencies": {
3889
+ "leven": "^3.1.0"
3890
+ },
3891
+ "engines": {
3892
+ "node": ">= 6"
3893
+ }
3894
+ },
3895
+ "node_modules/loader-runner": {
3896
+ "version": "2.4.0",
3897
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz",
3898
+ "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==",
3899
+ "dev": true,
3900
+ "engines": {
3901
+ "node": ">=4.3.0 <5.0.0 || >=5.10"
3902
+ }
3903
+ },
3904
+ "node_modules/loader-utils": {
3905
+ "version": "1.4.0",
3906
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
3907
+ "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
3908
+ "dev": true,
3909
+ "dependencies": {
3910
+ "big.js": "^5.2.2",
3911
+ "emojis-list": "^3.0.0",
3912
+ "json5": "^1.0.1"
3913
+ },
3914
+ "engines": {
3915
+ "node": ">=4.0.0"
3916
+ }
3917
+ },
3918
+ "node_modules/loader-utils/node_modules/json5": {
3919
+ "version": "1.0.1",
3920
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
3921
+ "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
3922
+ "dev": true,
3923
+ "dependencies": {
3924
+ "minimist": "^1.2.0"
3925
+ },
3926
+ "bin": {
3927
+ "json5": "lib/cli.js"
3928
+ }
3929
+ },
3930
+ "node_modules/locate-path": {
3931
+ "version": "3.0.0",
3932
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
3933
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
3934
+ "dev": true,
3935
+ "dependencies": {
3936
+ "p-locate": "^3.0.0",
3937
+ "path-exists": "^3.0.0"
3938
+ },
3939
+ "engines": {
3940
+ "node": ">=6"
3941
+ }
3942
+ },
3943
+ "node_modules/lodash": {
3944
+ "version": "4.17.19",
3945
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
3946
+ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
3947
+ },
3948
+ "node_modules/loose-envify": {
3949
+ "version": "1.4.0",
3950
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
3951
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
3952
+ "dev": true,
3953
+ "dependencies": {
3954
+ "js-tokens": "^3.0.0 || ^4.0.0"
3955
+ },
3956
+ "bin": {
3957
+ "loose-envify": "cli.js"
3958
+ }
3959
+ },
3960
+ "node_modules/lru-cache": {
3961
+ "version": "5.1.1",
3962
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
3963
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
3964
+ "dev": true,
3965
+ "dependencies": {
3966
+ "yallist": "^3.0.2"
3967
+ }
3968
+ },
3969
+ "node_modules/make-dir": {
3970
+ "version": "2.1.0",
3971
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
3972
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
3973
+ "dev": true,
3974
+ "dependencies": {
3975
+ "pify": "^4.0.1",
3976
+ "semver": "^5.6.0"
3977
+ },
3978
+ "engines": {
3979
+ "node": ">=6"
3980
+ }
3981
+ },
3982
+ "node_modules/map-cache": {
3983
+ "version": "0.2.2",
3984
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
3985
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
3986
+ "dev": true,
3987
+ "engines": {
3988
+ "node": ">=0.10.0"
3989
+ }
3990
+ },
3991
+ "node_modules/map-visit": {
3992
+ "version": "1.0.0",
3993
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
3994
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
3995
+ "dev": true,
3996
+ "dependencies": {
3997
+ "object-visit": "^1.0.0"
3998
+ },
3999
+ "engines": {
4000
+ "node": ">=0.10.0"
4001
+ }
4002
+ },
4003
+ "node_modules/md5.js": {
4004
+ "version": "1.3.5",
4005
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
4006
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
4007
+ "dev": true,
4008
+ "dependencies": {
4009
+ "hash-base": "^3.0.0",
4010
+ "inherits": "^2.0.1",
4011
+ "safe-buffer": "^5.1.2"
4012
+ }
4013
+ },
4014
+ "node_modules/memize": {
4015
+ "version": "1.1.0",
4016
+ "resolved": "https://registry.npmjs.org/memize/-/memize-1.1.0.tgz",
4017
+ "integrity": "sha512-K4FcPETOMTwe7KL2LK0orMhpOmWD2wRGwWWpbZy0fyArwsyIKR8YJVz8+efBAh3BO4zPqlSICu4vsLTRRqtFAg=="
4018
+ },
4019
+ "node_modules/memory-fs": {
4020
+ "version": "0.4.1",
4021
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
4022
+ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
4023
+ "dev": true,
4024
+ "dependencies": {
4025
+ "errno": "^0.1.3",
4026
+ "readable-stream": "^2.0.1"
4027
+ }
4028
+ },
4029
+ "node_modules/micromatch": {
4030
+ "version": "3.1.10",
4031
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
4032
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
4033
+ "dev": true,
4034
+ "dependencies": {
4035
+ "arr-diff": "^4.0.0",
4036
+ "array-unique": "^0.3.2",
4037
+ "braces": "^2.3.1",
4038
+ "define-property": "^2.0.2",
4039
+ "extend-shallow": "^3.0.2",
4040
+ "extglob": "^2.0.4",
4041
+ "fragment-cache": "^0.2.1",
4042
+ "kind-of": "^6.0.2",
4043
+ "nanomatch": "^1.2.9",
4044
+ "object.pick": "^1.3.0",
4045
+ "regex-not": "^1.0.0",
4046
+ "snapdragon": "^0.8.1",
4047
+ "to-regex": "^3.0.2"
4048
+ },
4049
+ "engines": {
4050
+ "node": ">=0.10.0"
4051
+ }
4052
+ },
4053
+ "node_modules/miller-rabin": {
4054
+ "version": "4.0.1",
4055
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
4056
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
4057
+ "dev": true,
4058
+ "dependencies": {
4059
+ "bn.js": "^4.0.0",
4060
+ "brorand": "^1.0.1"
4061
+ },
4062
+ "bin": {
4063
+ "miller-rabin": "bin/miller-rabin"
4064
+ }
4065
+ },
4066
+ "node_modules/miller-rabin/node_modules/bn.js": {
4067
+ "version": "4.11.9",
4068
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
4069
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
4070
+ "dev": true
4071
+ },
4072
+ "node_modules/minimalistic-assert": {
4073
+ "version": "1.0.1",
4074
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
4075
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
4076
+ "dev": true
4077
+ },
4078
+ "node_modules/minimalistic-crypto-utils": {
4079
+ "version": "1.0.1",
4080
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
4081
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
4082
+ "dev": true
4083
+ },
4084
+ "node_modules/minimatch": {
4085
+ "version": "3.0.4",
4086
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
4087
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
4088
+ "dev": true,
4089
+ "dependencies": {
4090
+ "brace-expansion": "^1.1.7"
4091
+ },
4092
+ "engines": {
4093
+ "node": "*"
4094
+ }
4095
+ },
4096
+ "node_modules/minimist": {
4097
+ "version": "1.2.5",
4098
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
4099
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
4100
+ "dev": true
4101
+ },
4102
+ "node_modules/mississippi": {
4103
+ "version": "3.0.0",
4104
+ "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
4105
+ "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
4106
+ "dev": true,
4107
+ "dependencies": {
4108
+ "concat-stream": "^1.5.0",
4109
+ "duplexify": "^3.4.2",
4110
+ "end-of-stream": "^1.1.0",
4111
+ "flush-write-stream": "^1.0.0",
4112
+ "from2": "^2.1.0",
4113
+ "parallel-transform": "^1.1.0",
4114
+ "pump": "^3.0.0",
4115
+ "pumpify": "^1.3.3",
4116
+ "stream-each": "^1.1.0",
4117
+ "through2": "^2.0.0"
4118
+ },
4119
+ "engines": {
4120
+ "node": ">=4.0.0"
4121
+ }
4122
+ },
4123
+ "node_modules/mixin-deep": {
4124
+ "version": "1.3.2",
4125
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
4126
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
4127
+ "dev": true,
4128
+ "dependencies": {
4129
+ "for-in": "^1.0.2",
4130
+ "is-extendable": "^1.0.1"
4131
+ },
4132
+ "engines": {
4133
+ "node": ">=0.10.0"
4134
+ }
4135
+ },
4136
+ "node_modules/mixin-deep/node_modules/is-extendable": {
4137
+ "version": "1.0.1",
4138
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
4139
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
4140
+ "dev": true,
4141
+ "dependencies": {
4142
+ "is-plain-object": "^2.0.4"
4143
+ },
4144
+ "engines": {
4145
+ "node": ">=0.10.0"
4146
+ }
4147
+ },
4148
+ "node_modules/mkdirp": {
4149
+ "version": "0.5.5",
4150
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
4151
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
4152
+ "dev": true,
4153
+ "dependencies": {
4154
+ "minimist": "^1.2.5"
4155
+ },
4156
+ "bin": {
4157
+ "mkdirp": "bin/cmd.js"
4158
+ }
4159
+ },
4160
+ "node_modules/move-concurrently": {
4161
+ "version": "1.0.1",
4162
+ "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
4163
+ "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
4164
+ "dev": true,
4165
+ "dependencies": {
4166
+ "aproba": "^1.1.1",
4167
+ "copy-concurrently": "^1.0.0",
4168
+ "fs-write-stream-atomic": "^1.0.8",
4169
+ "mkdirp": "^0.5.1",
4170
+ "rimraf": "^2.5.4",
4171
+ "run-queue": "^1.0.3"
4172
+ }
4173
+ },
4174
+ "node_modules/ms": {
4175
+ "version": "2.1.2",
4176
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
4177
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
4178
+ "dev": true
4179
+ },
4180
+ "node_modules/nan": {
4181
+ "version": "2.14.2",
4182
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
4183
+ "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
4184
+ "dev": true,
4185
+ "optional": true
4186
+ },
4187
+ "node_modules/nanomatch": {
4188
+ "version": "1.2.13",
4189
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
4190
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
4191
+ "dev": true,
4192
+ "dependencies": {
4193
+ "arr-diff": "^4.0.0",
4194
+ "array-unique": "^0.3.2",
4195
+ "define-property": "^2.0.2",
4196
+ "extend-shallow": "^3.0.2",
4197
+ "fragment-cache": "^0.2.1",
4198
+ "is-windows": "^1.0.2",
4199
+ "kind-of": "^6.0.2",
4200
+ "object.pick": "^1.3.0",
4201
+ "regex-not": "^1.0.0",
4202
+ "snapdragon": "^0.8.1",
4203
+ "to-regex": "^3.0.1"
4204
+ },
4205
+ "engines": {
4206
+ "node": ">=0.10.0"
4207
+ }
4208
+ },
4209
+ "node_modules/neo-async": {
4210
+ "version": "2.6.2",
4211
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
4212
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
4213
+ "dev": true
4214
+ },
4215
+ "node_modules/nice-try": {
4216
+ "version": "1.0.5",
4217
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
4218
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
4219
+ "dev": true
4220
+ },
4221
+ "node_modules/node-libs-browser": {
4222
+ "version": "2.2.1",
4223
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
4224
+ "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
4225
+ "dev": true,
4226
+ "dependencies": {
4227
+ "assert": "^1.1.1",
4228
+ "browserify-zlib": "^0.2.0",
4229
+ "buffer": "^4.3.0",
4230
+ "console-browserify": "^1.1.0",
4231
+ "constants-browserify": "^1.0.0",
4232
+ "crypto-browserify": "^3.11.0",
4233
+ "domain-browser": "^1.1.1",
4234
+ "events": "^3.0.0",
4235
+ "https-browserify": "^1.0.0",
4236
+ "os-browserify": "^0.3.0",
4237
+ "path-browserify": "0.0.1",
4238
+ "process": "^0.11.10",
4239
+ "punycode": "^1.2.4",
4240
+ "querystring-es3": "^0.2.0",
4241
+ "readable-stream": "^2.3.3",
4242
+ "stream-browserify": "^2.0.1",
4243
+ "stream-http": "^2.7.2",
4244
+ "string_decoder": "^1.0.0",
4245
+ "timers-browserify": "^2.0.4",
4246
+ "tty-browserify": "0.0.0",
4247
+ "url": "^0.11.0",
4248
+ "util": "^0.11.0",
4249
+ "vm-browserify": "^1.0.1"
4250
+ }
4251
+ },
4252
+ "node_modules/node-libs-browser/node_modules/buffer": {
4253
+ "version": "4.9.2",
4254
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
4255
+ "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
4256
+ "dev": true,
4257
+ "dependencies": {
4258
+ "base64-js": "^1.0.2",
4259
+ "ieee754": "^1.1.4",
4260
+ "isarray": "^1.0.0"
4261
+ }
4262
+ },
4263
+ "node_modules/node-libs-browser/node_modules/punycode": {
4264
+ "version": "1.4.1",
4265
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
4266
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
4267
+ "dev": true
4268
+ },
4269
+ "node_modules/node-releases": {
4270
+ "version": "1.1.59",
4271
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz",
4272
+ "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw==",
4273
+ "dev": true
4274
+ },
4275
+ "node_modules/normalize-path": {
4276
+ "version": "3.0.0",
4277
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
4278
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
4279
+ "dev": true,
4280
+ "optional": true,
4281
+ "engines": {
4282
+ "node": ">=0.10.0"
4283
+ }
4284
+ },
4285
+ "node_modules/object-assign": {
4286
+ "version": "4.1.1",
4287
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
4288
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
4289
+ "dev": true,
4290
+ "engines": {
4291
+ "node": ">=0.10.0"
4292
+ }
4293
+ },
4294
+ "node_modules/object-copy": {
4295
+ "version": "0.1.0",
4296
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
4297
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
4298
+ "dev": true,
4299
+ "dependencies": {
4300
+ "copy-descriptor": "^0.1.0",
4301
+ "define-property": "^0.2.5",
4302
+ "kind-of": "^3.0.3"
4303
+ },
4304
+ "engines": {
4305
+ "node": ">=0.10.0"
4306
+ }
4307
+ },
4308
+ "node_modules/object-copy/node_modules/define-property": {
4309
+ "version": "0.2.5",
4310
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
4311
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
4312
+ "dev": true,
4313
+ "dependencies": {
4314
+ "is-descriptor": "^0.1.0"
4315
+ },
4316
+ "engines": {
4317
+ "node": ">=0.10.0"
4318
+ }
4319
+ },
4320
+ "node_modules/object-copy/node_modules/kind-of": {
4321
+ "version": "3.2.2",
4322
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
4323
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
4324
+ "dev": true,
4325
+ "dependencies": {
4326
+ "is-buffer": "^1.1.5"
4327
+ },
4328
+ "engines": {
4329
+ "node": ">=0.10.0"
4330
+ }
4331
+ },
4332
+ "node_modules/object-keys": {
4333
+ "version": "1.1.1",
4334
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
4335
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
4336
+ "dev": true,
4337
+ "engines": {
4338
+ "node": ">= 0.4"
4339
+ }
4340
+ },
4341
+ "node_modules/object-visit": {
4342
+ "version": "1.0.1",
4343
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
4344
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
4345
+ "dev": true,
4346
+ "dependencies": {
4347
+ "isobject": "^3.0.0"
4348
+ },
4349
+ "engines": {
4350
+ "node": ">=0.10.0"
4351
+ }
4352
+ },
4353
+ "node_modules/object.assign": {
4354
+ "version": "4.1.0",
4355
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
4356
+ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
4357
+ "dev": true,
4358
+ "dependencies": {
4359
+ "define-properties": "^1.1.2",
4360
+ "function-bind": "^1.1.1",
4361
+ "has-symbols": "^1.0.0",
4362
+ "object-keys": "^1.0.11"
4363
+ },
4364
+ "engines": {
4365
+ "node": ">= 0.4"
4366
+ }
4367
+ },
4368
+ "node_modules/object.pick": {
4369
+ "version": "1.3.0",
4370
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
4371
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
4372
+ "dev": true,
4373
+ "dependencies": {
4374
+ "isobject": "^3.0.1"
4375
+ },
4376
+ "engines": {
4377
+ "node": ">=0.10.0"
4378
+ }
4379
+ },
4380
+ "node_modules/once": {
4381
+ "version": "1.4.0",
4382
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
4383
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
4384
+ "dev": true,
4385
+ "dependencies": {
4386
+ "wrappy": "1"
4387
+ }
4388
+ },
4389
+ "node_modules/os-browserify": {
4390
+ "version": "0.3.0",
4391
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
4392
+ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
4393
+ "dev": true
4394
+ },
4395
+ "node_modules/p-limit": {
4396
+ "version": "2.3.0",
4397
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
4398
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
4399
+ "dev": true,
4400
+ "dependencies": {
4401
+ "p-try": "^2.0.0"
4402
+ },
4403
+ "engines": {
4404
+ "node": ">=6"
4405
+ },
4406
+ "funding": {
4407
+ "url": "https://github.com/sponsors/sindresorhus"
4408
+ }
4409
+ },
4410
+ "node_modules/p-locate": {
4411
+ "version": "3.0.0",
4412
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
4413
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
4414
+ "dev": true,
4415
+ "dependencies": {
4416
+ "p-limit": "^2.0.0"
4417
+ },
4418
+ "engines": {
4419
+ "node": ">=6"
4420
+ }
4421
+ },
4422
+ "node_modules/p-try": {
4423
+ "version": "2.2.0",
4424
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
4425
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
4426
+ "dev": true,
4427
+ "engines": {
4428
+ "node": ">=6"
4429
+ }
4430
+ },
4431
+ "node_modules/pako": {
4432
+ "version": "1.0.11",
4433
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
4434
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
4435
+ "dev": true
4436
+ },
4437
+ "node_modules/parallel-transform": {
4438
+ "version": "1.2.0",
4439
+ "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz",
4440
+ "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==",
4441
+ "dev": true,
4442
+ "dependencies": {
4443
+ "cyclist": "^1.0.1",
4444
+ "inherits": "^2.0.3",
4445
+ "readable-stream": "^2.1.5"
4446
+ }
4447
+ },
4448
+ "node_modules/parse-asn1": {
4449
+ "version": "5.1.5",
4450
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz",
4451
+ "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==",
4452
+ "dev": true,
4453
+ "dependencies": {
4454
+ "asn1.js": "^4.0.0",
4455
+ "browserify-aes": "^1.0.0",
4456
+ "create-hash": "^1.1.0",
4457
+ "evp_bytestokey": "^1.0.0",
4458
+ "pbkdf2": "^3.0.3",
4459
+ "safe-buffer": "^5.1.1"
4460
+ }
4461
+ },
4462
+ "node_modules/parse-passwd": {
4463
+ "version": "1.0.0",
4464
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
4465
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
4466
+ "dev": true,
4467
+ "engines": {
4468
+ "node": ">=0.10.0"
4469
+ }
4470
+ },
4471
+ "node_modules/pascalcase": {
4472
+ "version": "0.1.1",
4473
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
4474
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
4475
+ "dev": true,
4476
+ "engines": {
4477
+ "node": ">=0.10.0"
4478
+ }
4479
+ },
4480
+ "node_modules/path-browserify": {
4481
+ "version": "0.0.1",
4482
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
4483
+ "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
4484
+ "dev": true
4485
+ },
4486
+ "node_modules/path-dirname": {
4487
+ "version": "1.0.2",
4488
+ "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
4489
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
4490
+ "dev": true,
4491
+ "optional": true
4492
+ },
4493
+ "node_modules/path-exists": {
4494
+ "version": "3.0.0",
4495
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
4496
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
4497
+ "dev": true,
4498
+ "engines": {
4499
+ "node": ">=4"
4500
+ }
4501
+ },
4502
+ "node_modules/path-is-absolute": {
4503
+ "version": "1.0.1",
4504
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
4505
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
4506
+ "dev": true,
4507
+ "engines": {
4508
+ "node": ">=0.10.0"
4509
+ }
4510
+ },
4511
+ "node_modules/path-key": {
4512
+ "version": "2.0.1",
4513
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
4514
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
4515
+ "dev": true,
4516
+ "engines": {
4517
+ "node": ">=4"
4518
+ }
4519
+ },
4520
+ "node_modules/path-parse": {
4521
+ "version": "1.0.6",
4522
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
4523
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
4524
+ "dev": true
4525
+ },
4526
+ "node_modules/pbkdf2": {
4527
+ "version": "3.1.1",
4528
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz",
4529
+ "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==",
4530
+ "dev": true,
4531
+ "dependencies": {
4532
+ "create-hash": "^1.1.2",
4533
+ "create-hmac": "^1.1.4",
4534
+ "ripemd160": "^2.0.1",
4535
+ "safe-buffer": "^5.0.1",
4536
+ "sha.js": "^2.4.8"
4537
+ },
4538
+ "engines": {
4539
+ "node": ">=0.12"
4540
+ }
4541
+ },
4542
+ "node_modules/picomatch": {
4543
+ "version": "2.2.2",
4544
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
4545
+ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
4546
+ "dev": true,
4547
+ "optional": true,
4548
+ "engines": {
4549
+ "node": ">=8.6"
4550
+ },
4551
+ "funding": {
4552
+ "url": "https://github.com/sponsors/jonschlinkert"
4553
+ }
4554
+ },
4555
+ "node_modules/pify": {
4556
+ "version": "4.0.1",
4557
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
4558
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
4559
+ "dev": true,
4560
+ "engines": {
4561
+ "node": ">=6"
4562
+ }
4563
+ },
4564
+ "node_modules/pkg-dir": {
4565
+ "version": "3.0.0",
4566
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
4567
+ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
4568
+ "dev": true,
4569
+ "dependencies": {
4570
+ "find-up": "^3.0.0"
4571
+ },
4572
+ "engines": {
4573
+ "node": ">=6"
4574
+ }
4575
+ },
4576
+ "node_modules/posix-character-classes": {
4577
+ "version": "0.1.1",
4578
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
4579
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
4580
+ "dev": true,
4581
+ "engines": {
4582
+ "node": ">=0.10.0"
4583
+ }
4584
+ },
4585
+ "node_modules/process": {
4586
+ "version": "0.11.10",
4587
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
4588
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
4589
+ "dev": true,
4590
+ "engines": {
4591
+ "node": ">= 0.6.0"
4592
+ }
4593
+ },
4594
+ "node_modules/process-nextick-args": {
4595
+ "version": "2.0.1",
4596
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
4597
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
4598
+ "dev": true
4599
+ },
4600
+ "node_modules/promise-inflight": {
4601
+ "version": "1.0.1",
4602
+ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
4603
+ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
4604
+ "dev": true
4605
+ },
4606
+ "node_modules/prr": {
4607
+ "version": "1.0.1",
4608
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
4609
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
4610
+ "dev": true
4611
+ },
4612
+ "node_modules/public-encrypt": {
4613
+ "version": "4.0.3",
4614
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
4615
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
4616
+ "dev": true,
4617
+ "dependencies": {
4618
+ "bn.js": "^4.1.0",
4619
+ "browserify-rsa": "^4.0.0",
4620
+ "create-hash": "^1.1.0",
4621
+ "parse-asn1": "^5.0.0",
4622
+ "randombytes": "^2.0.1",
4623
+ "safe-buffer": "^5.1.2"
4624
+ }
4625
+ },
4626
+ "node_modules/public-encrypt/node_modules/bn.js": {
4627
+ "version": "4.11.9",
4628
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
4629
+ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
4630
+ "dev": true
4631
+ },
4632
+ "node_modules/pump": {
4633
+ "version": "3.0.0",
4634
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
4635
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
4636
+ "dev": true,
4637
+ "dependencies": {
4638
+ "end-of-stream": "^1.1.0",
4639
+ "once": "^1.3.1"
4640
+ }
4641
+ },
4642
+ "node_modules/pumpify": {
4643
+ "version": "1.5.1",
4644
+ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
4645
+ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
4646
+ "dev": true,
4647
+ "dependencies": {
4648
+ "duplexify": "^3.6.0",
4649
+ "inherits": "^2.0.3",
4650
+ "pump": "^2.0.0"
4651
+ }
4652
+ },
4653
+ "node_modules/pumpify/node_modules/pump": {
4654
+ "version": "2.0.1",
4655
+ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
4656
+ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
4657
+ "dev": true,
4658
+ "dependencies": {
4659
+ "end-of-stream": "^1.1.0",
4660
+ "once": "^1.3.1"
4661
+ }
4662
+ },
4663
+ "node_modules/punycode": {
4664
+ "version": "2.1.1",
4665
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
4666
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
4667
+ "dev": true,
4668
+ "engines": {
4669
+ "node": ">=6"
4670
+ }
4671
+ },
4672
+ "node_modules/qs": {
4673
+ "version": "6.9.4",
4674
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz",
4675
+ "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==",
4676
+ "engines": {
4677
+ "node": ">=0.6"
4678
+ },
4679
+ "funding": {
4680
+ "url": "https://github.com/sponsors/ljharb"
4681
+ }
4682
+ },
4683
+ "node_modules/querystring": {
4684
+ "version": "0.2.0",
4685
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
4686
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
4687
+ "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
4688
+ "dev": true,
4689
+ "engines": {
4690
+ "node": ">=0.4.x"
4691
+ }
4692
+ },
4693
+ "node_modules/querystring-es3": {
4694
+ "version": "0.2.1",
4695
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
4696
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
4697
+ "dev": true,
4698
+ "engines": {
4699
+ "node": ">=0.4.x"
4700
+ }
4701
+ },
4702
+ "node_modules/randombytes": {
4703
+ "version": "2.1.0",
4704
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
4705
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
4706
+ "dev": true,
4707
+ "dependencies": {
4708
+ "safe-buffer": "^5.1.0"
4709
+ }
4710
+ },
4711
+ "node_modules/randomfill": {
4712
+ "version": "1.0.4",
4713
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
4714
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
4715
+ "dev": true,
4716
+ "dependencies": {
4717
+ "randombytes": "^2.0.5",
4718
+ "safe-buffer": "^5.1.0"
4719
+ }
4720
+ },
4721
+ "node_modules/react-native-url-polyfill": {
4722
+ "version": "1.1.2",
4723
+ "resolved": "https://registry.npmjs.org/react-native-url-polyfill/-/react-native-url-polyfill-1.1.2.tgz",
4724
+ "integrity": "sha512-RPYwjW+4udnAf26xUCQP2dn4t2tnRFo3Ii4s/hy7Ivpe7xYtXp7CMVX505CR8X3p0f8NKmOJ4MQEFMMnbd/Y/Q==",
4725
+ "dependencies": {
4726
+ "buffer": "^5.4.3",
4727
+ "whatwg-url-without-unicode": "8.0.0-1"
4728
+ },
4729
+ "peerDependencies": {
4730
+ "react-native": "*"
4731
+ }
4732
+ },
4733
+ "node_modules/readable-stream": {
4734
+ "version": "2.3.7",
4735
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
4736
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
4737
+ "dev": true,
4738
+ "dependencies": {
4739
+ "core-util-is": "~1.0.0",
4740
+ "inherits": "~2.0.3",
4741
+ "isarray": "~1.0.0",
4742
+ "process-nextick-args": "~2.0.0",
4743
+ "safe-buffer": "~5.1.1",
4744
+ "string_decoder": "~1.1.1",
4745
+ "util-deprecate": "~1.0.1"
4746
+ }
4747
+ },
4748
+ "node_modules/readdirp": {
4749
+ "version": "3.4.0",
4750
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
4751
+ "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
4752
+ "dev": true,
4753
+ "optional": true,
4754
+ "dependencies": {
4755
+ "picomatch": "^2.2.1"
4756
+ },
4757
+ "engines": {
4758
+ "node": ">=8.10.0"
4759
+ }
4760
+ },
4761
+ "node_modules/regenerate": {
4762
+ "version": "1.4.1",
4763
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
4764
+ "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==",
4765
+ "dev": true
4766
+ },
4767
+ "node_modules/regenerate-unicode-properties": {
4768
+ "version": "8.2.0",
4769
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
4770
+ "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
4771
+ "dev": true,
4772
+ "dependencies": {
4773
+ "regenerate": "^1.4.0"
4774
+ },
4775
+ "engines": {
4776
+ "node": ">=4"
4777
+ }
4778
+ },
4779
+ "node_modules/regenerator-runtime": {
4780
+ "version": "0.13.5",
4781
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
4782
+ "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
4783
+ },
4784
+ "node_modules/regenerator-transform": {
4785
+ "version": "0.14.5",
4786
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz",
4787
+ "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==",
4788
+ "dev": true,
4789
+ "dependencies": {
4790
+ "@babel/runtime": "^7.8.4"
4791
+ }
4792
+ },
4793
+ "node_modules/regex-not": {
4794
+ "version": "1.0.2",
4795
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
4796
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
4797
+ "dev": true,
4798
+ "dependencies": {
4799
+ "extend-shallow": "^3.0.2",
4800
+ "safe-regex": "^1.1.0"
4801
+ },
4802
+ "engines": {
4803
+ "node": ">=0.10.0"
4804
+ }
4805
+ },
4806
+ "node_modules/regexpu-core": {
4807
+ "version": "4.7.0",
4808
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz",
4809
+ "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==",
4810
+ "dev": true,
4811
+ "dependencies": {
4812
+ "regenerate": "^1.4.0",
4813
+ "regenerate-unicode-properties": "^8.2.0",
4814
+ "regjsgen": "^0.5.1",
4815
+ "regjsparser": "^0.6.4",
4816
+ "unicode-match-property-ecmascript": "^1.0.4",
4817
+ "unicode-match-property-value-ecmascript": "^1.2.0"
4818
+ },
4819
+ "engines": {
4820
+ "node": ">=4"
4821
+ }
4822
+ },
4823
+ "node_modules/regjsgen": {
4824
+ "version": "0.5.2",
4825
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
4826
+ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
4827
+ "dev": true
4828
+ },
4829
+ "node_modules/regjsparser": {
4830
+ "version": "0.6.4",
4831
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
4832
+ "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
4833
+ "dev": true,
4834
+ "dependencies": {
4835
+ "jsesc": "~0.5.0"
4836
+ },
4837
+ "bin": {
4838
+ "regjsparser": "bin/parser"
4839
+ }
4840
+ },
4841
+ "node_modules/regjsparser/node_modules/jsesc": {
4842
+ "version": "0.5.0",
4843
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
4844
+ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
4845
+ "dev": true,
4846
+ "bin": {
4847
+ "jsesc": "bin/jsesc"
4848
+ }
4849
+ },
4850
+ "node_modules/remove-trailing-separator": {
4851
+ "version": "1.1.0",
4852
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
4853
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
4854
+ "dev": true,
4855
+ "optional": true
4856
+ },
4857
+ "node_modules/repeat-element": {
4858
+ "version": "1.1.3",
4859
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
4860
+ "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
4861
+ "dev": true,
4862
+ "engines": {
4863
+ "node": ">=0.10.0"
4864
+ }
4865
+ },
4866
+ "node_modules/repeat-string": {
4867
+ "version": "1.6.1",
4868
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
4869
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
4870
+ "dev": true,
4871
+ "engines": {
4872
+ "node": ">=0.10"
4873
+ }
4874
+ },
4875
+ "node_modules/require-directory": {
4876
+ "version": "2.1.1",
4877
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
4878
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
4879
+ "dev": true,
4880
+ "engines": {
4881
+ "node": ">=0.10.0"
4882
+ }
4883
+ },
4884
+ "node_modules/require-main-filename": {
4885
+ "version": "2.0.0",
4886
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
4887
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
4888
+ "dev": true
4889
+ },
4890
+ "node_modules/resolve": {
4891
+ "version": "1.17.0",
4892
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
4893
+ "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
4894
+ "dev": true,
4895
+ "dependencies": {
4896
+ "path-parse": "^1.0.6"
4897
+ },
4898
+ "funding": {
4899
+ "url": "https://github.com/sponsors/ljharb"
4900
+ }
4901
+ },
4902
+ "node_modules/resolve-cwd": {
4903
+ "version": "2.0.0",
4904
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
4905
+ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=",
4906
+ "dev": true,
4907
+ "dependencies": {
4908
+ "resolve-from": "^3.0.0"
4909
+ },
4910
+ "engines": {
4911
+ "node": ">=4"
4912
+ }
4913
+ },
4914
+ "node_modules/resolve-dir": {
4915
+ "version": "1.0.1",
4916
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
4917
+ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
4918
+ "dev": true,
4919
+ "dependencies": {
4920
+ "expand-tilde": "^2.0.0",
4921
+ "global-modules": "^1.0.0"
4922
+ },
4923
+ "engines": {
4924
+ "node": ">=0.10.0"
4925
+ }
4926
+ },
4927
+ "node_modules/resolve-dir/node_modules/global-modules": {
4928
+ "version": "1.0.0",
4929
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
4930
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
4931
+ "dev": true,
4932
+ "dependencies": {
4933
+ "global-prefix": "^1.0.1",
4934
+ "is-windows": "^1.0.1",
4935
+ "resolve-dir": "^1.0.0"
4936
+ },
4937
+ "engines": {
4938
+ "node": ">=0.10.0"
4939
+ }
4940
+ },
4941
+ "node_modules/resolve-from": {
4942
+ "version": "3.0.0",
4943
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
4944
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
4945
+ "dev": true,
4946
+ "engines": {
4947
+ "node": ">=4"
4948
+ }
4949
+ },
4950
+ "node_modules/resolve-url": {
4951
+ "version": "0.2.1",
4952
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
4953
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
4954
+ "deprecated": "https://github.com/lydell/resolve-url#deprecated",
4955
+ "dev": true
4956
+ },
4957
+ "node_modules/ret": {
4958
+ "version": "0.1.15",
4959
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
4960
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
4961
+ "dev": true,
4962
+ "engines": {
4963
+ "node": ">=0.12"
4964
+ }
4965
+ },
4966
+ "node_modules/rimraf": {
4967
+ "version": "2.7.1",
4968
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
4969
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
4970
+ "dev": true,
4971
+ "dependencies": {
4972
+ "glob": "^7.1.3"
4973
+ },
4974
+ "bin": {
4975
+ "rimraf": "bin.js"
4976
+ }
4977
+ },
4978
+ "node_modules/ripemd160": {
4979
+ "version": "2.0.2",
4980
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
4981
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
4982
+ "dev": true,
4983
+ "dependencies": {
4984
+ "hash-base": "^3.0.0",
4985
+ "inherits": "^2.0.1"
4986
+ }
4987
+ },
4988
+ "node_modules/run-queue": {
4989
+ "version": "1.0.3",
4990
+ "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
4991
+ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
4992
+ "dev": true,
4993
+ "dependencies": {
4994
+ "aproba": "^1.1.1"
4995
+ }
4996
+ },
4997
+ "node_modules/safe-buffer": {
4998
+ "version": "5.1.2",
4999
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
5000
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
5001
+ },
5002
+ "node_modules/safe-regex": {
5003
+ "version": "1.1.0",
5004
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
5005
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
5006
+ "dev": true,
5007
+ "dependencies": {
5008
+ "ret": "~0.1.10"
5009
+ }
5010
+ },
5011
+ "node_modules/safer-buffer": {
5012
+ "version": "2.1.2",
5013
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
5014
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
5015
+ },
5016
+ "node_modules/schema-utils": {
5017
+ "version": "2.7.0",
5018
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
5019
+ "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
5020
+ "dev": true,
5021
+ "dependencies": {
5022
+ "@types/json-schema": "^7.0.4",
5023
+ "ajv": "^6.12.2",
5024
+ "ajv-keywords": "^3.4.1"
5025
+ },
5026
+ "engines": {
5027
+ "node": ">= 8.9.0"
5028
+ },
5029
+ "funding": {
5030
+ "type": "opencollective",
5031
+ "url": "https://opencollective.com/webpack"
5032
+ }
5033
+ },
5034
+ "node_modules/semver": {
5035
+ "version": "5.7.1",
5036
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
5037
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
5038
+ "dev": true,
5039
+ "bin": {
5040
+ "semver": "bin/semver"
5041
+ }
5042
+ },
5043
+ "node_modules/serialize-javascript": {
5044
+ "version": "3.1.0",
5045
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz",
5046
+ "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==",
5047
+ "dev": true,
5048
+ "dependencies": {
5049
+ "randombytes": "^2.1.0"
5050
+ }
5051
+ },
5052
+ "node_modules/set-blocking": {
5053
+ "version": "2.0.0",
5054
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
5055
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
5056
+ "dev": true
5057
+ },
5058
+ "node_modules/set-value": {
5059
+ "version": "2.0.1",
5060
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
5061
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
5062
+ "dev": true,
5063
+ "dependencies": {
5064
+ "extend-shallow": "^2.0.1",
5065
+ "is-extendable": "^0.1.1",
5066
+ "is-plain-object": "^2.0.3",
5067
+ "split-string": "^3.0.1"
5068
+ },
5069
+ "engines": {
5070
+ "node": ">=0.10.0"
5071
+ }
5072
+ },
5073
+ "node_modules/set-value/node_modules/extend-shallow": {
5074
+ "version": "2.0.1",
5075
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
5076
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
5077
+ "dev": true,
5078
+ "dependencies": {
5079
+ "is-extendable": "^0.1.0"
5080
+ },
5081
+ "engines": {
5082
+ "node": ">=0.10.0"
5083
+ }
5084
+ },
5085
+ "node_modules/setimmediate": {
5086
+ "version": "1.0.5",
5087
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
5088
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
5089
+ "dev": true
5090
+ },
5091
+ "node_modules/sha.js": {
5092
+ "version": "2.4.11",
5093
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
5094
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
5095
+ "dev": true,
5096
+ "dependencies": {
5097
+ "inherits": "^2.0.1",
5098
+ "safe-buffer": "^5.0.1"
5099
+ },
5100
+ "bin": {
5101
+ "sha.js": "bin.js"
5102
+ }
5103
+ },
5104
+ "node_modules/shebang-command": {
5105
+ "version": "1.2.0",
5106
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
5107
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
5108
+ "dev": true,
5109
+ "dependencies": {
5110
+ "shebang-regex": "^1.0.0"
5111
+ },
5112
+ "engines": {
5113
+ "node": ">=0.10.0"
5114
+ }
5115
+ },
5116
+ "node_modules/shebang-regex": {
5117
+ "version": "1.0.0",
5118
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
5119
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
5120
+ "dev": true,
5121
+ "engines": {
5122
+ "node": ">=0.10.0"
5123
+ }
5124
+ },
5125
+ "node_modules/snapdragon": {
5126
+ "version": "0.8.2",
5127
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
5128
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
5129
+ "dev": true,
5130
+ "dependencies": {
5131
+ "base": "^0.11.1",
5132
+ "debug": "^2.2.0",
5133
+ "define-property": "^0.2.5",
5134
+ "extend-shallow": "^2.0.1",
5135
+ "map-cache": "^0.2.2",
5136
+ "source-map": "^0.5.6",
5137
+ "source-map-resolve": "^0.5.0",
5138
+ "use": "^3.1.0"
5139
+ },
5140
+ "engines": {
5141
+ "node": ">=0.10.0"
5142
+ }
5143
+ },
5144
+ "node_modules/snapdragon-node": {
5145
+ "version": "2.1.1",
5146
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
5147
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
5148
+ "dev": true,
5149
+ "dependencies": {
5150
+ "define-property": "^1.0.0",
5151
+ "isobject": "^3.0.0",
5152
+ "snapdragon-util": "^3.0.1"
5153
+ },
5154
+ "engines": {
5155
+ "node": ">=0.10.0"
5156
+ }
5157
+ },
5158
+ "node_modules/snapdragon-node/node_modules/define-property": {
5159
+ "version": "1.0.0",
5160
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
5161
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
5162
+ "dev": true,
5163
+ "dependencies": {
5164
+ "is-descriptor": "^1.0.0"
5165
+ },
5166
+ "engines": {
5167
+ "node": ">=0.10.0"
5168
+ }
5169
+ },
5170
+ "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": {
5171
+ "version": "1.0.0",
5172
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
5173
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
5174
+ "dev": true,
5175
+ "dependencies": {
5176
+ "kind-of": "^6.0.0"
5177
+ },
5178
+ "engines": {
5179
+ "node": ">=0.10.0"
5180
+ }
5181
+ },
5182
+ "node_modules/snapdragon-node/node_modules/is-data-descriptor": {
5183
+ "version": "1.0.0",
5184
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
5185
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
5186
+ "dev": true,
5187
+ "dependencies": {
5188
+ "kind-of": "^6.0.0"
5189
+ },
5190
+ "engines": {
5191
+ "node": ">=0.10.0"
5192
+ }
5193
+ },
5194
+ "node_modules/snapdragon-node/node_modules/is-descriptor": {
5195
+ "version": "1.0.2",
5196
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
5197
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
5198
+ "dev": true,
5199
+ "dependencies": {
5200
+ "is-accessor-descriptor": "^1.0.0",
5201
+ "is-data-descriptor": "^1.0.0",
5202
+ "kind-of": "^6.0.2"
5203
+ },
5204
+ "engines": {
5205
+ "node": ">=0.10.0"
5206
+ }
5207
+ },
5208
+ "node_modules/snapdragon-util": {
5209
+ "version": "3.0.1",
5210
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
5211
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
5212
+ "dev": true,
5213
+ "dependencies": {
5214
+ "kind-of": "^3.2.0"
5215
+ },
5216
+ "engines": {
5217
+ "node": ">=0.10.0"
5218
+ }
5219
+ },
5220
+ "node_modules/snapdragon-util/node_modules/kind-of": {
5221
+ "version": "3.2.2",
5222
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5223
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5224
+ "dev": true,
5225
+ "dependencies": {
5226
+ "is-buffer": "^1.1.5"
5227
+ },
5228
+ "engines": {
5229
+ "node": ">=0.10.0"
5230
+ }
5231
+ },
5232
+ "node_modules/snapdragon/node_modules/debug": {
5233
+ "version": "2.6.9",
5234
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
5235
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
5236
+ "dev": true,
5237
+ "dependencies": {
5238
+ "ms": "2.0.0"
5239
+ }
5240
+ },
5241
+ "node_modules/snapdragon/node_modules/define-property": {
5242
+ "version": "0.2.5",
5243
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
5244
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
5245
+ "dev": true,
5246
+ "dependencies": {
5247
+ "is-descriptor": "^0.1.0"
5248
+ },
5249
+ "engines": {
5250
+ "node": ">=0.10.0"
5251
+ }
5252
+ },
5253
+ "node_modules/snapdragon/node_modules/extend-shallow": {
5254
+ "version": "2.0.1",
5255
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
5256
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
5257
+ "dev": true,
5258
+ "dependencies": {
5259
+ "is-extendable": "^0.1.0"
5260
+ },
5261
+ "engines": {
5262
+ "node": ">=0.10.0"
5263
+ }
5264
+ },
5265
+ "node_modules/snapdragon/node_modules/ms": {
5266
+ "version": "2.0.0",
5267
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
5268
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
5269
+ "dev": true
5270
+ },
5271
+ "node_modules/source-list-map": {
5272
+ "version": "2.0.1",
5273
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
5274
+ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
5275
+ "dev": true
5276
+ },
5277
+ "node_modules/source-map": {
5278
+ "version": "0.5.7",
5279
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
5280
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
5281
+ "dev": true,
5282
+ "engines": {
5283
+ "node": ">=0.10.0"
5284
+ }
5285
+ },
5286
+ "node_modules/source-map-resolve": {
5287
+ "version": "0.5.3",
5288
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
5289
+ "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
5290
+ "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated",
5291
+ "dev": true,
5292
+ "dependencies": {
5293
+ "atob": "^2.1.2",
5294
+ "decode-uri-component": "^0.2.0",
5295
+ "resolve-url": "^0.2.1",
5296
+ "source-map-url": "^0.4.0",
5297
+ "urix": "^0.1.0"
5298
+ }
5299
+ },
5300
+ "node_modules/source-map-support": {
5301
+ "version": "0.5.19",
5302
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
5303
+ "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
5304
+ "dev": true,
5305
+ "dependencies": {
5306
+ "buffer-from": "^1.0.0",
5307
+ "source-map": "^0.6.0"
5308
+ }
5309
+ },
5310
+ "node_modules/source-map-support/node_modules/source-map": {
5311
+ "version": "0.6.1",
5312
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
5313
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
5314
+ "dev": true,
5315
+ "engines": {
5316
+ "node": ">=0.10.0"
5317
+ }
5318
+ },
5319
+ "node_modules/source-map-url": {
5320
+ "version": "0.4.0",
5321
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
5322
+ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
5323
+ "deprecated": "See https://github.com/lydell/source-map-url#deprecated",
5324
+ "dev": true
5325
+ },
5326
+ "node_modules/split-string": {
5327
+ "version": "3.1.0",
5328
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
5329
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
5330
+ "dev": true,
5331
+ "dependencies": {
5332
+ "extend-shallow": "^3.0.0"
5333
+ },
5334
+ "engines": {
5335
+ "node": ">=0.10.0"
5336
+ }
5337
+ },
5338
+ "node_modules/sprintf-js": {
5339
+ "version": "1.1.2",
5340
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
5341
+ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="
5342
+ },
5343
+ "node_modules/ssri": {
5344
+ "version": "6.0.1",
5345
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
5346
+ "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
5347
+ "dev": true,
5348
+ "dependencies": {
5349
+ "figgy-pudding": "^3.5.1"
5350
+ }
5351
+ },
5352
+ "node_modules/static-extend": {
5353
+ "version": "0.1.2",
5354
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
5355
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
5356
+ "dev": true,
5357
+ "dependencies": {
5358
+ "define-property": "^0.2.5",
5359
+ "object-copy": "^0.1.0"
5360
+ },
5361
+ "engines": {
5362
+ "node": ">=0.10.0"
5363
+ }
5364
+ },
5365
+ "node_modules/static-extend/node_modules/define-property": {
5366
+ "version": "0.2.5",
5367
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
5368
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
5369
+ "dev": true,
5370
+ "dependencies": {
5371
+ "is-descriptor": "^0.1.0"
5372
+ },
5373
+ "engines": {
5374
+ "node": ">=0.10.0"
5375
+ }
5376
+ },
5377
+ "node_modules/stream-browserify": {
5378
+ "version": "2.0.2",
5379
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
5380
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
5381
+ "dev": true,
5382
+ "dependencies": {
5383
+ "inherits": "~2.0.1",
5384
+ "readable-stream": "^2.0.2"
5385
+ }
5386
+ },
5387
+ "node_modules/stream-each": {
5388
+ "version": "1.2.3",
5389
+ "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz",
5390
+ "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==",
5391
+ "dev": true,
5392
+ "dependencies": {
5393
+ "end-of-stream": "^1.1.0",
5394
+ "stream-shift": "^1.0.0"
5395
+ }
5396
+ },
5397
+ "node_modules/stream-http": {
5398
+ "version": "2.8.3",
5399
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
5400
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
5401
+ "dev": true,
5402
+ "dependencies": {
5403
+ "builtin-status-codes": "^3.0.0",
5404
+ "inherits": "^2.0.1",
5405
+ "readable-stream": "^2.3.6",
5406
+ "to-arraybuffer": "^1.0.0",
5407
+ "xtend": "^4.0.0"
5408
+ }
5409
+ },
5410
+ "node_modules/stream-shift": {
5411
+ "version": "1.0.1",
5412
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
5413
+ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
5414
+ "dev": true
5415
+ },
5416
+ "node_modules/string_decoder": {
5417
+ "version": "1.1.1",
5418
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
5419
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
5420
+ "dev": true,
5421
+ "dependencies": {
5422
+ "safe-buffer": "~5.1.0"
5423
+ }
5424
+ },
5425
+ "node_modules/string-width": {
5426
+ "version": "3.1.0",
5427
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
5428
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
5429
+ "dev": true,
5430
+ "dependencies": {
5431
+ "emoji-regex": "^7.0.1",
5432
+ "is-fullwidth-code-point": "^2.0.0",
5433
+ "strip-ansi": "^5.1.0"
5434
+ },
5435
+ "engines": {
5436
+ "node": ">=6"
5437
+ }
5438
+ },
5439
+ "node_modules/strip-ansi": {
5440
+ "version": "5.2.0",
5441
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
5442
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
5443
+ "dev": true,
5444
+ "dependencies": {
5445
+ "ansi-regex": "^4.1.0"
5446
+ },
5447
+ "engines": {
5448
+ "node": ">=6"
5449
+ }
5450
+ },
5451
+ "node_modules/supports-color": {
5452
+ "version": "5.5.0",
5453
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
5454
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
5455
+ "dev": true,
5456
+ "dependencies": {
5457
+ "has-flag": "^3.0.0"
5458
+ },
5459
+ "engines": {
5460
+ "node": ">=4"
5461
+ }
5462
+ },
5463
+ "node_modules/tannin": {
5464
+ "version": "1.2.0",
5465
+ "resolved": "https://registry.npmjs.org/tannin/-/tannin-1.2.0.tgz",
5466
+ "integrity": "sha512-U7GgX/RcSeUETbV7gYgoz8PD7Ni4y95pgIP/Z6ayI3CfhSujwKEBlGFTCRN+Aqnuyf4AN2yHL+L8x+TCGjb9uA==",
5467
+ "dependencies": {
5468
+ "@tannin/plural-forms": "^1.1.0"
5469
+ }
5470
+ },
5471
+ "node_modules/tapable": {
5472
+ "version": "1.1.3",
5473
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
5474
+ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
5475
+ "dev": true,
5476
+ "engines": {
5477
+ "node": ">=6"
5478
+ }
5479
+ },
5480
+ "node_modules/terser": {
5481
+ "version": "4.8.0",
5482
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
5483
+ "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
5484
+ "dev": true,
5485
+ "dependencies": {
5486
+ "commander": "^2.20.0",
5487
+ "source-map": "~0.6.1",
5488
+ "source-map-support": "~0.5.12"
5489
+ },
5490
+ "bin": {
5491
+ "terser": "bin/terser"
5492
+ },
5493
+ "engines": {
5494
+ "node": ">=6.0.0"
5495
+ }
5496
+ },
5497
+ "node_modules/terser-webpack-plugin": {
5498
+ "version": "1.4.4",
5499
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz",
5500
+ "integrity": "sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA==",
5501
+ "dev": true,
5502
+ "dependencies": {
5503
+ "cacache": "^12.0.2",
5504
+ "find-cache-dir": "^2.1.0",
5505
+ "is-wsl": "^1.1.0",
5506
+ "schema-utils": "^1.0.0",
5507
+ "serialize-javascript": "^3.1.0",
5508
+ "source-map": "^0.6.1",
5509
+ "terser": "^4.1.2",
5510
+ "webpack-sources": "^1.4.0",
5511
+ "worker-farm": "^1.7.0"
5512
+ },
5513
+ "engines": {
5514
+ "node": ">= 6.9.0"
5515
+ },
5516
+ "peerDependencies": {
5517
+ "webpack": "^4.0.0"
5518
+ }
5519
+ },
5520
+ "node_modules/terser-webpack-plugin/node_modules/schema-utils": {
5521
+ "version": "1.0.0",
5522
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
5523
+ "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
5524
+ "dev": true,
5525
+ "dependencies": {
5526
+ "ajv": "^6.1.0",
5527
+ "ajv-errors": "^1.0.0",
5528
+ "ajv-keywords": "^3.1.0"
5529
+ },
5530
+ "engines": {
5531
+ "node": ">= 4"
5532
+ }
5533
+ },
5534
+ "node_modules/terser-webpack-plugin/node_modules/source-map": {
5535
+ "version": "0.6.1",
5536
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
5537
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
5538
+ "dev": true,
5539
+ "engines": {
5540
+ "node": ">=0.10.0"
5541
+ }
5542
+ },
5543
+ "node_modules/terser/node_modules/source-map": {
5544
+ "version": "0.6.1",
5545
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
5546
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
5547
+ "dev": true,
5548
+ "engines": {
5549
+ "node": ">=0.10.0"
5550
+ }
5551
+ },
5552
+ "node_modules/through2": {
5553
+ "version": "2.0.5",
5554
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
5555
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
5556
+ "dev": true,
5557
+ "dependencies": {
5558
+ "readable-stream": "~2.3.6",
5559
+ "xtend": "~4.0.1"
5560
+ }
5561
+ },
5562
+ "node_modules/timers-browserify": {
5563
+ "version": "2.0.11",
5564
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz",
5565
+ "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==",
5566
+ "dev": true,
5567
+ "dependencies": {
5568
+ "setimmediate": "^1.0.4"
5569
+ },
5570
+ "engines": {
5571
+ "node": ">=0.6.0"
5572
+ }
5573
+ },
5574
+ "node_modules/to-arraybuffer": {
5575
+ "version": "1.0.1",
5576
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
5577
+ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
5578
+ "dev": true
5579
+ },
5580
+ "node_modules/to-fast-properties": {
5581
+ "version": "2.0.0",
5582
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
5583
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
5584
+ "dev": true,
5585
+ "engines": {
5586
+ "node": ">=4"
5587
+ }
5588
+ },
5589
+ "node_modules/to-object-path": {
5590
+ "version": "0.3.0",
5591
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
5592
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
5593
+ "dev": true,
5594
+ "dependencies": {
5595
+ "kind-of": "^3.0.2"
5596
+ },
5597
+ "engines": {
5598
+ "node": ">=0.10.0"
5599
+ }
5600
+ },
5601
+ "node_modules/to-object-path/node_modules/kind-of": {
5602
+ "version": "3.2.2",
5603
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5604
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5605
+ "dev": true,
5606
+ "dependencies": {
5607
+ "is-buffer": "^1.1.5"
5608
+ },
5609
+ "engines": {
5610
+ "node": ">=0.10.0"
5611
+ }
5612
+ },
5613
+ "node_modules/to-regex": {
5614
+ "version": "3.0.2",
5615
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
5616
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
5617
+ "dev": true,
5618
+ "dependencies": {
5619
+ "define-property": "^2.0.2",
5620
+ "extend-shallow": "^3.0.2",
5621
+ "regex-not": "^1.0.2",
5622
+ "safe-regex": "^1.1.0"
5623
+ },
5624
+ "engines": {
5625
+ "node": ">=0.10.0"
5626
+ }
5627
+ },
5628
+ "node_modules/to-regex-range": {
5629
+ "version": "2.1.1",
5630
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
5631
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
5632
+ "dev": true,
5633
+ "dependencies": {
5634
+ "is-number": "^3.0.0",
5635
+ "repeat-string": "^1.6.1"
5636
+ },
5637
+ "engines": {
5638
+ "node": ">=0.10.0"
5639
+ }
5640
+ },
5641
+ "node_modules/tslib": {
5642
+ "version": "1.13.0",
5643
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
5644
+ "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
5645
+ "dev": true
5646
+ },
5647
+ "node_modules/tty-browserify": {
5648
+ "version": "0.0.0",
5649
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
5650
+ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
5651
+ "dev": true
5652
+ },
5653
+ "node_modules/typedarray": {
5654
+ "version": "0.0.6",
5655
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
5656
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
5657
+ "dev": true
5658
+ },
5659
+ "node_modules/unicode-canonical-property-names-ecmascript": {
5660
+ "version": "1.0.4",
5661
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
5662
+ "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
5663
+ "dev": true,
5664
+ "engines": {
5665
+ "node": ">=4"
5666
+ }
5667
+ },
5668
+ "node_modules/unicode-match-property-ecmascript": {
5669
+ "version": "1.0.4",
5670
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
5671
+ "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
5672
+ "dev": true,
5673
+ "dependencies": {
5674
+ "unicode-canonical-property-names-ecmascript": "^1.0.4",
5675
+ "unicode-property-aliases-ecmascript": "^1.0.4"
5676
+ },
5677
+ "engines": {
5678
+ "node": ">=4"
5679
+ }
5680
+ },
5681
+ "node_modules/unicode-match-property-value-ecmascript": {
5682
+ "version": "1.2.0",
5683
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
5684
+ "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
5685
+ "dev": true,
5686
+ "engines": {
5687
+ "node": ">=4"
5688
+ }
5689
+ },
5690
+ "node_modules/unicode-property-aliases-ecmascript": {
5691
+ "version": "1.1.0",
5692
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
5693
+ "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
5694
+ "dev": true,
5695
+ "engines": {
5696
+ "node": ">=4"
5697
+ }
5698
+ },
5699
+ "node_modules/union-value": {
5700
+ "version": "1.0.1",
5701
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
5702
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
5703
+ "dev": true,
5704
+ "dependencies": {
5705
+ "arr-union": "^3.1.0",
5706
+ "get-value": "^2.0.6",
5707
+ "is-extendable": "^0.1.1",
5708
+ "set-value": "^2.0.1"
5709
+ },
5710
+ "engines": {
5711
+ "node": ">=0.10.0"
5712
+ }
5713
+ },
5714
+ "node_modules/unique-filename": {
5715
+ "version": "1.1.1",
5716
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
5717
+ "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
5718
+ "dev": true,
5719
+ "dependencies": {
5720
+ "unique-slug": "^2.0.0"
5721
+ }
5722
+ },
5723
+ "node_modules/unique-slug": {
5724
+ "version": "2.0.2",
5725
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz",
5726
+ "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==",
5727
+ "dev": true,
5728
+ "dependencies": {
5729
+ "imurmurhash": "^0.1.4"
5730
+ }
5731
+ },
5732
+ "node_modules/unset-value": {
5733
+ "version": "1.0.0",
5734
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
5735
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
5736
+ "dev": true,
5737
+ "dependencies": {
5738
+ "has-value": "^0.3.1",
5739
+ "isobject": "^3.0.0"
5740
+ },
5741
+ "engines": {
5742
+ "node": ">=0.10.0"
5743
+ }
5744
+ },
5745
+ "node_modules/unset-value/node_modules/has-value": {
5746
+ "version": "0.3.1",
5747
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
5748
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
5749
+ "dev": true,
5750
+ "dependencies": {
5751
+ "get-value": "^2.0.3",
5752
+ "has-values": "^0.1.4",
5753
+ "isobject": "^2.0.0"
5754
+ },
5755
+ "engines": {
5756
+ "node": ">=0.10.0"
5757
+ }
5758
+ },
5759
+ "node_modules/unset-value/node_modules/has-value/node_modules/isobject": {
5760
+ "version": "2.1.0",
5761
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
5762
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
5763
+ "dev": true,
5764
+ "dependencies": {
5765
+ "isarray": "1.0.0"
5766
+ },
5767
+ "engines": {
5768
+ "node": ">=0.10.0"
5769
+ }
5770
+ },
5771
+ "node_modules/unset-value/node_modules/has-values": {
5772
+ "version": "0.1.4",
5773
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
5774
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
5775
+ "dev": true,
5776
+ "engines": {
5777
+ "node": ">=0.10.0"
5778
+ }
5779
+ },
5780
+ "node_modules/upath": {
5781
+ "version": "1.2.0",
5782
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
5783
+ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
5784
+ "dev": true,
5785
+ "optional": true,
5786
+ "engines": {
5787
+ "node": ">=4",
5788
+ "yarn": "*"
5789
+ }
5790
+ },
5791
+ "node_modules/uri-js": {
5792
+ "version": "4.2.2",
5793
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
5794
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
5795
+ "dev": true,
5796
+ "dependencies": {
5797
+ "punycode": "^2.1.0"
5798
+ }
5799
+ },
5800
+ "node_modules/urix": {
5801
+ "version": "0.1.0",
5802
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
5803
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
5804
+ "deprecated": "Please see https://github.com/lydell/urix#deprecated",
5805
+ "dev": true
5806
+ },
5807
+ "node_modules/url": {
5808
+ "version": "0.11.0",
5809
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
5810
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
5811
+ "dev": true,
5812
+ "dependencies": {
5813
+ "punycode": "1.3.2",
5814
+ "querystring": "0.2.0"
5815
+ }
5816
+ },
5817
+ "node_modules/url/node_modules/punycode": {
5818
+ "version": "1.3.2",
5819
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
5820
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
5821
+ "dev": true
5822
+ },
5823
+ "node_modules/use": {
5824
+ "version": "3.1.1",
5825
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
5826
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
5827
+ "dev": true,
5828
+ "engines": {
5829
+ "node": ">=0.10.0"
5830
+ }
5831
+ },
5832
+ "node_modules/util": {
5833
+ "version": "0.11.1",
5834
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
5835
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
5836
+ "dev": true,
5837
+ "dependencies": {
5838
+ "inherits": "2.0.3"
5839
+ }
5840
+ },
5841
+ "node_modules/util-deprecate": {
5842
+ "version": "1.0.2",
5843
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
5844
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
5845
+ "dev": true
5846
+ },
5847
+ "node_modules/util/node_modules/inherits": {
5848
+ "version": "2.0.3",
5849
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
5850
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
5851
+ "dev": true
5852
+ },
5853
+ "node_modules/v8-compile-cache": {
5854
+ "version": "2.1.1",
5855
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
5856
+ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
5857
+ "dev": true
5858
+ },
5859
+ "node_modules/vm-browserify": {
5860
+ "version": "1.1.2",
5861
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
5862
+ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
5863
+ "dev": true
5864
+ },
5865
+ "node_modules/watchpack": {
5866
+ "version": "1.7.2",
5867
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz",
5868
+ "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==",
5869
+ "dev": true,
5870
+ "dependencies": {
5871
+ "graceful-fs": "^4.1.2",
5872
+ "neo-async": "^2.5.0"
5873
+ },
5874
+ "optionalDependencies": {
5875
+ "chokidar": "^3.4.0",
5876
+ "watchpack-chokidar2": "^2.0.0"
5877
+ }
5878
+ },
5879
+ "node_modules/watchpack-chokidar2": {
5880
+ "version": "2.0.0",
5881
+ "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz",
5882
+ "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==",
5883
+ "dev": true,
5884
+ "optional": true,
5885
+ "dependencies": {
5886
+ "chokidar": "^2.1.8"
5887
+ },
5888
+ "engines": {
5889
+ "node": "<8.10.0"
5890
+ }
5891
+ },
5892
+ "node_modules/watchpack-chokidar2/node_modules/anymatch": {
5893
+ "version": "2.0.0",
5894
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
5895
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
5896
+ "dev": true,
5897
+ "optional": true,
5898
+ "dependencies": {
5899
+ "micromatch": "^3.1.4",
5900
+ "normalize-path": "^2.1.1"
5901
+ }
5902
+ },
5903
+ "node_modules/watchpack-chokidar2/node_modules/anymatch/node_modules/normalize-path": {
5904
+ "version": "2.1.1",
5905
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
5906
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
5907
+ "dev": true,
5908
+ "optional": true,
5909
+ "dependencies": {
5910
+ "remove-trailing-separator": "^1.0.1"
5911
+ },
5912
+ "engines": {
5913
+ "node": ">=0.10.0"
5914
+ }
5915
+ },
5916
+ "node_modules/watchpack-chokidar2/node_modules/binary-extensions": {
5917
+ "version": "1.13.1",
5918
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
5919
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
5920
+ "dev": true,
5921
+ "optional": true,
5922
+ "engines": {
5923
+ "node": ">=0.10.0"
5924
+ }
5925
+ },
5926
+ "node_modules/watchpack-chokidar2/node_modules/chokidar": {
5927
+ "version": "2.1.8",
5928
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
5929
+ "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
5930
+ "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies",
5931
+ "dev": true,
5932
+ "optional": true,
5933
+ "dependencies": {
5934
+ "anymatch": "^2.0.0",
5935
+ "async-each": "^1.0.1",
5936
+ "braces": "^2.3.2",
5937
+ "glob-parent": "^3.1.0",
5938
+ "inherits": "^2.0.3",
5939
+ "is-binary-path": "^1.0.0",
5940
+ "is-glob": "^4.0.0",
5941
+ "normalize-path": "^3.0.0",
5942
+ "path-is-absolute": "^1.0.0",
5943
+ "readdirp": "^2.2.1",
5944
+ "upath": "^1.1.1"
5945
+ },
5946
+ "optionalDependencies": {
5947
+ "fsevents": "^1.2.7"
5948
+ }
5949
+ },
5950
+ "node_modules/watchpack-chokidar2/node_modules/fsevents": {
5951
+ "version": "1.2.13",
5952
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
5953
+ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
5954
+ "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
5955
+ "dev": true,
5956
+ "hasInstallScript": true,
5957
+ "optional": true,
5958
+ "os": [
5959
+ "darwin"
5960
+ ],
5961
+ "dependencies": {
5962
+ "bindings": "^1.5.0",
5963
+ "nan": "^2.12.1"
5964
+ },
5965
+ "engines": {
5966
+ "node": ">= 4.0"
5967
+ }
5968
+ },
5969
+ "node_modules/watchpack-chokidar2/node_modules/glob-parent": {
5970
+ "version": "3.1.0",
5971
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
5972
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
5973
+ "dev": true,
5974
+ "optional": true,
5975
+ "dependencies": {
5976
+ "is-glob": "^3.1.0",
5977
+ "path-dirname": "^1.0.0"
5978
+ }
5979
+ },
5980
+ "node_modules/watchpack-chokidar2/node_modules/glob-parent/node_modules/is-glob": {
5981
+ "version": "3.1.0",
5982
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
5983
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
5984
+ "dev": true,
5985
+ "optional": true,
5986
+ "dependencies": {
5987
+ "is-extglob": "^2.1.0"
5988
+ },
5989
+ "engines": {
5990
+ "node": ">=0.10.0"
5991
+ }
5992
+ },
5993
+ "node_modules/watchpack-chokidar2/node_modules/is-binary-path": {
5994
+ "version": "1.0.1",
5995
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
5996
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
5997
+ "dev": true,
5998
+ "optional": true,
5999
+ "dependencies": {
6000
+ "binary-extensions": "^1.0.0"
6001
+ },
6002
+ "engines": {
6003
+ "node": ">=0.10.0"
6004
+ }
6005
+ },
6006
+ "node_modules/watchpack-chokidar2/node_modules/readdirp": {
6007
+ "version": "2.2.1",
6008
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
6009
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
6010
+ "dev": true,
6011
+ "optional": true,
6012
+ "dependencies": {
6013
+ "graceful-fs": "^4.1.11",
6014
+ "micromatch": "^3.1.10",
6015
+ "readable-stream": "^2.0.2"
6016
+ },
6017
+ "engines": {
6018
+ "node": ">=0.10"
6019
+ }
6020
+ },
6021
+ "node_modules/webidl-conversions": {
6022
+ "version": "5.0.0",
6023
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz",
6024
+ "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==",
6025
+ "engines": {
6026
+ "node": ">=8"
6027
+ }
6028
+ },
6029
+ "node_modules/webpack": {
6030
+ "version": "4.43.0",
6031
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz",
6032
+ "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==",
6033
+ "dev": true,
6034
+ "dependencies": {
6035
+ "@webassemblyjs/ast": "1.9.0",
6036
+ "@webassemblyjs/helper-module-context": "1.9.0",
6037
+ "@webassemblyjs/wasm-edit": "1.9.0",
6038
+ "@webassemblyjs/wasm-parser": "1.9.0",
6039
+ "acorn": "^6.4.1",
6040
+ "ajv": "^6.10.2",
6041
+ "ajv-keywords": "^3.4.1",
6042
+ "chrome-trace-event": "^1.0.2",
6043
+ "enhanced-resolve": "^4.1.0",
6044
+ "eslint-scope": "^4.0.3",
6045
+ "json-parse-better-errors": "^1.0.2",
6046
+ "loader-runner": "^2.4.0",
6047
+ "loader-utils": "^1.2.3",
6048
+ "memory-fs": "^0.4.1",
6049
+ "micromatch": "^3.1.10",
6050
+ "mkdirp": "^0.5.3",
6051
+ "neo-async": "^2.6.1",
6052
+ "node-libs-browser": "^2.2.1",
6053
+ "schema-utils": "^1.0.0",
6054
+ "tapable": "^1.1.3",
6055
+ "terser-webpack-plugin": "^1.4.3",
6056
+ "watchpack": "^1.6.1",
6057
+ "webpack-sources": "^1.4.1"
6058
+ },
6059
+ "bin": {
6060
+ "webpack": "bin/webpack.js"
6061
+ },
6062
+ "engines": {
6063
+ "node": ">=6.11.5"
6064
+ },
6065
+ "funding": {
6066
+ "type": "opencollective",
6067
+ "url": "https://opencollective.com/webpack"
6068
+ }
6069
+ },
6070
+ "node_modules/webpack-cli": {
6071
+ "version": "3.3.12",
6072
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz",
6073
+ "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==",
6074
+ "dev": true,
6075
+ "dependencies": {
6076
+ "chalk": "^2.4.2",
6077
+ "cross-spawn": "^6.0.5",
6078
+ "enhanced-resolve": "^4.1.1",
6079
+ "findup-sync": "^3.0.0",
6080
+ "global-modules": "^2.0.0",
6081
+ "import-local": "^2.0.0",
6082
+ "interpret": "^1.4.0",
6083
+ "loader-utils": "^1.4.0",
6084
+ "supports-color": "^6.1.0",
6085
+ "v8-compile-cache": "^2.1.1",
6086
+ "yargs": "^13.3.2"
6087
+ },
6088
+ "bin": {
6089
+ "webpack-cli": "bin/cli.js"
6090
+ },
6091
+ "engines": {
6092
+ "node": ">=6.11.5"
6093
+ },
6094
+ "peerDependencies": {
6095
+ "webpack": "4.x.x"
6096
+ }
6097
+ },
6098
+ "node_modules/webpack-cli/node_modules/supports-color": {
6099
+ "version": "6.1.0",
6100
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
6101
+ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
6102
+ "dev": true,
6103
+ "dependencies": {
6104
+ "has-flag": "^3.0.0"
6105
+ },
6106
+ "engines": {
6107
+ "node": ">=6"
6108
+ }
6109
+ },
6110
+ "node_modules/webpack-sources": {
6111
+ "version": "1.4.3",
6112
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
6113
+ "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==",
6114
+ "dev": true,
6115
+ "dependencies": {
6116
+ "source-list-map": "^2.0.0",
6117
+ "source-map": "~0.6.1"
6118
+ }
6119
+ },
6120
+ "node_modules/webpack-sources/node_modules/source-map": {
6121
+ "version": "0.6.1",
6122
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
6123
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
6124
+ "dev": true,
6125
+ "engines": {
6126
+ "node": ">=0.10.0"
6127
+ }
6128
+ },
6129
+ "node_modules/webpack/node_modules/schema-utils": {
6130
+ "version": "1.0.0",
6131
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
6132
+ "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
6133
+ "dev": true,
6134
+ "dependencies": {
6135
+ "ajv": "^6.1.0",
6136
+ "ajv-errors": "^1.0.0",
6137
+ "ajv-keywords": "^3.1.0"
6138
+ },
6139
+ "engines": {
6140
+ "node": ">= 4"
6141
+ }
6142
+ },
6143
+ "node_modules/whatwg-url-without-unicode": {
6144
+ "version": "8.0.0-1",
6145
+ "resolved": "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-1.tgz",
6146
+ "integrity": "sha512-0Uy8mjsG5O8Y53327XL+ZqsrMdxO1CL/6m840SmW5iyRWFvU2zlxS2RzpD3pFFVKYOKCmsKn5JKzWxQ+bImnWA==",
6147
+ "dependencies": {
6148
+ "webidl-conversions": "^5.0.0"
6149
+ },
6150
+ "engines": {
6151
+ "node": ">=10"
6152
+ }
6153
+ },
6154
+ "node_modules/which": {
6155
+ "version": "1.3.1",
6156
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
6157
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
6158
+ "dev": true,
6159
+ "dependencies": {
6160
+ "isexe": "^2.0.0"
6161
+ },
6162
+ "bin": {
6163
+ "which": "bin/which"
6164
+ }
6165
+ },
6166
+ "node_modules/which-module": {
6167
+ "version": "2.0.0",
6168
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
6169
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
6170
+ "dev": true
6171
+ },
6172
+ "node_modules/worker-farm": {
6173
+ "version": "1.7.0",
6174
+ "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",
6175
+ "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==",
6176
+ "dev": true,
6177
+ "dependencies": {
6178
+ "errno": "~0.1.7"
6179
+ }
6180
+ },
6181
+ "node_modules/wrap-ansi": {
6182
+ "version": "5.1.0",
6183
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
6184
+ "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
6185
+ "dev": true,
6186
+ "dependencies": {
6187
+ "ansi-styles": "^3.2.0",
6188
+ "string-width": "^3.0.0",
6189
+ "strip-ansi": "^5.0.0"
6190
+ },
6191
+ "engines": {
6192
+ "node": ">=6"
6193
+ }
6194
+ },
6195
+ "node_modules/wrappy": {
6196
+ "version": "1.0.2",
6197
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
6198
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
6199
+ "dev": true
6200
+ },
6201
+ "node_modules/xtend": {
6202
+ "version": "4.0.2",
6203
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
6204
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
6205
+ "dev": true,
6206
+ "engines": {
6207
+ "node": ">=0.4"
6208
+ }
6209
+ },
6210
+ "node_modules/y18n": {
6211
+ "version": "4.0.0",
6212
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
6213
+ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
6214
+ "dev": true
6215
+ },
6216
+ "node_modules/yallist": {
6217
+ "version": "3.1.1",
6218
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
6219
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
6220
+ "dev": true
6221
+ },
6222
+ "node_modules/yargs": {
6223
+ "version": "13.3.2",
6224
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
6225
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
6226
+ "dev": true,
6227
+ "dependencies": {
6228
+ "cliui": "^5.0.0",
6229
+ "find-up": "^3.0.0",
6230
+ "get-caller-file": "^2.0.1",
6231
+ "require-directory": "^2.1.1",
6232
+ "require-main-filename": "^2.0.0",
6233
+ "set-blocking": "^2.0.0",
6234
+ "string-width": "^3.0.0",
6235
+ "which-module": "^2.0.0",
6236
+ "y18n": "^4.0.0",
6237
+ "yargs-parser": "^13.1.2"
6238
+ }
6239
+ },
6240
+ "node_modules/yargs-parser": {
6241
+ "version": "13.1.2",
6242
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
6243
+ "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
6244
+ "dev": true,
6245
+ "dependencies": {
6246
+ "camelcase": "^5.0.0",
6247
+ "decamelize": "^1.2.0"
6248
+ }
6249
+ }
6250
+ },
6251
  "dependencies": {
6252
  "@babel/code-frame": {
6253
  "version": "7.10.4",
7589
  "version": "1.0.1",
7590
  "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
7591
  "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
7592
+ "dev": true,
7593
+ "requires": {}
7594
  },
7595
  "ajv-keywords": {
7596
  "version": "3.5.1",
7597
  "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz",
7598
  "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==",
7599
+ "dev": true,
7600
+ "requires": {}
7601
  },
7602
  "ansi-regex": {
7603
  "version": "4.1.0",
10780
  "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
10781
  "dev": true
10782
  },
10783
+ "string_decoder": {
10784
+ "version": "1.1.1",
10785
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
10786
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
10787
+ "dev": true,
10788
+ "requires": {
10789
+ "safe-buffer": "~5.1.0"
10790
+ }
10791
+ },
10792
  "string-width": {
10793
  "version": "3.1.0",
10794
  "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
10800
  "strip-ansi": "^5.1.0"
10801
  }
10802
  },
 
 
 
 
 
 
 
 
 
10803
  "strip-ansi": {
10804
  "version": "5.2.0",
10805
  "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
public/class-wpvr-public.php CHANGED
@@ -111,7 +111,9 @@ class Wpvr_Public
111
  wp_enqueue_style($this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all');
112
  }
113
  wp_enqueue_style('panellium-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/pannellum.css', array(), true);
114
- wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true);
 
 
115
  wp_enqueue_style('owl-css', plugin_dir_url(__FILE__) . 'css/owl.carousel.css', array(), $this->version, 'all');
116
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-public.css', array(), $this->version, 'all');
117
  }
@@ -165,7 +167,9 @@ class Wpvr_Public
165
  if (strpos($current_url, $value) !== false) {
166
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
167
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
168
- wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true);
 
 
169
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
170
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
171
  wp_enqueue_script('jquery_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', array('jquery'), true);
@@ -179,7 +183,9 @@ class Wpvr_Public
179
  } else {
180
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
181
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
182
- wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true);
 
 
183
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
184
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
185
  wp_enqueue_script('jquery_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', array('jquery'), true);
@@ -193,7 +199,7 @@ class Wpvr_Public
193
  $match_found = false;
194
  if ($wpvr_video_script_control == 'true') {
195
  foreach ($allowed_video_pages_modified as $value) {
196
- if (strpos($current_url, $value) !== false) {
197
  $match_found = true;
198
  wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true);
199
  }
@@ -228,6 +234,7 @@ class Wpvr_Public
228
  'id' => 0,
229
  'width' => null,
230
  'height' => null,
 
231
  'radius' => null
232
  ),
233
  $atts
@@ -243,6 +250,10 @@ class Wpvr_Public
243
  }
244
  }
245
 
 
 
 
 
246
  $postdata = get_post_meta($id, 'panodata', true);
247
  $panoid = 'pano' . $id;
248
 
@@ -346,17 +357,34 @@ class Wpvr_Public
346
  </style>
347
 
348
  ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  $html .= '<script>';
350
- $html .= 'var player = videojs(' . $postdata['vidid'] . ', {';
351
- $html .= 'plugins: {';
352
- $html .= 'pannellum: {}';
353
- $html .= '}';
354
- $html .= '});';
355
  $html .= '
356
- videojs(' . $postdata['vidid'] . ').play();
357
- ';
 
 
 
 
 
 
 
 
358
  $html .= '</script>';
359
- $html .= '</div>';
360
  }
361
 
362
  return $html;
@@ -409,6 +437,19 @@ class Wpvr_Public
409
  }
410
  }
411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  $mouseZoom = true;
413
  if (isset($postdata['mouseZoom'])) {
414
  $mouseZoom = $postdata['mouseZoom'];
@@ -594,7 +635,6 @@ class Wpvr_Public
594
  $hotspot_datas = array();
595
  if (isset($panoscenes["hotspot-list"])) {
596
  $hotspot_datas = $panoscenes["hotspot-list"];
597
-
598
  }
599
 
600
  $hotspots = array();
@@ -631,6 +671,12 @@ class Wpvr_Public
631
  $hotspot_content = $hotspot_data["hotspot-content"];
632
  }
633
 
 
 
 
 
 
 
634
  $hotspot_info = array(
635
  "text" => $hotspot_data["hotspot-title"],
636
  "pitch" => $hotspot_data["hotspot-pitch"],
@@ -638,7 +684,7 @@ class Wpvr_Public
638
  "type" => $hotspot_type,
639
  "cssClass" => $hotspot_data["hotspot-customclass"],
640
  "URL" => $hotspot_data["hotspot-url"],
641
- "wpvr_url_open" => $hotspot_data["wpvr_url_open"][0],
642
  "clickHandlerArgs" => $hotspot_content,
643
  "createTooltipArgs" => $hotspot_data["hotspot-hover"],
644
  "sceneId" => $hotspot_data["hotspot-scene"],
@@ -872,6 +918,7 @@ class Wpvr_Public
872
  }
873
 
874
  $html .= '</style>';
 
875
  if ($width == 'fullwidth') {
876
  if (wpvr_isMobileDevice()) {
877
  if ($radius) {
@@ -887,14 +934,22 @@ class Wpvr_Public
887
  }
888
  }
889
  } elseif ($width == 'embed') {
890
- // if (apply_filters('is_wpvr_embed_addon_premium', false)) {
891
  $html .= '<div id="pano' . $id . '" class="pano-wrap vrembed" style=" text-align:center; direction:ltr;" >';
892
- // }
893
  } else {
894
- if ($radius) {
895
- $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
 
 
 
 
 
 
896
  } else {
897
- $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; direction:ltr;">';
 
 
 
 
898
  }
899
  }
900
 
@@ -1009,6 +1064,18 @@ class Wpvr_Public
1009
  }
1010
  $html .= '</div>';
1011
  }
 
 
 
 
 
 
 
 
 
 
 
 
1012
  }
1013
  //===Custom Control===//
1014
 
@@ -1085,7 +1152,16 @@ class Wpvr_Public
1085
  }
1086
  }
1087
 
1088
-
 
 
 
 
 
 
 
 
 
1089
 
1090
 
1091
  $html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
@@ -1173,8 +1249,8 @@ class Wpvr_Public
1173
 
1174
  $html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
1175
  $html .= '}';
1176
-
1177
- if (wpvr_isMobileDevice() && get_option( 'dis_on_hover' ) == "true") {
1178
  } else {
1179
  $html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
1180
  $html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
@@ -1310,6 +1386,45 @@ class Wpvr_Public
1310
  $angle_down = '<i class="fa fa-angle-down"></i>';
1311
  $sin_qout = "'";
1312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1313
  if ($vrgallery_display) {
1314
 
1315
  if (!$autoload) {
@@ -1430,6 +1545,11 @@ class Wpvr_Public
1430
  }
1431
 
1432
  //==Old code working properly==//
 
 
 
 
 
1433
  $html .= '
1434
  jQuery(".elementor-tab-title").click(function(){
1435
  var element_id;
@@ -1447,8 +1567,9 @@ class Wpvr_Public
1447
  jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1448
  jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1449
  panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
 
1450
  setTimeout(function() {
1451
- panoshow' . $id . '.loadScene("' . $default_scene . '");
1452
  window.dispatchEvent(new Event("resize"));
1453
  if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1454
  jQuery("#controls' . $id . '").css("bottom", "55px");
@@ -1456,6 +1577,7 @@ class Wpvr_Public
1456
  else {
1457
  jQuery("#controls' . $id . '").css("bottom", "5px");
1458
  }
 
1459
  }, 200);
1460
  }
1461
  }
111
  wp_enqueue_style($this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all');
112
  }
113
  wp_enqueue_style('panellium-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/pannellum.css', array(), true);
114
+ // wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true); // commented for video js vr
115
+ wp_enqueue_style('videojs-css', 'https://vjs.zencdn.net/7.18.1/video-js.css', array(), true); // commented for video js vr
116
+ wp_enqueue_style('videojs-vr-css', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.css', array(), true); //video js VR
117
  wp_enqueue_style('owl-css', plugin_dir_url(__FILE__) . 'css/owl.carousel.css', array(), $this->version, 'all');
118
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-public.css', array(), $this->version, 'all');
119
  }
167
  if (strpos($current_url, $value) !== false) {
168
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
169
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
170
+ // wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); //commented for video js vr
171
+ wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
172
+ wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
173
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
174
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
175
  wp_enqueue_script('jquery_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', array('jquery'), true);
183
  } else {
184
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
185
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
186
+ // wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); // commented for video js vr
187
+ wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
188
+ wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
189
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
190
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
191
  wp_enqueue_script('jquery_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', array('jquery'), true);
199
  $match_found = false;
200
  if ($wpvr_video_script_control == 'true') {
201
  foreach ($allowed_video_pages_modified as $value) {
202
+ if (strpos($current_url, $value) !== false && strpos($current_url, $value) !== 0) {
203
  $match_found = true;
204
  wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true);
205
  }
234
  'id' => 0,
235
  'width' => null,
236
  'height' => null,
237
+ 'mobile_height' => null,
238
  'radius' => null
239
  ),
240
  $atts
250
  }
251
  }
252
 
253
+ if (empty($mobile_height)) {
254
+ $mobile_height = "300px";
255
+ }
256
+
257
  $postdata = get_post_meta($id, 'panodata', true);
258
  $panoid = 'pano' . $id;
259
 
357
  </style>
358
 
359
  ';
360
+ // $html .= '<script>';
361
+ // $html .= 'var player = videojs(' . c . ', {';
362
+ // $html .= 'plugins: {';
363
+ // $html .= 'pannellum: {}';
364
+ // $html .= '}';
365
+ // $html .= '});';
366
+ // $html .= '
367
+ // videojs(' . $postdata['vidid'] . ').play();
368
+ // ';
369
+ // $html .= '</script>';
370
+ $html .= '</div>';
371
+
372
+
373
+ //video js vr setup //
374
  $html .= '<script>';
 
 
 
 
 
375
  $html .= '
376
+ (function (window, videojs) {
377
+ var player = window.player = videojs("' . $postdata['vidid'] . '");
378
+ player.mediainfo = player.mediainfo || {};
379
+ player.mediainfo.projection = "equirectangular";
380
+
381
+ // AUTO is the default and looks at mediainfo
382
+ var vr = window.vr = player.vr({ projection: "AUTO", debug: true, forceCardboard: false, antialias: false });
383
+ }(window, window.videojs));
384
+
385
+ ';
386
  $html .= '</script>';
387
+ //video js vr end //
388
  }
389
 
390
  return $html;
437
  }
438
  }
439
 
440
+ //===explainer handle===//
441
+
442
+ $explainer_right = "10px";
443
+ if ((isset($postdata['compass']) && $postdata['compass'] == true) && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
444
+ $explainer_right = "90px";
445
+ } elseif (isset($postdata['compass']) && $postdata['compass'] == true) {
446
+ $explainer_right = "60px";
447
+ } elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
448
+ $explainer_right = "30px";
449
+ }
450
+
451
+ //===explainer handle===//
452
+
453
  $mouseZoom = true;
454
  if (isset($postdata['mouseZoom'])) {
455
  $mouseZoom = $postdata['mouseZoom'];
635
  $hotspot_datas = array();
636
  if (isset($panoscenes["hotspot-list"])) {
637
  $hotspot_datas = $panoscenes["hotspot-list"];
 
638
  }
639
 
640
  $hotspots = array();
671
  $hotspot_content = $hotspot_data["hotspot-content"];
672
  }
673
 
674
+ if (isset($hotspot_data["wpvr_url_open"][0])) {
675
+ $wpvr_url_open = $hotspot_data["wpvr_url_open"][0];
676
+ } else {
677
+ $wpvr_url_open = "off";
678
+ }
679
+
680
  $hotspot_info = array(
681
  "text" => $hotspot_data["hotspot-title"],
682
  "pitch" => $hotspot_data["hotspot-pitch"],
684
  "type" => $hotspot_type,
685
  "cssClass" => $hotspot_data["hotspot-customclass"],
686
  "URL" => $hotspot_data["hotspot-url"],
687
+ "wpvr_url_open" => $wpvr_url_open,
688
  "clickHandlerArgs" => $hotspot_content,
689
  "createTooltipArgs" => $hotspot_data["hotspot-hover"],
690
  "sceneId" => $hotspot_data["hotspot-scene"],
918
  }
919
 
920
  $html .= '</style>';
921
+
922
  if ($width == 'fullwidth') {
923
  if (wpvr_isMobileDevice()) {
924
  if ($radius) {
934
  }
935
  }
936
  } elseif ($width == 'embed') {
 
937
  $html .= '<div id="pano' . $id . '" class="pano-wrap vrembed" style=" text-align:center; direction:ltr;" >';
 
938
  } else {
939
+ // $browser_width = "<script>document.write(screen.width);</script>";
940
+
941
+ if (wpvr_isMobileDevice()) {
942
+ if ($radius) {
943
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
944
+ } else {
945
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; direction:ltr;">';
946
+ }
947
  } else {
948
+ if ($radius) {
949
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
950
+ } else {
951
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; direction:ltr;">';
952
+ }
953
  }
954
  }
955
 
1064
  }
1065
  $html .= '</div>';
1066
  }
1067
+ //===explainer button===//
1068
+ $explainerControlSwitch = '';
1069
+ if (isset($custom_control['explainerSwitch'])) {
1070
+ $explainerControlSwitch = $custom_control['explainerSwitch'];
1071
+ }
1072
+ if ($explainerControlSwitch == "on") {
1073
+ $html .= '<div class="explainer_button" id="explainer_button_' . $id . '" style="right:' . $explainer_right . '">';
1074
+ $html .= '<div class="ctrl" id="explainer_target_' . $id . '"><i class="' . $custom_control['explainerIcon'] . '" style="color:' . $custom_control['explainerColor'] . ';"></i></div>';
1075
+ $html .= '</div>';
1076
+ }
1077
+
1078
+ //===explainer button===//
1079
  }
1080
  //===Custom Control===//
1081
 
1152
  }
1153
  }
1154
 
1155
+ //===Explainer video section===//
1156
+ $explainerContent = "";
1157
+ if (isset($postdata['explainerContent'])) {
1158
+ $explainerContent = $postdata['explainerContent'];
1159
+ }
1160
+ $html .= '<div class="explainer" id="explainer' . $id . '" style="display: none">';
1161
+ $html .= '<span class="close-explainer-video"><i class="fa fa-times"></i></span>';
1162
+ $html .= '' . $explainerContent . '';
1163
+ $html .= '</div>';
1164
+ //===Explainer video section End===//
1165
 
1166
 
1167
  $html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
1249
 
1250
  $html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
1251
  $html .= '}';
1252
+
1253
+ if (wpvr_isMobileDevice() && get_option('dis_on_hover') == "true") {
1254
  } else {
1255
  $html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
1256
  $html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
1386
  $angle_down = '<i class="fa fa-angle-down"></i>';
1387
  $sin_qout = "'";
1388
 
1389
+ //===Explainer Script===//
1390
+
1391
+ if ($autoplay_bg_music == 'on') {
1392
+
1393
+ $html .= '
1394
+ jQuery(document).on("click","#explainer_button_' . $id . '",function() {
1395
+ jQuery("#explainer' . $id . '").slideToggle();
1396
+
1397
+ playing' . $id . ' = false;
1398
+ var x' . $id . ' = document.getElementById("vrAudio' . $id . '");
1399
+ jQuery("#vr-volume' . $id . '").removeClass("fas fa-volume-up");
1400
+ jQuery("#vr-volume' . $id . '").addClass("fas fa-volume-mute");
1401
+ x' . $id . '.pause();
1402
+ });
1403
+
1404
+ jQuery(document).on("click",".close-explainer-video",function() {
1405
+ jQuery(this).parent(".explainer").hide();
1406
+ var el_src = jQuery(".vr-iframe").attr("src");
1407
+ jQuery(".vr-iframe").attr("src", el_src);
1408
+ });
1409
+
1410
+ ';
1411
+ } else {
1412
+ $html .= '
1413
+ jQuery(document).on("click","#explainer_button_' . $id . '",function() {
1414
+ jQuery("#explainer' . $id . '").slideToggle();
1415
+ });
1416
+
1417
+ jQuery(document).on("click",".close-explainer-video",function() {
1418
+ jQuery(this).parent(".explainer").hide();
1419
+ var el_src = jQuery(".vr-iframe").attr("src");
1420
+ jQuery(".vr-iframe").attr("src", el_src);
1421
+ });
1422
+
1423
+ ';
1424
+ }
1425
+
1426
+ //===Explainer Script End===//
1427
+
1428
  if ($vrgallery_display) {
1429
 
1430
  if (!$autoload) {
1545
  }
1546
 
1547
  //==Old code working properly==//
1548
+
1549
+ $previeword = "Click to Load Panorama";
1550
+ if (isset($postdata['previewtext']) && $postdata['previewtext'] != '') {
1551
+ $previeword = $postdata['previewtext'];
1552
+ }
1553
  $html .= '
1554
  jQuery(".elementor-tab-title").click(function(){
1555
  var element_id;
1567
  jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1568
  jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1569
  panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
1570
+ jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $previeword . '")
1571
  setTimeout(function() {
1572
+ // panoshow' . $id . '.loadScene("' . $default_scene . '");
1573
  window.dispatchEvent(new Event("resize"));
1574
  if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1575
  jQuery("#controls' . $id . '").css("bottom", "55px");
1577
  else {
1578
  jQuery("#controls' . $id . '").css("bottom", "5px");
1579
  }
1580
+
1581
  }, 200);
1582
  }
1583
  }
public/css/owl.carousel.css CHANGED
@@ -51,7 +51,7 @@
51
  width: 100%; }
52
  .vrowl-carousel .owl-nav.disabled,
53
  .vrowl-carousel .owl-dots.disabled {
54
- display: block; }
55
  .vrowl-carousel .owl-nav .owl-prev,
56
  .vrowl-carousel .owl-nav .owl-next,
57
  .vrowl-carousel .owl-dot {
51
  width: 100%; }
52
  .vrowl-carousel .owl-nav.disabled,
53
  .vrowl-carousel .owl-dots.disabled {
54
+ display: none; }
55
  .vrowl-carousel .owl-nav .owl-prev,
56
  .vrowl-carousel .owl-nav .owl-next,
57
  .vrowl-carousel .owl-dot {
public/css/wpvr-public.css CHANGED
@@ -3,6 +3,57 @@
3
  * included in this file.
4
  */
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  .wpvr-navbar-container {
7
  position: absolute;
8
  top: 5px;
@@ -16,12 +67,12 @@
16
  right: 0;
17
  }
18
 
19
- .wpvr-navbar-container > li {
20
  margin: 10px;
21
 
22
  }
23
 
24
- .wpvr-navbar-container > li > a {
25
  color: #fff;
26
  text-decoration: none;
27
  font-size: 16px;
@@ -33,12 +84,12 @@
33
  position: absolute;
34
  }
35
 
36
- .wpvr-navbar-container > li:hover .wpvr-navbar-dropdown {
37
  display: block;
38
  margin-left: -50px;
39
- }
40
 
41
- .wpvr-navbar-dropdown > li > a {
42
  text-decoration: none;
43
  color: #fff;
44
  }
@@ -55,6 +106,7 @@
55
  padding: 0 15px;
56
  box-sizing: border-box;
57
  }
 
58
  .wpvr-home-content * {
59
  box-sizing: border-box;
60
  }
@@ -64,27 +116,29 @@
64
  line-height: 1.2;
65
  margin-bottom: 10px;
66
  }
 
67
  .wpvr-home-subtitle {
68
  font-size: calc(18px + (28 - 18) * ((100vw - 320px) / (1920 - 320)));
69
  line-height: 1.2;
70
  }
71
 
72
- @media only screen and (min-width: 1921px) {
73
  .wpvr-home-title {
74
  font-size: 60px;
75
  }
 
76
  .wpvr-home-subtitle {
77
  font-size: 18px;
78
  }
79
  }
80
 
81
  .wpvr-topnav {
82
- position: absolute;
83
- bottom: 0;
84
- z-index: 2;
85
- text-align: center;
86
- width: 100%;
87
- padding-bottom: 3px;
88
  }
89
 
90
  .wpvr-mobile-notice {
@@ -101,6 +155,7 @@
101
  display: none;
102
  z-index: 9;
103
  }
 
104
  .wpvr-mobile-notice p {
105
  color: #fff;
106
  margin: 0;
@@ -108,6 +163,7 @@
108
  margin-right: 17px;
109
  width: calc(100% - 20px);
110
  }
 
111
  .wpvr-mobile-notice .notice-close {
112
  font-size: 11px;
113
  border: 1px solid;
@@ -127,12 +183,14 @@
127
  right: 10px;
128
  z-index: 2;
129
  }
 
130
  .cp-logo-ctrl {
131
  height: auto;
132
  display: inline-block;
133
  cursor: pointer;
134
  margin: 0 auto;
135
  }
 
136
  .cp-logo-ctrl img {
137
  max-width: 100px !important;
138
  margin-left: auto;
@@ -155,13 +213,14 @@
155
  position: relative;
156
  background: #fff;
157
  max-width: 350px;
158
- width: auto;
159
  padding: 10px;
160
  border-radius: 5px;
161
  margin-top: 5px;
162
  display: none;
163
  transition: all 0.3s ease;
164
  }
 
165
  #cp-logo-controls .cp-logo-ctrl.show .cp-info {
166
  display: block;
167
  }
@@ -176,6 +235,7 @@
176
  flex-flow: column;
177
  background: rgba(255, 255, 255, 0.27);
178
  }
 
179
  .zoom-in-out-controls .ctrl {
180
  padding: 2px 0;
181
  }
@@ -193,7 +253,7 @@
193
  }
194
 
195
  .pnlm-load-button p {
196
- color: #fff!important;
197
  }
198
 
199
  .ctrl {
@@ -202,9 +262,11 @@
202
  display: inline-block;
203
  cursor: pointer;
204
  }
 
205
  .ctrl i {
206
  font-size: 18px;
207
  }
 
208
  .ctrl:hover {
209
  background: none;
210
  }
@@ -212,26 +274,31 @@
212
  .controls .ctrl {
213
  position: absolute;
214
  }
 
215
  .pan-up {
216
  left: 50%;
217
  top: 0;
218
  transform: translateX(-50%);
219
  }
 
220
  .pan-down {
221
  bottom: 0;
222
  left: 50%;
223
  transform: translateX(-50%);
224
  }
 
225
  .pan-left {
226
  left: 0;
227
  top: 50%;
228
  transform: translateY(-50%);
229
  }
 
230
  .pan-right {
231
  right: 0;
232
  top: 50%;
233
  transform: translateY(-50%);
234
  }
 
235
  .ctrl.fullscreen {
236
  top: 50%;
237
  left: 50%;
@@ -240,52 +307,114 @@
240
 
241
  div.pnlm-hotspot-base.fas:before,
242
  div.pnlm-hotspot-base.fab:before,
243
- div.pnlm-hotspot-base.far:before{
244
  font-size: 14px;
245
  position: absolute;
246
  left: 50%;
247
  top: 50%;
248
  transform: translate(-50%, -50%);
249
  }
 
250
  .vrbounce {
251
- display: inline-block;
252
- position: relative;
253
- -moz-animation: vrbounce 0.5s infinite linear;
254
- -o-animation: vrbounce 0.5s infinite linear;
255
- -webkit-animation: vrbounce 0.5s infinite linear;
256
- animation: vrbounce 0.5s infinite linear;
257
- color:000;
258
  }
 
259
  @-webkit-keyframes vrbounce {
260
- 0% { top: 0; }
261
- 50% { top: -0.2em; }
262
- 70% { top: -0.3em; }
263
- 100% { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
264
  }
 
265
  @-moz-keyframes vrbounce {
266
- 0% { top: 0; }
267
- 50% { top: -0.2em; }
268
- 70% { top: -0.3em; }
269
- 100% { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
270
  }
 
271
  @-o-keyframes vrbounce {
272
- 0% { top: 0; }
273
- 50% { top: -0.2em; }
274
- 70% { top: -0.3em; }
275
- 100% { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
276
  }
 
277
  @-ms-keyframes vrbounce {
278
- 0% { top: 0; }
279
- 50% { top: -0.2em; }
280
- 70% { top: -0.3em; }
281
- 100% { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
282
  }
 
283
  @keyframes vrbounce {
284
- 0% { top: 0; }
285
- 50% { top: -0.2em; }
286
- 70% { top: -0.3em; }
287
- 100% { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
288
  }
 
289
  .vrgcontrols {
290
  position: absolute;
291
  z-index: 3;
@@ -294,8 +423,10 @@ div.pnlm-hotspot-base.far:before{
294
  height: 30px;
295
  cursor: pointer;
296
  left: 50%;
297
- transform: translateX(-50%);;
 
298
  }
 
299
  .wpvr_slider_nav {
300
  position: absolute;
301
  z-index: 3;
@@ -306,6 +437,7 @@ div.pnlm-hotspot-base.far:before{
306
  transform: translateX(-50%);
307
  width: 100%;
308
  }
 
309
  .wpvr_slider_nav .wpvr_owl_prev,
310
  .wpvr_slider_nav .wpvr_owl_next {
311
  position: absolute;
@@ -316,19 +448,21 @@ div.pnlm-hotspot-base.far:before{
316
  height: 30px;
317
  width: 30px;
318
  border: none;
319
- outline: none!important;
320
- background: #28303d!important;
321
- color: #fff!important;
322
  transition: all 0.3s ease;
323
  }
 
324
  .wpvr_slider_nav .wpvr_owl_prev:hover,
325
  .wpvr_slider_nav .wpvr_owl_next:hover {
326
- background: #004efa!important;
327
  }
328
 
329
  .wpvr_slider_nav .wpvr_owl_prev {
330
  left: 5px;
331
  }
 
332
  .wpvr_slider_nav .wpvr_owl_next {
333
  right: 5px;
334
  }
@@ -341,18 +475,21 @@ div.pnlm-hotspot-base.far:before{
341
  }
342
 
343
  .scene-gallery ul {
344
- margin: 0;
345
- padding: 0;
346
  }
 
347
  .scene-gallery ul li {
348
  list-style: none;
349
  font-size: 13px;
350
  line-height: 1.2;
351
  margin: 0;
352
  }
 
353
  .scene-gallery ul li img {
354
- margin-top: 3px!important;
355
  }
 
356
  .scene-gallery {
357
  position: absolute;
358
  bottom: 0;
@@ -363,6 +500,7 @@ div.pnlm-hotspot-base.far:before{
363
  background-color: rgba(0, 0, 0, 0.35);
364
  color: #fff;
365
  }
 
366
  .scctrl {
367
  border-radius: 5px !important;
368
  width: 100px;
@@ -371,9 +509,10 @@ div.pnlm-hotspot-base.far:before{
371
  cursor: pointer;
372
  margin: 5px;
373
  }
 
374
  .scctrl:hover {
375
  background: rgba(200, 200, 200, 1);
376
- }
377
 
378
  .vrfullwidth {
379
  width: 98vw !important;
@@ -393,14 +532,14 @@ div.pnlm-hotspot-base.far:before{
393
 
394
 
395
  .vrembed {
396
- width: 100%!important;
397
- height: 100%!important;
398
  position: fixed;
399
  left: 0;
400
  top: 0;
401
  z-index: 999;
402
- max-width: 100%!important;
403
- margin: 0!important;
404
  }
405
 
406
 
@@ -416,9 +555,11 @@ div.pnlm-hotspot-base.far:before{
416
  cursor: pointer;
417
  border-radius: 100%;
418
  }
419
- .pnlm-hotspot-base.custom-icon:hover{
 
420
  z-index: 9;
421
  }
 
422
  .pnlm-panorama-info {
423
  left: 0;
424
  bottom: 0;
@@ -434,30 +575,36 @@ div.custom-tooltip span {
434
  text-align: center;
435
  padding: 5px 10px;
436
  cursor: default;
437
- margin: 0!important;
438
- bottom: 40px!important;
439
  transform: translateX(-50%);
440
  min-width: 300px;
441
  font-weight: 400;
442
  }
 
443
  div.custom-tooltip span p {
444
  max-height: 250px;
445
  overflow: auto;
446
  }
 
447
  div.custom-tooltip span a {
448
  transition: inherit;
449
  }
450
- div.custom-tooltip span img{
 
451
  max-width: inherit;
452
  height: 225px;
453
  width: 400px;
454
  }
 
455
  div.pnlm-tooltip span {
456
  display: none;
457
  }
458
- div.custom-tooltip:hover span{
 
459
  visibility: visible;
460
  }
 
461
  div.custom-tooltip:hover span:after {
462
  content: '';
463
  position: absolute;
@@ -504,7 +651,7 @@ div.custom-ifram {
504
  position: absolute;
505
  left: 0;
506
  top: 0;
507
- background: rgba(0,0,0,0.7);
508
  width: 100%;
509
  height: 100%;
510
  z-index: 99;
@@ -512,6 +659,7 @@ div.custom-ifram {
512
  visibility: hidden;
513
  transition: all 0.4s linear;
514
  }
 
515
  .pano-wrap.show-modal:before {
516
  opacity: 1;
517
  visibility: visible;
@@ -538,6 +686,7 @@ div.custom-ifram {
538
  box-sizing: border-box;
539
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
540
  }
 
541
  .pano-wrap.show-modal .cross {
542
  opacity: 1;
543
  visibility: visible;
@@ -552,11 +701,12 @@ div.custom-ifram {
552
  font-size: 15px;
553
  line-height: 24px;
554
  }
555
- .custom-ifram p{
 
556
  padding: 10px;
557
  }
558
 
559
- .custom-ifram video{
560
  margin: 0 auto;
561
  }
562
 
@@ -583,9 +733,11 @@ div.custom-ifram {
583
  z-index: 99;
584
  background-color: rgba(0, 0, 0, 0.8);
585
  }
586
- .pnlm-load-box > p {
 
587
  display: none;
588
  }
 
589
  .pnlm-load-box .pnlm-lbar {
590
  width: 100%;
591
  border: none;
@@ -594,6 +746,7 @@ div.custom-ifram {
594
  left: 0;
595
  bottom: 0px;
596
  }
 
597
  .pnlm-load-box .pnlm-lbar .pnlm-lbar-fill {
598
  background: #4775f6;
599
  }
@@ -611,52 +764,63 @@ div.custom-ifram {
611
  padding: 15px;
612
  border-radius: 5px;
613
  }
 
614
  .wpvr-product-container .wpvr-pr-left-block {
615
  width: 50%;
616
  box-sizing: border-box;
617
  }
 
618
  .wpvr-product-container .wpvr-pr-left-block .woocommerce-product-gallery__image img {
619
  margin: 0;
620
  max-width: 95%;
621
  width: 100%;
622
  height: auto;
623
  }
 
624
  .wpvr-product-container .wpvr-pr-right-block {
625
  max-width: 50%;
626
  padding-left: 15px;
627
  box-sizing: border-box;
628
  text-align: left;
629
  }
 
630
  .wpvr-product-container .wpvr-pr-right-block a {
631
- text-decoration: none!important;
632
  display: inline-block;
633
  }
 
634
  .wpvr-product-container .wpvr-pr-right-block a h2 {
635
  font-size: 18px;
636
  line-height: 1.4;
637
  margin: 0 0 15px 0;
638
  text-align: left;
639
  }
 
640
  .wpvr-product-container .wpvr-pr-right-block a h2:before {
641
  display: none;
642
  }
 
643
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
644
- border: none!important;
645
- padding: 0!important;
646
  text-align: left;
647
  border-radius: 0;
648
  }
 
649
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .amount {
650
  display: inline-block;
651
  margin-bottom: 7px;
652
  }
 
653
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline del .amount {
654
  text-decoration: line-through;
655
  opacity: 0.5;
656
  }
 
657
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .wpvr-cart-wrap {
658
  display: block;
659
  }
 
660
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline a.button {
661
  font-size: 16px;
662
  display: inline-block;
@@ -667,47 +831,52 @@ div.custom-ifram {
667
 
668
  /*-------streetview--------*/
669
  .vr-streetview iframe {
670
- width: 100%!important;
671
- height: 100%!important;
672
  }
673
 
674
 
675
  /* ---------responsive style--------- */
676
- @media only screen and (min-width: 1921px) {
677
  .wpvr-home-title {
678
  font-size: 70px;
679
  }
 
680
  .wpvr-home-subtitle {
681
  font-size: 30px;
682
  }
683
  }
684
 
685
- @media (max-width: 1199px){
686
  .pnlm-container {
687
- width: 100%!important;
688
- height: 500px!important;
689
  }
 
690
  .pnlm-container.vrembed {
691
- height: 100%!important;
692
  }
 
693
  .custom-ifram iframe {
694
  height: 300px;
695
  }
 
696
  div.custom-ifram {
697
  width: 100%;
698
  }
 
699
  .custom-tooltip p {
700
  width: 430px;
701
  }
702
 
703
  /*-------streetview--------*/
704
  .vr-streetview {
705
- width: 100%!important;
706
- height: 500px!important;
707
  }
708
  }
709
 
710
- @media (max-width: 768px){
711
  div.custom-tooltip span img {
712
  height: 195px;
713
  width: 340px;
@@ -717,6 +886,7 @@ div.custom-ifram {
717
  height: 194px;
718
  width: 350px;
719
  }
 
720
  .custom-tooltip p {
721
  width: 330px;
722
  }
@@ -727,25 +897,28 @@ div.custom-ifram {
727
 
728
  }
729
 
730
- @media (max-width: 767px){
731
  div.custom-tooltip span img {
732
  height: 240px;
733
  width: 420px;
734
  }
 
735
  .custom-ifram iframe {
736
  height: 320px;
737
  width: 100%;
738
  }
 
739
  .custom-tooltip p {
740
  width: 430px;
741
  }
742
 
743
  }
744
 
745
- @media (max-width: 575px){
746
  .wpvr-mobile-notice {
747
  display: flex;
748
  }
 
749
  .wpvr-mobile-notice p {
750
  width: calc(100% - 46px);
751
  }
@@ -753,52 +926,60 @@ div.custom-ifram {
753
  .scene-gallery ul {
754
  width: 100px !important;
755
  }
 
756
  .scene-gallery {
757
- padding: 18px 10px;
758
- }
 
759
  .scctrl {
760
  height: 50px !important;
761
  }
 
762
  .pnlm-container {
763
- width: 100%!important;
764
- height: 300px!important;
765
  }
 
766
  .pnlm-container.vrembed {
767
- height: 100%!important;
768
  }
 
769
  div.custom-tooltip span img {
770
  height: 150px;
771
  width: 220px;
772
  }
 
773
  .custom-ifram iframe {
774
  height: 250px;
775
  width: 100%;
776
  }
 
777
  .custom-tooltip p {
778
  width: 200px;
779
  }
780
 
781
  #cp-logo-controls .cp-logo-ctrl .cp-info {
782
- width: 280px;
783
  }
784
 
785
  div.pnlm-hotspot-base.fas,
786
  div.pnlm-hotspot-base.fab,
787
  div.pnlm-hotspot-base.fa,
788
  div.pnlm-hotspot-base.far {
789
- width: 24px!important;
790
- height: 24px!important;
791
  }
 
792
  div.pnlm-hotspot-base:before,
793
  div.pnlm-hotspot-base:before,
794
  div.pnlm-hotspot-base:before {
795
- font-size: 11px!important;
796
  }
797
 
798
  /*-------streetview--------*/
799
  .vr-streetview {
800
- width: 100%!important;
801
- height: 300px!important;
802
  }
803
 
804
 
@@ -806,20 +987,24 @@ div.custom-ifram {
806
  .wpvr-product-container {
807
  display: block;
808
  }
 
809
  .wpvr-product-container .wpvr-pr-left-block {
810
  width: 100%;
811
  max-width: 100px;
812
  margin: 0 auto 5px;
813
  }
 
814
  .wpvr-product-container .wpvr-pr-right-block {
815
  width: 100%;
816
  padding: 0;
817
  text-align: center;
818
  }
 
819
  .wpvr-product-container .wpvr-pr-right-block a h2 {
820
  text-align: center;
821
  margin: 0 0 10px 0;
822
  }
 
823
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
824
  text-align: center;
825
  }
@@ -829,6 +1014,7 @@ div.custom-ifram {
829
  .vrowl-carousel .owl-stage {
830
  margin: 0 auto;
831
  }
 
832
  .vrowl-carousel .owl-item img {
833
  margin: 0;
834
- }
3
  * included in this file.
4
  */
5
 
6
+ .explainer {
7
+ position: absolute;
8
+ bottom: 40px;
9
+ right: 15px;
10
+ z-index: 9;
11
+ text-align: center;
12
+ width: 47%;
13
+ height: 40%;
14
+ }
15
+
16
+ .explainer>iframe {
17
+ border-radius: 10px;
18
+ width: 100% !important;
19
+ height: 100% !important;
20
+ display: block;
21
+ }
22
+
23
+ .explainer_button {
24
+ position: absolute;
25
+ bottom: 5px;
26
+ right: 0;
27
+ z-index: 9999;
28
+ text-align: center;
29
+ width: 50px;
30
+ }
31
+
32
+ .explainer .close-explainer-video {
33
+ position: absolute;
34
+ right: -7px;
35
+ top: -11px;
36
+ background: #fff;
37
+ line-height: 1;
38
+ width: 22px;
39
+ height: 22px;
40
+ border-radius: 100%;
41
+ display: flex;
42
+ flex-flow: column;
43
+ align-items: center;
44
+ justify-content: center;
45
+ cursor: pointer;
46
+ z-index: 9;
47
+ font-size: 14px;
48
+ }
49
+
50
+ @media only screen and (max-width: 575px) {
51
+ .explainer {
52
+ width: 60%;
53
+ height: 60%;
54
+ }
55
+ }
56
+
57
  .wpvr-navbar-container {
58
  position: absolute;
59
  top: 5px;
67
  right: 0;
68
  }
69
 
70
+ .wpvr-navbar-container>li {
71
  margin: 10px;
72
 
73
  }
74
 
75
+ .wpvr-navbar-container>li>a {
76
  color: #fff;
77
  text-decoration: none;
78
  font-size: 16px;
84
  position: absolute;
85
  }
86
 
87
+ .wpvr-navbar-container>li:hover .wpvr-navbar-dropdown {
88
  display: block;
89
  margin-left: -50px;
90
+ }
91
 
92
+ .wpvr-navbar-dropdown>li>a {
93
  text-decoration: none;
94
  color: #fff;
95
  }
106
  padding: 0 15px;
107
  box-sizing: border-box;
108
  }
109
+
110
  .wpvr-home-content * {
111
  box-sizing: border-box;
112
  }
116
  line-height: 1.2;
117
  margin-bottom: 10px;
118
  }
119
+
120
  .wpvr-home-subtitle {
121
  font-size: calc(18px + (28 - 18) * ((100vw - 320px) / (1920 - 320)));
122
  line-height: 1.2;
123
  }
124
 
125
+ @media only screen and (min-width: 1921px) {
126
  .wpvr-home-title {
127
  font-size: 60px;
128
  }
129
+
130
  .wpvr-home-subtitle {
131
  font-size: 18px;
132
  }
133
  }
134
 
135
  .wpvr-topnav {
136
+ position: absolute;
137
+ bottom: 0;
138
+ z-index: 2;
139
+ text-align: center;
140
+ width: 100%;
141
+ padding-bottom: 3px;
142
  }
143
 
144
  .wpvr-mobile-notice {
155
  display: none;
156
  z-index: 9;
157
  }
158
+
159
  .wpvr-mobile-notice p {
160
  color: #fff;
161
  margin: 0;
163
  margin-right: 17px;
164
  width: calc(100% - 20px);
165
  }
166
+
167
  .wpvr-mobile-notice .notice-close {
168
  font-size: 11px;
169
  border: 1px solid;
183
  right: 10px;
184
  z-index: 2;
185
  }
186
+
187
  .cp-logo-ctrl {
188
  height: auto;
189
  display: inline-block;
190
  cursor: pointer;
191
  margin: 0 auto;
192
  }
193
+
194
  .cp-logo-ctrl img {
195
  max-width: 100px !important;
196
  margin-left: auto;
213
  position: relative;
214
  background: #fff;
215
  max-width: 350px;
216
+ width: auto;
217
  padding: 10px;
218
  border-radius: 5px;
219
  margin-top: 5px;
220
  display: none;
221
  transition: all 0.3s ease;
222
  }
223
+
224
  #cp-logo-controls .cp-logo-ctrl.show .cp-info {
225
  display: block;
226
  }
235
  flex-flow: column;
236
  background: rgba(255, 255, 255, 0.27);
237
  }
238
+
239
  .zoom-in-out-controls .ctrl {
240
  padding: 2px 0;
241
  }
253
  }
254
 
255
  .pnlm-load-button p {
256
+ color: #fff !important;
257
  }
258
 
259
  .ctrl {
262
  display: inline-block;
263
  cursor: pointer;
264
  }
265
+
266
  .ctrl i {
267
  font-size: 18px;
268
  }
269
+
270
  .ctrl:hover {
271
  background: none;
272
  }
274
  .controls .ctrl {
275
  position: absolute;
276
  }
277
+
278
  .pan-up {
279
  left: 50%;
280
  top: 0;
281
  transform: translateX(-50%);
282
  }
283
+
284
  .pan-down {
285
  bottom: 0;
286
  left: 50%;
287
  transform: translateX(-50%);
288
  }
289
+
290
  .pan-left {
291
  left: 0;
292
  top: 50%;
293
  transform: translateY(-50%);
294
  }
295
+
296
  .pan-right {
297
  right: 0;
298
  top: 50%;
299
  transform: translateY(-50%);
300
  }
301
+
302
  .ctrl.fullscreen {
303
  top: 50%;
304
  left: 50%;
307
 
308
  div.pnlm-hotspot-base.fas:before,
309
  div.pnlm-hotspot-base.fab:before,
310
+ div.pnlm-hotspot-base.far:before {
311
  font-size: 14px;
312
  position: absolute;
313
  left: 50%;
314
  top: 50%;
315
  transform: translate(-50%, -50%);
316
  }
317
+
318
  .vrbounce {
319
+ display: inline-block;
320
+ position: relative;
321
+ -moz-animation: vrbounce 0.5s infinite linear;
322
+ -o-animation: vrbounce 0.5s infinite linear;
323
+ -webkit-animation: vrbounce 0.5s infinite linear;
324
+ animation: vrbounce 0.5s infinite linear;
325
+ color: 000;
326
  }
327
+
328
  @-webkit-keyframes vrbounce {
329
+ 0% {
330
+ top: 0;
331
+ }
332
+
333
+ 50% {
334
+ top: -0.2em;
335
+ }
336
+
337
+ 70% {
338
+ top: -0.3em;
339
+ }
340
+
341
+ 100% {
342
+ top: 0;
343
+ }
344
  }
345
+
346
  @-moz-keyframes vrbounce {
347
+ 0% {
348
+ top: 0;
349
+ }
350
+
351
+ 50% {
352
+ top: -0.2em;
353
+ }
354
+
355
+ 70% {
356
+ top: -0.3em;
357
+ }
358
+
359
+ 100% {
360
+ top: 0;
361
+ }
362
  }
363
+
364
  @-o-keyframes vrbounce {
365
+ 0% {
366
+ top: 0;
367
+ }
368
+
369
+ 50% {
370
+ top: -0.2em;
371
+ }
372
+
373
+ 70% {
374
+ top: -0.3em;
375
+ }
376
+
377
+ 100% {
378
+ top: 0;
379
+ }
380
  }
381
+
382
  @-ms-keyframes vrbounce {
383
+ 0% {
384
+ top: 0;
385
+ }
386
+
387
+ 50% {
388
+ top: -0.2em;
389
+ }
390
+
391
+ 70% {
392
+ top: -0.3em;
393
+ }
394
+
395
+ 100% {
396
+ top: 0;
397
+ }
398
  }
399
+
400
  @keyframes vrbounce {
401
+ 0% {
402
+ top: 0;
403
+ }
404
+
405
+ 50% {
406
+ top: -0.2em;
407
+ }
408
+
409
+ 70% {
410
+ top: -0.3em;
411
+ }
412
+
413
+ 100% {
414
+ top: 0;
415
+ }
416
  }
417
+
418
  .vrgcontrols {
419
  position: absolute;
420
  z-index: 3;
423
  height: 30px;
424
  cursor: pointer;
425
  left: 50%;
426
+ transform: translateX(-50%);
427
+ ;
428
  }
429
+
430
  .wpvr_slider_nav {
431
  position: absolute;
432
  z-index: 3;
437
  transform: translateX(-50%);
438
  width: 100%;
439
  }
440
+
441
  .wpvr_slider_nav .wpvr_owl_prev,
442
  .wpvr_slider_nav .wpvr_owl_next {
443
  position: absolute;
448
  height: 30px;
449
  width: 30px;
450
  border: none;
451
+ outline: none !important;
452
+ background: #28303d !important;
453
+ color: #fff !important;
454
  transition: all 0.3s ease;
455
  }
456
+
457
  .wpvr_slider_nav .wpvr_owl_prev:hover,
458
  .wpvr_slider_nav .wpvr_owl_next:hover {
459
+ background: #004efa !important;
460
  }
461
 
462
  .wpvr_slider_nav .wpvr_owl_prev {
463
  left: 5px;
464
  }
465
+
466
  .wpvr_slider_nav .wpvr_owl_next {
467
  right: 5px;
468
  }
475
  }
476
 
477
  .scene-gallery ul {
478
+ margin: 0;
479
+ padding: 0;
480
  }
481
+
482
  .scene-gallery ul li {
483
  list-style: none;
484
  font-size: 13px;
485
  line-height: 1.2;
486
  margin: 0;
487
  }
488
+
489
  .scene-gallery ul li img {
490
+ margin-top: 3px !important;
491
  }
492
+
493
  .scene-gallery {
494
  position: absolute;
495
  bottom: 0;
500
  background-color: rgba(0, 0, 0, 0.35);
501
  color: #fff;
502
  }
503
+
504
  .scctrl {
505
  border-radius: 5px !important;
506
  width: 100px;
509
  cursor: pointer;
510
  margin: 5px;
511
  }
512
+
513
  .scctrl:hover {
514
  background: rgba(200, 200, 200, 1);
515
+ }
516
 
517
  .vrfullwidth {
518
  width: 98vw !important;
532
 
533
 
534
  .vrembed {
535
+ width: 100% !important;
536
+ height: 100% !important;
537
  position: fixed;
538
  left: 0;
539
  top: 0;
540
  z-index: 999;
541
+ max-width: 100% !important;
542
+ margin: 0 !important;
543
  }
544
 
545
 
555
  cursor: pointer;
556
  border-radius: 100%;
557
  }
558
+
559
+ .pnlm-hotspot-base.custom-icon:hover {
560
  z-index: 9;
561
  }
562
+
563
  .pnlm-panorama-info {
564
  left: 0;
565
  bottom: 0;
575
  text-align: center;
576
  padding: 5px 10px;
577
  cursor: default;
578
+ margin: 0 !important;
579
+ bottom: 40px !important;
580
  transform: translateX(-50%);
581
  min-width: 300px;
582
  font-weight: 400;
583
  }
584
+
585
  div.custom-tooltip span p {
586
  max-height: 250px;
587
  overflow: auto;
588
  }
589
+
590
  div.custom-tooltip span a {
591
  transition: inherit;
592
  }
593
+
594
+ div.custom-tooltip span img {
595
  max-width: inherit;
596
  height: 225px;
597
  width: 400px;
598
  }
599
+
600
  div.pnlm-tooltip span {
601
  display: none;
602
  }
603
+
604
+ div.custom-tooltip:hover span {
605
  visibility: visible;
606
  }
607
+
608
  div.custom-tooltip:hover span:after {
609
  content: '';
610
  position: absolute;
651
  position: absolute;
652
  left: 0;
653
  top: 0;
654
+ background: rgba(0, 0, 0, 0.7);
655
  width: 100%;
656
  height: 100%;
657
  z-index: 99;
659
  visibility: hidden;
660
  transition: all 0.4s linear;
661
  }
662
+
663
  .pano-wrap.show-modal:before {
664
  opacity: 1;
665
  visibility: visible;
686
  box-sizing: border-box;
687
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
688
  }
689
+
690
  .pano-wrap.show-modal .cross {
691
  opacity: 1;
692
  visibility: visible;
701
  font-size: 15px;
702
  line-height: 24px;
703
  }
704
+
705
+ .custom-ifram p {
706
  padding: 10px;
707
  }
708
 
709
+ .custom-ifram video {
710
  margin: 0 auto;
711
  }
712
 
733
  z-index: 99;
734
  background-color: rgba(0, 0, 0, 0.8);
735
  }
736
+
737
+ .pnlm-load-box>p {
738
  display: none;
739
  }
740
+
741
  .pnlm-load-box .pnlm-lbar {
742
  width: 100%;
743
  border: none;
746
  left: 0;
747
  bottom: 0px;
748
  }
749
+
750
  .pnlm-load-box .pnlm-lbar .pnlm-lbar-fill {
751
  background: #4775f6;
752
  }
764
  padding: 15px;
765
  border-radius: 5px;
766
  }
767
+
768
  .wpvr-product-container .wpvr-pr-left-block {
769
  width: 50%;
770
  box-sizing: border-box;
771
  }
772
+
773
  .wpvr-product-container .wpvr-pr-left-block .woocommerce-product-gallery__image img {
774
  margin: 0;
775
  max-width: 95%;
776
  width: 100%;
777
  height: auto;
778
  }
779
+
780
  .wpvr-product-container .wpvr-pr-right-block {
781
  max-width: 50%;
782
  padding-left: 15px;
783
  box-sizing: border-box;
784
  text-align: left;
785
  }
786
+
787
  .wpvr-product-container .wpvr-pr-right-block a {
788
+ text-decoration: none !important;
789
  display: inline-block;
790
  }
791
+
792
  .wpvr-product-container .wpvr-pr-right-block a h2 {
793
  font-size: 18px;
794
  line-height: 1.4;
795
  margin: 0 0 15px 0;
796
  text-align: left;
797
  }
798
+
799
  .wpvr-product-container .wpvr-pr-right-block a h2:before {
800
  display: none;
801
  }
802
+
803
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
804
+ border: none !important;
805
+ padding: 0 !important;
806
  text-align: left;
807
  border-radius: 0;
808
  }
809
+
810
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .amount {
811
  display: inline-block;
812
  margin-bottom: 7px;
813
  }
814
+
815
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline del .amount {
816
  text-decoration: line-through;
817
  opacity: 0.5;
818
  }
819
+
820
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .wpvr-cart-wrap {
821
  display: block;
822
  }
823
+
824
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline a.button {
825
  font-size: 16px;
826
  display: inline-block;
831
 
832
  /*-------streetview--------*/
833
  .vr-streetview iframe {
834
+ width: 100% !important;
835
+ height: 100% !important;
836
  }
837
 
838
 
839
  /* ---------responsive style--------- */
840
+ @media only screen and (min-width: 1921px) {
841
  .wpvr-home-title {
842
  font-size: 70px;
843
  }
844
+
845
  .wpvr-home-subtitle {
846
  font-size: 30px;
847
  }
848
  }
849
 
850
+ @media (max-width: 1199px) {
851
  .pnlm-container {
852
+ width: 100% !important;
853
+ height: 500px !important;
854
  }
855
+
856
  .pnlm-container.vrembed {
857
+ height: 100% !important;
858
  }
859
+
860
  .custom-ifram iframe {
861
  height: 300px;
862
  }
863
+
864
  div.custom-ifram {
865
  width: 100%;
866
  }
867
+
868
  .custom-tooltip p {
869
  width: 430px;
870
  }
871
 
872
  /*-------streetview--------*/
873
  .vr-streetview {
874
+ width: 100% !important;
875
+ height: 500px !important;
876
  }
877
  }
878
 
879
+ @media (max-width: 768px) {
880
  div.custom-tooltip span img {
881
  height: 195px;
882
  width: 340px;
886
  height: 194px;
887
  width: 350px;
888
  }
889
+
890
  .custom-tooltip p {
891
  width: 330px;
892
  }
897
 
898
  }
899
 
900
+ @media (max-width: 767px) {
901
  div.custom-tooltip span img {
902
  height: 240px;
903
  width: 420px;
904
  }
905
+
906
  .custom-ifram iframe {
907
  height: 320px;
908
  width: 100%;
909
  }
910
+
911
  .custom-tooltip p {
912
  width: 430px;
913
  }
914
 
915
  }
916
 
917
+ @media (max-width: 575px) {
918
  .wpvr-mobile-notice {
919
  display: flex;
920
  }
921
+
922
  .wpvr-mobile-notice p {
923
  width: calc(100% - 46px);
924
  }
926
  .scene-gallery ul {
927
  width: 100px !important;
928
  }
929
+
930
  .scene-gallery {
931
+ padding: 18px 10px;
932
+ }
933
+
934
  .scctrl {
935
  height: 50px !important;
936
  }
937
+
938
  .pnlm-container {
939
+ width: 100% !important;
940
+ height: 300px !important;
941
  }
942
+
943
  .pnlm-container.vrembed {
944
+ height: 100% !important;
945
  }
946
+
947
  div.custom-tooltip span img {
948
  height: 150px;
949
  width: 220px;
950
  }
951
+
952
  .custom-ifram iframe {
953
  height: 250px;
954
  width: 100%;
955
  }
956
+
957
  .custom-tooltip p {
958
  width: 200px;
959
  }
960
 
961
  #cp-logo-controls .cp-logo-ctrl .cp-info {
962
+ width: 280px;
963
  }
964
 
965
  div.pnlm-hotspot-base.fas,
966
  div.pnlm-hotspot-base.fab,
967
  div.pnlm-hotspot-base.fa,
968
  div.pnlm-hotspot-base.far {
969
+ width: 24px !important;
970
+ height: 24px !important;
971
  }
972
+
973
  div.pnlm-hotspot-base:before,
974
  div.pnlm-hotspot-base:before,
975
  div.pnlm-hotspot-base:before {
976
+ font-size: 11px !important;
977
  }
978
 
979
  /*-------streetview--------*/
980
  .vr-streetview {
981
+ width: 100% !important;
982
+ height: 300px !important;
983
  }
984
 
985
 
987
  .wpvr-product-container {
988
  display: block;
989
  }
990
+
991
  .wpvr-product-container .wpvr-pr-left-block {
992
  width: 100%;
993
  max-width: 100px;
994
  margin: 0 auto 5px;
995
  }
996
+
997
  .wpvr-product-container .wpvr-pr-right-block {
998
  width: 100%;
999
  padding: 0;
1000
  text-align: center;
1001
  }
1002
+
1003
  .wpvr-product-container .wpvr-pr-right-block a h2 {
1004
  text-align: center;
1005
  margin: 0 0 10px 0;
1006
  }
1007
+
1008
  .wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
1009
  text-align: center;
1010
  }
1014
  .vrowl-carousel .owl-stage {
1015
  margin: 0 auto;
1016
  }
1017
+
1018
  .vrowl-carousel .owl-item img {
1019
  margin: 0;
1020
+ }
public/lib/videojs-vr/lang/en.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ videojs.addLanguage('en', {
2
+ "Include your own strings in JSON files.": "Include your own strings in JSON files."
3
+ });
public/lib/videojs-vr/videojs-vr.cjs.js ADDED
@@ -0,0 +1,2616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! @name videojs-vr @version 1.10.0 @license Apache-2.0 */
2
+ 'use strict';
3
+
4
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
5
+
6
+ var _assertThisInitialized = _interopDefault(require('@babel/runtime/helpers/assertThisInitialized'));
7
+ var _inheritsLoose = _interopDefault(require('@babel/runtime/helpers/inheritsLoose'));
8
+ var window$1 = _interopDefault(require('global/window'));
9
+ var document$1 = _interopDefault(require('global/document'));
10
+ var WebVRPolyfill = _interopDefault(require('webvr-polyfill'));
11
+ var videojs = _interopDefault(require('video.js'));
12
+ var THREE = require('three');
13
+
14
+ var version = "1.10.0";
15
+
16
+ /**
17
+ * @author dmarcos / https://github.com/dmarcos
18
+ * @author mrdoob / http://mrdoob.com
19
+ *
20
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/VRControls.js
21
+ */
22
+
23
+ var VRControls = function VRControls(object, onError) {
24
+ var scope = this;
25
+ var vrDisplay, vrDisplays;
26
+ var standingMatrix = new THREE.Matrix4();
27
+ var frameData = null;
28
+
29
+ if ('VRFrameData' in window) {
30
+ frameData = new VRFrameData();
31
+ }
32
+
33
+ function gotVRDisplays(displays) {
34
+ vrDisplays = displays;
35
+
36
+ if (displays.length > 0) {
37
+ vrDisplay = displays[0];
38
+ } else {
39
+ if (onError) onError('VR input not available.');
40
+ }
41
+ }
42
+
43
+ if (navigator.getVRDisplays) {
44
+ navigator.getVRDisplays().then(gotVRDisplays).catch(function () {
45
+ console.warn('THREE.VRControls: Unable to get VR Displays');
46
+ });
47
+ } // the Rift SDK returns the position in meters
48
+ // this scale factor allows the user to define how meters
49
+ // are converted to scene units.
50
+
51
+
52
+ this.scale = 1; // If true will use "standing space" coordinate system where y=0 is the
53
+ // floor and x=0, z=0 is the center of the room.
54
+
55
+ this.standing = false; // Distance from the users eyes to the floor in meters. Used when
56
+ // standing=true but the VRDisplay doesn't provide stageParameters.
57
+
58
+ this.userHeight = 1.6;
59
+
60
+ this.getVRDisplay = function () {
61
+ return vrDisplay;
62
+ };
63
+
64
+ this.setVRDisplay = function (value) {
65
+ vrDisplay = value;
66
+ };
67
+
68
+ this.getVRDisplays = function () {
69
+ console.warn('THREE.VRControls: getVRDisplays() is being deprecated.');
70
+ return vrDisplays;
71
+ };
72
+
73
+ this.getStandingMatrix = function () {
74
+ return standingMatrix;
75
+ };
76
+
77
+ this.update = function () {
78
+ if (vrDisplay) {
79
+ var pose;
80
+
81
+ if (vrDisplay.getFrameData) {
82
+ vrDisplay.getFrameData(frameData);
83
+ pose = frameData.pose;
84
+ } else if (vrDisplay.getPose) {
85
+ pose = vrDisplay.getPose();
86
+ }
87
+
88
+ if (pose.orientation !== null) {
89
+ object.quaternion.fromArray(pose.orientation);
90
+ }
91
+
92
+ if (pose.position !== null) {
93
+ object.position.fromArray(pose.position);
94
+ } else {
95
+ object.position.set(0, 0, 0);
96
+ }
97
+
98
+ if (this.standing) {
99
+ if (vrDisplay.stageParameters) {
100
+ object.updateMatrix();
101
+ standingMatrix.fromArray(vrDisplay.stageParameters.sittingToStandingTransform);
102
+ object.applyMatrix(standingMatrix);
103
+ } else {
104
+ object.position.setY(object.position.y + this.userHeight);
105
+ }
106
+ }
107
+
108
+ object.position.multiplyScalar(scope.scale);
109
+ }
110
+ };
111
+
112
+ this.dispose = function () {
113
+ vrDisplay = null;
114
+ };
115
+ };
116
+
117
+ /**
118
+ * @author dmarcos / https://github.com/dmarcos
119
+ * @author mrdoob / http://mrdoob.com
120
+ *
121
+ * WebVR Spec: http://mozvr.github.io/webvr-spec/webvr.html
122
+ *
123
+ * Firefox: http://mozvr.com/downloads/
124
+ * Chromium: https://webvr.info/get-chrome
125
+ *
126
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/effects/VREffect.js
127
+ */
128
+
129
+ var VREffect = function VREffect(renderer, onError) {
130
+ var vrDisplay, vrDisplays;
131
+ var eyeTranslationL = new THREE.Vector3();
132
+ var eyeTranslationR = new THREE.Vector3();
133
+ var renderRectL, renderRectR;
134
+ var headMatrix = new THREE.Matrix4();
135
+ var eyeMatrixL = new THREE.Matrix4();
136
+ var eyeMatrixR = new THREE.Matrix4();
137
+ var frameData = null;
138
+
139
+ if ('VRFrameData' in window) {
140
+ frameData = new window.VRFrameData();
141
+ }
142
+
143
+ function gotVRDisplays(displays) {
144
+ vrDisplays = displays;
145
+
146
+ if (displays.length > 0) {
147
+ vrDisplay = displays[0];
148
+ } else {
149
+ if (onError) onError('HMD not available');
150
+ }
151
+ }
152
+
153
+ if (navigator.getVRDisplays) {
154
+ navigator.getVRDisplays().then(gotVRDisplays).catch(function () {
155
+ console.warn('THREE.VREffect: Unable to get VR Displays');
156
+ });
157
+ } //
158
+
159
+
160
+ this.isPresenting = false;
161
+ var scope = this;
162
+ var rendererSize = renderer.getSize();
163
+ var rendererUpdateStyle = false;
164
+ var rendererPixelRatio = renderer.getPixelRatio();
165
+
166
+ this.getVRDisplay = function () {
167
+ return vrDisplay;
168
+ };
169
+
170
+ this.setVRDisplay = function (value) {
171
+ vrDisplay = value;
172
+ };
173
+
174
+ this.getVRDisplays = function () {
175
+ console.warn('THREE.VREffect: getVRDisplays() is being deprecated.');
176
+ return vrDisplays;
177
+ };
178
+
179
+ this.setSize = function (width, height, updateStyle) {
180
+ rendererSize = {
181
+ width: width,
182
+ height: height
183
+ };
184
+ rendererUpdateStyle = updateStyle;
185
+
186
+ if (scope.isPresenting) {
187
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
188
+ renderer.setPixelRatio(1);
189
+ renderer.setSize(eyeParamsL.renderWidth * 2, eyeParamsL.renderHeight, false);
190
+ } else {
191
+ renderer.setPixelRatio(rendererPixelRatio);
192
+ renderer.setSize(width, height, updateStyle);
193
+ }
194
+ }; // VR presentation
195
+
196
+
197
+ var canvas = renderer.domElement;
198
+ var defaultLeftBounds = [0.0, 0.0, 0.5, 1.0];
199
+ var defaultRightBounds = [0.5, 0.0, 0.5, 1.0];
200
+
201
+ function onVRDisplayPresentChange() {
202
+ var wasPresenting = scope.isPresenting;
203
+ scope.isPresenting = vrDisplay !== undefined && vrDisplay.isPresenting;
204
+
205
+ if (scope.isPresenting) {
206
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
207
+ var eyeWidth = eyeParamsL.renderWidth;
208
+ var eyeHeight = eyeParamsL.renderHeight;
209
+
210
+ if (!wasPresenting) {
211
+ rendererPixelRatio = renderer.getPixelRatio();
212
+ rendererSize = renderer.getSize();
213
+ renderer.setPixelRatio(1);
214
+ renderer.setSize(eyeWidth * 2, eyeHeight, false);
215
+ }
216
+ } else if (wasPresenting) {
217
+ renderer.setPixelRatio(rendererPixelRatio);
218
+ renderer.setSize(rendererSize.width, rendererSize.height, rendererUpdateStyle);
219
+ }
220
+ }
221
+
222
+ window.addEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);
223
+
224
+ this.setFullScreen = function (boolean) {
225
+ return new Promise(function (resolve, reject) {
226
+ if (vrDisplay === undefined) {
227
+ reject(new Error('No VR hardware found.'));
228
+ return;
229
+ }
230
+
231
+ if (scope.isPresenting === boolean) {
232
+ resolve();
233
+ return;
234
+ }
235
+
236
+ if (boolean) {
237
+ resolve(vrDisplay.requestPresent([{
238
+ source: canvas
239
+ }]));
240
+ } else {
241
+ resolve(vrDisplay.exitPresent());
242
+ }
243
+ });
244
+ };
245
+
246
+ this.requestPresent = function () {
247
+ return this.setFullScreen(true);
248
+ };
249
+
250
+ this.exitPresent = function () {
251
+ return this.setFullScreen(false);
252
+ };
253
+
254
+ this.requestAnimationFrame = function (f) {
255
+ if (vrDisplay !== undefined) {
256
+ return vrDisplay.requestAnimationFrame(f);
257
+ } else {
258
+ return window.requestAnimationFrame(f);
259
+ }
260
+ };
261
+
262
+ this.cancelAnimationFrame = function (h) {
263
+ if (vrDisplay !== undefined) {
264
+ vrDisplay.cancelAnimationFrame(h);
265
+ } else {
266
+ window.cancelAnimationFrame(h);
267
+ }
268
+ };
269
+
270
+ this.submitFrame = function () {
271
+ if (vrDisplay !== undefined && scope.isPresenting) {
272
+ vrDisplay.submitFrame();
273
+ }
274
+ };
275
+
276
+ this.autoSubmitFrame = true; // render
277
+
278
+ var cameraL = new THREE.PerspectiveCamera();
279
+ cameraL.layers.enable(1);
280
+ var cameraR = new THREE.PerspectiveCamera();
281
+ cameraR.layers.enable(2);
282
+
283
+ this.render = function (scene, camera, renderTarget, forceClear) {
284
+ if (vrDisplay && scope.isPresenting) {
285
+ var autoUpdate = scene.autoUpdate;
286
+
287
+ if (autoUpdate) {
288
+ scene.updateMatrixWorld();
289
+ scene.autoUpdate = false;
290
+ }
291
+
292
+ if (Array.isArray(scene)) {
293
+ console.warn('THREE.VREffect.render() no longer supports arrays. Use object.layers instead.');
294
+ scene = scene[0];
295
+ } // When rendering we don't care what the recommended size is, only what the actual size
296
+ // of the backbuffer is.
297
+
298
+
299
+ var size = renderer.getSize();
300
+ var layers = vrDisplay.getLayers();
301
+ var leftBounds;
302
+ var rightBounds;
303
+
304
+ if (layers.length) {
305
+ var layer = layers[0];
306
+ leftBounds = layer.leftBounds !== null && layer.leftBounds.length === 4 ? layer.leftBounds : defaultLeftBounds;
307
+ rightBounds = layer.rightBounds !== null && layer.rightBounds.length === 4 ? layer.rightBounds : defaultRightBounds;
308
+ } else {
309
+ leftBounds = defaultLeftBounds;
310
+ rightBounds = defaultRightBounds;
311
+ }
312
+
313
+ renderRectL = {
314
+ x: Math.round(size.width * leftBounds[0]),
315
+ y: Math.round(size.height * leftBounds[1]),
316
+ width: Math.round(size.width * leftBounds[2]),
317
+ height: Math.round(size.height * leftBounds[3])
318
+ };
319
+ renderRectR = {
320
+ x: Math.round(size.width * rightBounds[0]),
321
+ y: Math.round(size.height * rightBounds[1]),
322
+ width: Math.round(size.width * rightBounds[2]),
323
+ height: Math.round(size.height * rightBounds[3])
324
+ };
325
+
326
+ if (renderTarget) {
327
+ renderer.setRenderTarget(renderTarget);
328
+ renderTarget.scissorTest = true;
329
+ } else {
330
+ renderer.setRenderTarget(null);
331
+ renderer.setScissorTest(true);
332
+ }
333
+
334
+ if (renderer.autoClear || forceClear) renderer.clear();
335
+ if (camera.parent === null) camera.updateMatrixWorld();
336
+ camera.matrixWorld.decompose(cameraL.position, cameraL.quaternion, cameraL.scale);
337
+ cameraR.position.copy(cameraL.position);
338
+ cameraR.quaternion.copy(cameraL.quaternion);
339
+ cameraR.scale.copy(cameraL.scale);
340
+
341
+ if (vrDisplay.getFrameData) {
342
+ vrDisplay.depthNear = camera.near;
343
+ vrDisplay.depthFar = camera.far;
344
+ vrDisplay.getFrameData(frameData);
345
+ cameraL.projectionMatrix.elements = frameData.leftProjectionMatrix;
346
+ cameraR.projectionMatrix.elements = frameData.rightProjectionMatrix;
347
+ getEyeMatrices(frameData);
348
+ cameraL.updateMatrix();
349
+ cameraL.matrix.multiply(eyeMatrixL);
350
+ cameraL.matrix.decompose(cameraL.position, cameraL.quaternion, cameraL.scale);
351
+ cameraR.updateMatrix();
352
+ cameraR.matrix.multiply(eyeMatrixR);
353
+ cameraR.matrix.decompose(cameraR.position, cameraR.quaternion, cameraR.scale);
354
+ } else {
355
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
356
+ var eyeParamsR = vrDisplay.getEyeParameters('right');
357
+ cameraL.projectionMatrix = fovToProjection(eyeParamsL.fieldOfView, true, camera.near, camera.far);
358
+ cameraR.projectionMatrix = fovToProjection(eyeParamsR.fieldOfView, true, camera.near, camera.far);
359
+ eyeTranslationL.fromArray(eyeParamsL.offset);
360
+ eyeTranslationR.fromArray(eyeParamsR.offset);
361
+ cameraL.translateOnAxis(eyeTranslationL, cameraL.scale.x);
362
+ cameraR.translateOnAxis(eyeTranslationR, cameraR.scale.x);
363
+ } // render left eye
364
+
365
+
366
+ if (renderTarget) {
367
+ renderTarget.viewport.set(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
368
+ renderTarget.scissor.set(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
369
+ } else {
370
+ renderer.setViewport(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
371
+ renderer.setScissor(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
372
+ }
373
+
374
+ renderer.render(scene, cameraL, renderTarget, forceClear); // render right eye
375
+
376
+ if (renderTarget) {
377
+ renderTarget.viewport.set(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
378
+ renderTarget.scissor.set(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
379
+ } else {
380
+ renderer.setViewport(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
381
+ renderer.setScissor(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
382
+ }
383
+
384
+ renderer.render(scene, cameraR, renderTarget, forceClear);
385
+
386
+ if (renderTarget) {
387
+ renderTarget.viewport.set(0, 0, size.width, size.height);
388
+ renderTarget.scissor.set(0, 0, size.width, size.height);
389
+ renderTarget.scissorTest = false;
390
+ renderer.setRenderTarget(null);
391
+ } else {
392
+ renderer.setViewport(0, 0, size.width, size.height);
393
+ renderer.setScissorTest(false);
394
+ }
395
+
396
+ if (autoUpdate) {
397
+ scene.autoUpdate = true;
398
+ }
399
+
400
+ if (scope.autoSubmitFrame) {
401
+ scope.submitFrame();
402
+ }
403
+
404
+ return;
405
+ } // Regular render mode if not HMD
406
+
407
+
408
+ renderer.render(scene, camera, renderTarget, forceClear);
409
+ };
410
+
411
+ this.dispose = function () {
412
+ window.removeEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);
413
+ }; //
414
+
415
+
416
+ var poseOrientation = new THREE.Quaternion();
417
+ var posePosition = new THREE.Vector3(); // Compute model matrices of the eyes with respect to the head.
418
+
419
+ function getEyeMatrices(frameData) {
420
+ // Compute the matrix for the position of the head based on the pose
421
+ if (frameData.pose.orientation) {
422
+ poseOrientation.fromArray(frameData.pose.orientation);
423
+ headMatrix.makeRotationFromQuaternion(poseOrientation);
424
+ } else {
425
+ headMatrix.identity();
426
+ }
427
+
428
+ if (frameData.pose.position) {
429
+ posePosition.fromArray(frameData.pose.position);
430
+ headMatrix.setPosition(posePosition);
431
+ } // The view matrix transforms vertices from sitting space to eye space. As such, the view matrix can be thought of as a product of two matrices:
432
+ // headToEyeMatrix * sittingToHeadMatrix
433
+ // The headMatrix that we've calculated above is the model matrix of the head in sitting space, which is the inverse of sittingToHeadMatrix.
434
+ // So when we multiply the view matrix with headMatrix, we're left with headToEyeMatrix:
435
+ // viewMatrix * headMatrix = headToEyeMatrix * sittingToHeadMatrix * headMatrix = headToEyeMatrix
436
+
437
+
438
+ eyeMatrixL.fromArray(frameData.leftViewMatrix);
439
+ eyeMatrixL.multiply(headMatrix);
440
+ eyeMatrixR.fromArray(frameData.rightViewMatrix);
441
+ eyeMatrixR.multiply(headMatrix); // The eye's model matrix in head space is the inverse of headToEyeMatrix we calculated above.
442
+
443
+ eyeMatrixL.getInverse(eyeMatrixL);
444
+ eyeMatrixR.getInverse(eyeMatrixR);
445
+ }
446
+
447
+ function fovToNDCScaleOffset(fov) {
448
+ var pxscale = 2.0 / (fov.leftTan + fov.rightTan);
449
+ var pxoffset = (fov.leftTan - fov.rightTan) * pxscale * 0.5;
450
+ var pyscale = 2.0 / (fov.upTan + fov.downTan);
451
+ var pyoffset = (fov.upTan - fov.downTan) * pyscale * 0.5;
452
+ return {
453
+ scale: [pxscale, pyscale],
454
+ offset: [pxoffset, pyoffset]
455
+ };
456
+ }
457
+
458
+ function fovPortToProjection(fov, rightHanded, zNear, zFar) {
459
+ rightHanded = rightHanded === undefined ? true : rightHanded;
460
+ zNear = zNear === undefined ? 0.01 : zNear;
461
+ zFar = zFar === undefined ? 10000.0 : zFar;
462
+ var handednessScale = rightHanded ? -1.0 : 1.0; // start with an identity matrix
463
+
464
+ var mobj = new THREE.Matrix4();
465
+ var m = mobj.elements; // and with scale/offset info for normalized device coords
466
+
467
+ var scaleAndOffset = fovToNDCScaleOffset(fov); // X result, map clip edges to [-w,+w]
468
+
469
+ m[0 * 4 + 0] = scaleAndOffset.scale[0];
470
+ m[0 * 4 + 1] = 0.0;
471
+ m[0 * 4 + 2] = scaleAndOffset.offset[0] * handednessScale;
472
+ m[0 * 4 + 3] = 0.0; // Y result, map clip edges to [-w,+w]
473
+ // Y offset is negated because this proj matrix transforms from world coords with Y=up,
474
+ // but the NDC scaling has Y=down (thanks D3D?)
475
+
476
+ m[1 * 4 + 0] = 0.0;
477
+ m[1 * 4 + 1] = scaleAndOffset.scale[1];
478
+ m[1 * 4 + 2] = -scaleAndOffset.offset[1] * handednessScale;
479
+ m[1 * 4 + 3] = 0.0; // Z result (up to the app)
480
+
481
+ m[2 * 4 + 0] = 0.0;
482
+ m[2 * 4 + 1] = 0.0;
483
+ m[2 * 4 + 2] = zFar / (zNear - zFar) * -handednessScale;
484
+ m[2 * 4 + 3] = zFar * zNear / (zNear - zFar); // W result (= Z in)
485
+
486
+ m[3 * 4 + 0] = 0.0;
487
+ m[3 * 4 + 1] = 0.0;
488
+ m[3 * 4 + 2] = handednessScale;
489
+ m[3 * 4 + 3] = 0.0;
490
+ mobj.transpose();
491
+ return mobj;
492
+ }
493
+
494
+ function fovToProjection(fov, rightHanded, zNear, zFar) {
495
+ var DEG2RAD = Math.PI / 180.0;
496
+ var fovPort = {
497
+ upTan: Math.tan(fov.upDegrees * DEG2RAD),
498
+ downTan: Math.tan(fov.downDegrees * DEG2RAD),
499
+ leftTan: Math.tan(fov.leftDegrees * DEG2RAD),
500
+ rightTan: Math.tan(fov.rightDegrees * DEG2RAD)
501
+ };
502
+ return fovPortToProjection(fovPort, rightHanded, zNear, zFar);
503
+ }
504
+ };
505
+
506
+ /**
507
+ * @author qiao / https://github.com/qiao
508
+ * @author mrdoob / http://mrdoob.com
509
+ * @author alteredq / http://alteredqualia.com/
510
+ * @author WestLangley / http://github.com/WestLangley
511
+ * @author erich666 / http://erichaines.com
512
+ *
513
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/OrbitControls.js
514
+ */
515
+ // Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
516
+ //
517
+ // Orbit - left mouse / touch: one-finger move
518
+ // Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
519
+ // Pan - right mouse, or arrow keys / touch: two-finger move
520
+
521
+ var OrbitControls = function OrbitControls(object, domElement) {
522
+ this.object = object;
523
+ this.domElement = domElement !== undefined ? domElement : document; // Set to false to disable this control
524
+
525
+ this.enabled = true; // "target" sets the location of focus, where the object orbits around
526
+
527
+ this.target = new THREE.Vector3(); // How far you can dolly in and out ( PerspectiveCamera only )
528
+
529
+ this.minDistance = 0;
530
+ this.maxDistance = Infinity; // How far you can zoom in and out ( OrthographicCamera only )
531
+
532
+ this.minZoom = 0;
533
+ this.maxZoom = Infinity; // How far you can orbit vertically, upper and lower limits.
534
+ // Range is 0 to Math.PI radians.
535
+
536
+ this.minPolarAngle = 0; // radians
537
+
538
+ this.maxPolarAngle = Math.PI; // radians
539
+ // How far you can orbit horizontally, upper and lower limits.
540
+ // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ].
541
+
542
+ this.minAzimuthAngle = -Infinity; // radians
543
+
544
+ this.maxAzimuthAngle = Infinity; // radians
545
+ // Set to true to enable damping (inertia)
546
+ // If damping is enabled, you must call controls.update() in your animation loop
547
+
548
+ this.enableDamping = false;
549
+ this.dampingFactor = 0.25; // This option actually enables dollying in and out; left as "zoom" for backwards compatibility.
550
+ // Set to false to disable zooming
551
+
552
+ this.enableZoom = true;
553
+ this.zoomSpeed = 1.0; // Set to false to disable rotating
554
+
555
+ this.enableRotate = true;
556
+ this.rotateSpeed = 1.0; // Set to false to disable panning
557
+
558
+ this.enablePan = true;
559
+ this.panSpeed = 1.0;
560
+ this.screenSpacePanning = false; // if true, pan in screen-space
561
+
562
+ this.keyPanSpeed = 7.0; // pixels moved per arrow key push
563
+ // Set to true to automatically rotate around the target
564
+ // If auto-rotate is enabled, you must call controls.update() in your animation loop
565
+
566
+ this.autoRotate = false;
567
+ this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60
568
+ // Set to false to disable use of the keys
569
+
570
+ this.enableKeys = true; // The four arrow keys
571
+
572
+ this.keys = {
573
+ LEFT: 37,
574
+ UP: 38,
575
+ RIGHT: 39,
576
+ BOTTOM: 40
577
+ }; // Mouse buttons
578
+
579
+ this.mouseButtons = {
580
+ ORBIT: THREE.MOUSE.LEFT,
581
+ ZOOM: THREE.MOUSE.MIDDLE,
582
+ PAN: THREE.MOUSE.RIGHT
583
+ }; // for reset
584
+
585
+ this.target0 = this.target.clone();
586
+ this.position0 = this.object.position.clone();
587
+ this.zoom0 = this.object.zoom; //
588
+ // public methods
589
+ //
590
+
591
+ this.getPolarAngle = function () {
592
+ return spherical.phi;
593
+ };
594
+
595
+ this.getAzimuthalAngle = function () {
596
+ return spherical.theta;
597
+ };
598
+
599
+ this.saveState = function () {
600
+ scope.target0.copy(scope.target);
601
+ scope.position0.copy(scope.object.position);
602
+ scope.zoom0 = scope.object.zoom;
603
+ };
604
+
605
+ this.reset = function () {
606
+ scope.target.copy(scope.target0);
607
+ scope.object.position.copy(scope.position0);
608
+ scope.object.zoom = scope.zoom0;
609
+ scope.object.updateProjectionMatrix();
610
+ scope.dispatchEvent(changeEvent);
611
+ scope.update();
612
+ state = STATE.NONE;
613
+ }; // this method is exposed, but perhaps it would be better if we can make it private...
614
+
615
+
616
+ this.update = function () {
617
+ var offset = new THREE.Vector3(); // so camera.up is the orbit axis
618
+
619
+ var quat = new THREE.Quaternion().setFromUnitVectors(object.up, new THREE.Vector3(0, 1, 0));
620
+ var quatInverse = quat.clone().inverse();
621
+ var lastPosition = new THREE.Vector3();
622
+ var lastQuaternion = new THREE.Quaternion();
623
+ return function update() {
624
+ var position = scope.object.position;
625
+ offset.copy(position).sub(scope.target); // rotate offset to "y-axis-is-up" space
626
+
627
+ offset.applyQuaternion(quat); // angle from z-axis around y-axis
628
+
629
+ spherical.setFromVector3(offset);
630
+
631
+ if (scope.autoRotate && state === STATE.NONE) {
632
+ scope.rotateLeft(getAutoRotationAngle());
633
+ }
634
+
635
+ spherical.theta += sphericalDelta.theta;
636
+ spherical.phi += sphericalDelta.phi; // restrict theta to be between desired limits
637
+
638
+ spherical.theta = Math.max(scope.minAzimuthAngle, Math.min(scope.maxAzimuthAngle, spherical.theta)); // restrict phi to be between desired limits
639
+
640
+ spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));
641
+ spherical.makeSafe();
642
+ spherical.radius *= scale; // restrict radius to be between desired limits
643
+
644
+ spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, spherical.radius)); // move target to panned location
645
+
646
+ scope.target.add(panOffset);
647
+ offset.setFromSpherical(spherical); // rotate offset back to "camera-up-vector-is-up" space
648
+
649
+ offset.applyQuaternion(quatInverse);
650
+ position.copy(scope.target).add(offset);
651
+ scope.object.lookAt(scope.target);
652
+
653
+ if (scope.enableDamping === true) {
654
+ sphericalDelta.theta *= 1 - scope.dampingFactor;
655
+ sphericalDelta.phi *= 1 - scope.dampingFactor;
656
+ panOffset.multiplyScalar(1 - scope.dampingFactor);
657
+ } else {
658
+ sphericalDelta.set(0, 0, 0);
659
+ panOffset.set(0, 0, 0);
660
+ }
661
+
662
+ scale = 1; // update condition is:
663
+ // min(camera displacement, camera rotation in radians)^2 > EPS
664
+ // using small-angle approximation cos(x/2) = 1 - x^2 / 8
665
+
666
+ if (zoomChanged || lastPosition.distanceToSquared(scope.object.position) > EPS || 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS) {
667
+ scope.dispatchEvent(changeEvent);
668
+ lastPosition.copy(scope.object.position);
669
+ lastQuaternion.copy(scope.object.quaternion);
670
+ zoomChanged = false;
671
+ return true;
672
+ }
673
+
674
+ return false;
675
+ };
676
+ }();
677
+
678
+ this.dispose = function () {
679
+ scope.domElement.removeEventListener('contextmenu', onContextMenu, false);
680
+ scope.domElement.removeEventListener('mousedown', onMouseDown, false);
681
+ scope.domElement.removeEventListener('wheel', onMouseWheel, false);
682
+ scope.domElement.removeEventListener('touchstart', onTouchStart, false);
683
+ scope.domElement.removeEventListener('touchend', onTouchEnd, false);
684
+ scope.domElement.removeEventListener('touchmove', onTouchMove, false);
685
+ document.removeEventListener('mousemove', onMouseMove, false);
686
+ document.removeEventListener('mouseup', onMouseUp, false);
687
+ window.removeEventListener('keydown', onKeyDown, false); //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?
688
+ }; //
689
+ // internals
690
+ //
691
+
692
+
693
+ var scope = this;
694
+ var changeEvent = {
695
+ type: 'change'
696
+ };
697
+ var startEvent = {
698
+ type: 'start'
699
+ };
700
+ var endEvent = {
701
+ type: 'end'
702
+ };
703
+ var STATE = {
704
+ NONE: -1,
705
+ ROTATE: 0,
706
+ DOLLY: 1,
707
+ PAN: 2,
708
+ TOUCH_ROTATE: 3,
709
+ TOUCH_DOLLY_PAN: 4
710
+ };
711
+ var state = STATE.NONE;
712
+ var EPS = 0.000001; // current position in spherical coordinates
713
+
714
+ var spherical = new THREE.Spherical();
715
+ var sphericalDelta = new THREE.Spherical();
716
+ var scale = 1;
717
+ var panOffset = new THREE.Vector3();
718
+ var zoomChanged = false;
719
+ var rotateStart = new THREE.Vector2();
720
+ var rotateEnd = new THREE.Vector2();
721
+ var rotateDelta = new THREE.Vector2();
722
+ var panStart = new THREE.Vector2();
723
+ var panEnd = new THREE.Vector2();
724
+ var panDelta = new THREE.Vector2();
725
+ var dollyStart = new THREE.Vector2();
726
+ var dollyEnd = new THREE.Vector2();
727
+ var dollyDelta = new THREE.Vector2();
728
+
729
+ function getAutoRotationAngle() {
730
+ return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;
731
+ }
732
+
733
+ function getZoomScale() {
734
+ return Math.pow(0.95, scope.zoomSpeed);
735
+ }
736
+
737
+ scope.rotateLeft = function rotateLeft(angle) {
738
+ sphericalDelta.theta -= angle;
739
+ };
740
+
741
+ scope.rotateUp = function rotateUp(angle) {
742
+ sphericalDelta.phi -= angle;
743
+ };
744
+
745
+ var panLeft = function () {
746
+ var v = new THREE.Vector3();
747
+ return function panLeft(distance, objectMatrix) {
748
+ v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix
749
+
750
+ v.multiplyScalar(-distance);
751
+ panOffset.add(v);
752
+ };
753
+ }();
754
+
755
+ var panUp = function () {
756
+ var v = new THREE.Vector3();
757
+ return function panUp(distance, objectMatrix) {
758
+ if (scope.screenSpacePanning === true) {
759
+ v.setFromMatrixColumn(objectMatrix, 1);
760
+ } else {
761
+ v.setFromMatrixColumn(objectMatrix, 0);
762
+ v.crossVectors(scope.object.up, v);
763
+ }
764
+
765
+ v.multiplyScalar(distance);
766
+ panOffset.add(v);
767
+ };
768
+ }(); // deltaX and deltaY are in pixels; right and down are positive
769
+
770
+
771
+ var pan = function () {
772
+ var offset = new THREE.Vector3();
773
+ return function pan(deltaX, deltaY) {
774
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
775
+
776
+ if (scope.object.isPerspectiveCamera) {
777
+ // perspective
778
+ var position = scope.object.position;
779
+ offset.copy(position).sub(scope.target);
780
+ var targetDistance = offset.length(); // half of the fov is center to top of screen
781
+
782
+ targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180.0); // we use only clientHeight here so aspect ratio does not distort speed
783
+
784
+ panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);
785
+ panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);
786
+ } else if (scope.object.isOrthographicCamera) {
787
+ // orthographic
788
+ panLeft(deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth, scope.object.matrix);
789
+ panUp(deltaY * (scope.object.top - scope.object.bottom) / scope.object.zoom / element.clientHeight, scope.object.matrix);
790
+ } else {
791
+ // camera neither orthographic nor perspective
792
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.');
793
+ scope.enablePan = false;
794
+ }
795
+ };
796
+ }();
797
+
798
+ function dollyIn(dollyScale) {
799
+ if (scope.object.isPerspectiveCamera) {
800
+ scale /= dollyScale;
801
+ } else if (scope.object.isOrthographicCamera) {
802
+ scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));
803
+ scope.object.updateProjectionMatrix();
804
+ zoomChanged = true;
805
+ } else {
806
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');
807
+ scope.enableZoom = false;
808
+ }
809
+ }
810
+
811
+ function dollyOut(dollyScale) {
812
+ if (scope.object.isPerspectiveCamera) {
813
+ scale *= dollyScale;
814
+ } else if (scope.object.isOrthographicCamera) {
815
+ scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));
816
+ scope.object.updateProjectionMatrix();
817
+ zoomChanged = true;
818
+ } else {
819
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');
820
+ scope.enableZoom = false;
821
+ }
822
+ } //
823
+ // event callbacks - update the object state
824
+ //
825
+
826
+
827
+ function handleMouseDownRotate(event) {
828
+ //console.log( 'handleMouseDownRotate' );
829
+ rotateStart.set(event.clientX, event.clientY);
830
+ }
831
+
832
+ function handleMouseDownDolly(event) {
833
+ //console.log( 'handleMouseDownDolly' );
834
+ dollyStart.set(event.clientX, event.clientY);
835
+ }
836
+
837
+ function handleMouseDownPan(event) {
838
+ //console.log( 'handleMouseDownPan' );
839
+ panStart.set(event.clientX, event.clientY);
840
+ }
841
+
842
+ function handleMouseMoveRotate(event) {
843
+ //console.log( 'handleMouseMoveRotate' );
844
+ rotateEnd.set(event.clientX, event.clientY);
845
+ rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);
846
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
847
+ scope.rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height
848
+
849
+ scope.rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);
850
+ rotateStart.copy(rotateEnd);
851
+ scope.update();
852
+ }
853
+
854
+ function handleMouseMoveDolly(event) {
855
+ //console.log( 'handleMouseMoveDolly' );
856
+ dollyEnd.set(event.clientX, event.clientY);
857
+ dollyDelta.subVectors(dollyEnd, dollyStart);
858
+
859
+ if (dollyDelta.y > 0) {
860
+ dollyIn(getZoomScale());
861
+ } else if (dollyDelta.y < 0) {
862
+ dollyOut(getZoomScale());
863
+ }
864
+
865
+ dollyStart.copy(dollyEnd);
866
+ scope.update();
867
+ }
868
+
869
+ function handleMouseMovePan(event) {
870
+ //console.log( 'handleMouseMovePan' );
871
+ panEnd.set(event.clientX, event.clientY);
872
+ panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);
873
+ pan(panDelta.x, panDelta.y);
874
+ panStart.copy(panEnd);
875
+ scope.update();
876
+ }
877
+
878
+ function handleMouseWheel(event) {
879
+ // console.log( 'handleMouseWheel' );
880
+ if (event.deltaY < 0) {
881
+ dollyOut(getZoomScale());
882
+ } else if (event.deltaY > 0) {
883
+ dollyIn(getZoomScale());
884
+ }
885
+
886
+ scope.update();
887
+ }
888
+
889
+ function handleKeyDown(event) {
890
+ //console.log( 'handleKeyDown' );
891
+ switch (event.keyCode) {
892
+ case scope.keys.UP:
893
+ pan(0, scope.keyPanSpeed);
894
+ scope.update();
895
+ break;
896
+
897
+ case scope.keys.BOTTOM:
898
+ pan(0, -scope.keyPanSpeed);
899
+ scope.update();
900
+ break;
901
+
902
+ case scope.keys.LEFT:
903
+ pan(scope.keyPanSpeed, 0);
904
+ scope.update();
905
+ break;
906
+
907
+ case scope.keys.RIGHT:
908
+ pan(-scope.keyPanSpeed, 0);
909
+ scope.update();
910
+ break;
911
+ }
912
+ }
913
+
914
+ function handleTouchStartRotate(event) {
915
+ //console.log( 'handleTouchStartRotate' );
916
+ rotateStart.set(event.touches[0].pageX, event.touches[0].pageY);
917
+ }
918
+
919
+ function handleTouchStartDollyPan(event) {
920
+ //console.log( 'handleTouchStartDollyPan' );
921
+ if (scope.enableZoom) {
922
+ var dx = event.touches[0].pageX - event.touches[1].pageX;
923
+ var dy = event.touches[0].pageY - event.touches[1].pageY;
924
+ var distance = Math.sqrt(dx * dx + dy * dy);
925
+ dollyStart.set(0, distance);
926
+ }
927
+
928
+ if (scope.enablePan) {
929
+ var x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
930
+ var y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY);
931
+ panStart.set(x, y);
932
+ }
933
+ }
934
+
935
+ function handleTouchMoveRotate(event) {
936
+ //console.log( 'handleTouchMoveRotate' );
937
+ rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY);
938
+ rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);
939
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
940
+ scope.rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height
941
+
942
+ scope.rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);
943
+ rotateStart.copy(rotateEnd);
944
+ scope.update();
945
+ }
946
+
947
+ function handleTouchMoveDollyPan(event) {
948
+ //console.log( 'handleTouchMoveDollyPan' );
949
+ if (scope.enableZoom) {
950
+ var dx = event.touches[0].pageX - event.touches[1].pageX;
951
+ var dy = event.touches[0].pageY - event.touches[1].pageY;
952
+ var distance = Math.sqrt(dx * dx + dy * dy);
953
+ dollyEnd.set(0, distance);
954
+ dollyDelta.set(0, Math.pow(dollyEnd.y / dollyStart.y, scope.zoomSpeed));
955
+ dollyIn(dollyDelta.y);
956
+ dollyStart.copy(dollyEnd);
957
+ }
958
+
959
+ if (scope.enablePan) {
960
+ var x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
961
+ var y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY);
962
+ panEnd.set(x, y);
963
+ panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);
964
+ pan(panDelta.x, panDelta.y);
965
+ panStart.copy(panEnd);
966
+ }
967
+
968
+ scope.update();
969
+ }
970
+ // event handlers - FSM: listen for events and reset state
971
+ //
972
+
973
+
974
+ function onMouseDown(event) {
975
+ if (scope.enabled === false) return;
976
+ event.preventDefault();
977
+
978
+ switch (event.button) {
979
+ case scope.mouseButtons.ORBIT:
980
+ if (scope.enableRotate === false) return;
981
+ handleMouseDownRotate(event);
982
+ state = STATE.ROTATE;
983
+ break;
984
+
985
+ case scope.mouseButtons.ZOOM:
986
+ if (scope.enableZoom === false) return;
987
+ handleMouseDownDolly(event);
988
+ state = STATE.DOLLY;
989
+ break;
990
+
991
+ case scope.mouseButtons.PAN:
992
+ if (scope.enablePan === false) return;
993
+ handleMouseDownPan(event);
994
+ state = STATE.PAN;
995
+ break;
996
+ }
997
+
998
+ if (state !== STATE.NONE) {
999
+ document.addEventListener('mousemove', onMouseMove, false);
1000
+ document.addEventListener('mouseup', onMouseUp, false);
1001
+ scope.dispatchEvent(startEvent);
1002
+ }
1003
+ }
1004
+
1005
+ function onMouseMove(event) {
1006
+ if (scope.enabled === false) return;
1007
+ event.preventDefault();
1008
+
1009
+ switch (state) {
1010
+ case STATE.ROTATE:
1011
+ if (scope.enableRotate === false) return;
1012
+ handleMouseMoveRotate(event);
1013
+ break;
1014
+
1015
+ case STATE.DOLLY:
1016
+ if (scope.enableZoom === false) return;
1017
+ handleMouseMoveDolly(event);
1018
+ break;
1019
+
1020
+ case STATE.PAN:
1021
+ if (scope.enablePan === false) return;
1022
+ handleMouseMovePan(event);
1023
+ break;
1024
+ }
1025
+ }
1026
+
1027
+ function onMouseUp(event) {
1028
+ if (scope.enabled === false) return;
1029
+ document.removeEventListener('mousemove', onMouseMove, false);
1030
+ document.removeEventListener('mouseup', onMouseUp, false);
1031
+ scope.dispatchEvent(endEvent);
1032
+ state = STATE.NONE;
1033
+ }
1034
+
1035
+ function onMouseWheel(event) {
1036
+ if (scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE && state !== STATE.ROTATE) return;
1037
+ event.preventDefault();
1038
+ event.stopPropagation();
1039
+ scope.dispatchEvent(startEvent);
1040
+ handleMouseWheel(event);
1041
+ scope.dispatchEvent(endEvent);
1042
+ }
1043
+
1044
+ function onKeyDown(event) {
1045
+ if (scope.enabled === false || scope.enableKeys === false || scope.enablePan === false) return;
1046
+ handleKeyDown(event);
1047
+ }
1048
+
1049
+ function onTouchStart(event) {
1050
+ if (scope.enabled === false) return;
1051
+ event.preventDefault();
1052
+
1053
+ switch (event.touches.length) {
1054
+ case 1:
1055
+ // one-fingered touch: rotate
1056
+ if (scope.enableRotate === false) return;
1057
+ handleTouchStartRotate(event);
1058
+ state = STATE.TOUCH_ROTATE;
1059
+ break;
1060
+
1061
+ case 2:
1062
+ // two-fingered touch: dolly-pan
1063
+ if (scope.enableZoom === false && scope.enablePan === false) return;
1064
+ handleTouchStartDollyPan(event);
1065
+ state = STATE.TOUCH_DOLLY_PAN;
1066
+ break;
1067
+
1068
+ default:
1069
+ state = STATE.NONE;
1070
+ }
1071
+
1072
+ if (state !== STATE.NONE) {
1073
+ scope.dispatchEvent(startEvent);
1074
+ }
1075
+ }
1076
+
1077
+ function onTouchMove(event) {
1078
+ if (scope.enabled === false) return;
1079
+ event.preventDefault();
1080
+ event.stopPropagation();
1081
+
1082
+ switch (event.touches.length) {
1083
+ case 1:
1084
+ // one-fingered touch: rotate
1085
+ if (scope.enableRotate === false) return;
1086
+ if (state !== STATE.TOUCH_ROTATE) return; // is this needed?
1087
+
1088
+ handleTouchMoveRotate(event);
1089
+ break;
1090
+
1091
+ case 2:
1092
+ // two-fingered touch: dolly-pan
1093
+ if (scope.enableZoom === false && scope.enablePan === false) return;
1094
+ if (state !== STATE.TOUCH_DOLLY_PAN) return; // is this needed?
1095
+
1096
+ handleTouchMoveDollyPan(event);
1097
+ break;
1098
+
1099
+ default:
1100
+ state = STATE.NONE;
1101
+ }
1102
+ }
1103
+
1104
+ function onTouchEnd(event) {
1105
+ if (scope.enabled === false) return;
1106
+ scope.dispatchEvent(endEvent);
1107
+ state = STATE.NONE;
1108
+ }
1109
+
1110
+ function onContextMenu(event) {
1111
+ if (scope.enabled === false) return;
1112
+ event.preventDefault();
1113
+ } //
1114
+ // scope.domElement.addEventListener( 'contextmenu', onContextMenu, false );
1115
+
1116
+
1117
+ scope.domElement.addEventListener('mousedown', onMouseDown, false);
1118
+ scope.domElement.addEventListener('wheel', onMouseWheel, false);
1119
+ scope.domElement.addEventListener('touchstart', onTouchStart, false);
1120
+ scope.domElement.addEventListener('touchend', onTouchEnd, false);
1121
+ scope.domElement.addEventListener('touchmove', onTouchMove, false);
1122
+ window.addEventListener('keydown', onKeyDown, false); // force an update at start
1123
+
1124
+ this.update();
1125
+ };
1126
+
1127
+ OrbitControls.prototype = Object.create(THREE.EventDispatcher.prototype);
1128
+ OrbitControls.prototype.constructor = OrbitControls;
1129
+ Object.defineProperties(OrbitControls.prototype, {
1130
+ center: {
1131
+ get: function get() {
1132
+ console.warn('THREE.OrbitControls: .center has been renamed to .target');
1133
+ return this.target;
1134
+ }
1135
+ },
1136
+ // backward compatibility
1137
+ noZoom: {
1138
+ get: function get() {
1139
+ console.warn('THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.');
1140
+ return !this.enableZoom;
1141
+ },
1142
+ set: function set(value) {
1143
+ console.warn('THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.');
1144
+ this.enableZoom = !value;
1145
+ }
1146
+ },
1147
+ noRotate: {
1148
+ get: function get() {
1149
+ console.warn('THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.');
1150
+ return !this.enableRotate;
1151
+ },
1152
+ set: function set(value) {
1153
+ console.warn('THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.');
1154
+ this.enableRotate = !value;
1155
+ }
1156
+ },
1157
+ noPan: {
1158
+ get: function get() {
1159
+ console.warn('THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.');
1160
+ return !this.enablePan;
1161
+ },
1162
+ set: function set(value) {
1163
+ console.warn('THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.');
1164
+ this.enablePan = !value;
1165
+ }
1166
+ },
1167
+ noKeys: {
1168
+ get: function get() {
1169
+ console.warn('THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.');
1170
+ return !this.enableKeys;
1171
+ },
1172
+ set: function set(value) {
1173
+ console.warn('THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.');
1174
+ this.enableKeys = !value;
1175
+ }
1176
+ },
1177
+ staticMoving: {
1178
+ get: function get() {
1179
+ console.warn('THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.');
1180
+ return !this.enableDamping;
1181
+ },
1182
+ set: function set(value) {
1183
+ console.warn('THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.');
1184
+ this.enableDamping = !value;
1185
+ }
1186
+ },
1187
+ dynamicDampingFactor: {
1188
+ get: function get() {
1189
+ console.warn('THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.');
1190
+ return this.dampingFactor;
1191
+ },
1192
+ set: function set(value) {
1193
+ console.warn('THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.');
1194
+ this.dampingFactor = value;
1195
+ }
1196
+ }
1197
+ });
1198
+
1199
+ /**
1200
+ * @author richt / http://richt.me
1201
+ * @author WestLangley / http://github.com/WestLangley
1202
+ *
1203
+ * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)
1204
+ *
1205
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/DeviceOrientationControls.js
1206
+ */
1207
+
1208
+ var DeviceOrientationControls = function DeviceOrientationControls(object) {
1209
+ var scope = this;
1210
+ this.object = object;
1211
+ this.object.rotation.reorder('YXZ');
1212
+ this.enabled = true;
1213
+ this.deviceOrientation = {};
1214
+ this.screenOrientation = 0;
1215
+ this.alphaOffset = 0; // radians
1216
+
1217
+ var onDeviceOrientationChangeEvent = function onDeviceOrientationChangeEvent(event) {
1218
+ scope.deviceOrientation = event;
1219
+ };
1220
+
1221
+ var onScreenOrientationChangeEvent = function onScreenOrientationChangeEvent() {
1222
+ scope.screenOrientation = window.orientation || 0;
1223
+ }; // The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''
1224
+
1225
+
1226
+ var setObjectQuaternion = function () {
1227
+ var zee = new THREE.Vector3(0, 0, 1);
1228
+ var euler = new THREE.Euler();
1229
+ var q0 = new THREE.Quaternion();
1230
+ var q1 = new THREE.Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5)); // - PI/2 around the x-axis
1231
+
1232
+ return function (quaternion, alpha, beta, gamma, orient) {
1233
+ euler.set(beta, alpha, -gamma, 'YXZ'); // 'ZXY' for the device, but 'YXZ' for us
1234
+
1235
+ quaternion.setFromEuler(euler); // orient the device
1236
+
1237
+ quaternion.multiply(q1); // camera looks out the back of the device, not the top
1238
+
1239
+ quaternion.multiply(q0.setFromAxisAngle(zee, -orient)); // adjust for screen orientation
1240
+ };
1241
+ }();
1242
+
1243
+ this.connect = function () {
1244
+ onScreenOrientationChangeEvent(); // run once on load
1245
+
1246
+ window.addEventListener('orientationchange', onScreenOrientationChangeEvent, false);
1247
+ window.addEventListener('deviceorientation', onDeviceOrientationChangeEvent, false);
1248
+ scope.enabled = true;
1249
+ };
1250
+
1251
+ this.disconnect = function () {
1252
+ window.removeEventListener('orientationchange', onScreenOrientationChangeEvent, false);
1253
+ window.removeEventListener('deviceorientation', onDeviceOrientationChangeEvent, false);
1254
+ scope.enabled = false;
1255
+ };
1256
+
1257
+ this.update = function () {
1258
+ if (scope.enabled === false) return;
1259
+ var device = scope.deviceOrientation;
1260
+
1261
+ if (device) {
1262
+ var alpha = device.alpha ? THREE.Math.degToRad(device.alpha) + scope.alphaOffset : 0; // Z
1263
+
1264
+ var beta = device.beta ? THREE.Math.degToRad(device.beta) : 0; // X'
1265
+
1266
+ var gamma = device.gamma ? THREE.Math.degToRad(device.gamma) : 0; // Y''
1267
+
1268
+ var orient = scope.screenOrientation ? THREE.Math.degToRad(scope.screenOrientation) : 0; // O
1269
+
1270
+ setObjectQuaternion(scope.object.quaternion, alpha, beta, gamma, orient);
1271
+ }
1272
+ };
1273
+
1274
+ this.dispose = function () {
1275
+ scope.disconnect();
1276
+ };
1277
+
1278
+ this.connect();
1279
+ };
1280
+
1281
+ /**
1282
+ * Convert a quaternion to an angle
1283
+ *
1284
+ * Taken from https://stackoverflow.com/a/35448946
1285
+ * Thanks P. Ellul
1286
+ */
1287
+
1288
+ function Quat2Angle(x, y, z, w) {
1289
+ var test = x * y + z * w; // singularity at north pole
1290
+
1291
+ if (test > 0.499) {
1292
+ var _yaw = 2 * Math.atan2(x, w);
1293
+
1294
+ var _pitch = Math.PI / 2;
1295
+
1296
+ var _roll = 0;
1297
+ return new THREE.Vector3(_pitch, _roll, _yaw);
1298
+ } // singularity at south pole
1299
+
1300
+
1301
+ if (test < -0.499) {
1302
+ var _yaw2 = -2 * Math.atan2(x, w);
1303
+
1304
+ var _pitch2 = -Math.PI / 2;
1305
+
1306
+ var _roll2 = 0;
1307
+ return new THREE.Vector3(_pitch2, _roll2, _yaw2);
1308
+ }
1309
+
1310
+ var sqx = x * x;
1311
+ var sqy = y * y;
1312
+ var sqz = z * z;
1313
+ var yaw = Math.atan2(2 * y * w - 2 * x * z, 1 - 2 * sqy - 2 * sqz);
1314
+ var pitch = Math.asin(2 * test);
1315
+ var roll = Math.atan2(2 * x * w - 2 * y * z, 1 - 2 * sqx - 2 * sqz);
1316
+ return new THREE.Vector3(pitch, roll, yaw);
1317
+ }
1318
+
1319
+ var OrbitOrientationControls = /*#__PURE__*/function () {
1320
+ function OrbitOrientationControls(options) {
1321
+ this.object = options.camera;
1322
+ this.domElement = options.canvas;
1323
+ this.orbit = new OrbitControls(this.object, this.domElement);
1324
+ this.speed = 0.5;
1325
+ this.orbit.target.set(0, 0, -1);
1326
+ this.orbit.enableZoom = false;
1327
+ this.orbit.enablePan = false;
1328
+ this.orbit.rotateSpeed = -this.speed; // if orientation is supported
1329
+
1330
+ if (options.orientation) {
1331
+ this.orientation = new DeviceOrientationControls(this.object);
1332
+ } // if projection is not full view
1333
+ // limit the rotation angle in order to not display back half view
1334
+
1335
+
1336
+ if (options.halfView) {
1337
+ this.orbit.minAzimuthAngle = -Math.PI / 4;
1338
+ this.orbit.maxAzimuthAngle = Math.PI / 4;
1339
+ }
1340
+ }
1341
+
1342
+ var _proto = OrbitOrientationControls.prototype;
1343
+
1344
+ _proto.update = function update() {
1345
+ // orientation updates the camera using quaternions and
1346
+ // orbit updates the camera using angles. They are incompatible
1347
+ // and one update overrides the other. So before
1348
+ // orbit overrides orientation we convert our quaternion changes to
1349
+ // an angle change. Then save the angle into orbit so that
1350
+ // it will take those into account when it updates the camera and overrides
1351
+ // our changes
1352
+ if (this.orientation) {
1353
+ this.orientation.update();
1354
+ var quat = this.orientation.object.quaternion;
1355
+ var currentAngle = Quat2Angle(quat.x, quat.y, quat.z, quat.w); // we also have to store the last angle since quaternions are b
1356
+
1357
+ if (typeof this.lastAngle_ === 'undefined') {
1358
+ this.lastAngle_ = currentAngle;
1359
+ }
1360
+
1361
+ this.orbit.rotateLeft((this.lastAngle_.z - currentAngle.z) * (1 + this.speed));
1362
+ this.orbit.rotateUp((this.lastAngle_.y - currentAngle.y) * (1 + this.speed));
1363
+ this.lastAngle_ = currentAngle;
1364
+ }
1365
+
1366
+ this.orbit.update();
1367
+ };
1368
+
1369
+ _proto.dispose = function dispose() {
1370
+ this.orbit.dispose();
1371
+
1372
+ if (this.orientation) {
1373
+ this.orientation.dispose();
1374
+ }
1375
+ };
1376
+
1377
+ return OrbitOrientationControls;
1378
+ }();
1379
+
1380
+ var corsSupport = function () {
1381
+ var video = document$1.createElement('video');
1382
+ video.crossOrigin = 'anonymous';
1383
+ return video.hasAttribute('crossorigin');
1384
+ }();
1385
+ var validProjections = ['360', '360_LR', '360_TB', '360_CUBE', 'EAC', 'EAC_LR', 'NONE', 'AUTO', 'Sphere', 'Cube', 'equirectangular', '180', '180_LR', '180_MONO'];
1386
+ var getInternalProjectionName = function getInternalProjectionName(projection) {
1387
+ if (!projection) {
1388
+ return;
1389
+ }
1390
+
1391
+ projection = projection.toString().trim();
1392
+
1393
+ if (/sphere/i.test(projection)) {
1394
+ return '360';
1395
+ }
1396
+
1397
+ if (/cube/i.test(projection)) {
1398
+ return '360_CUBE';
1399
+ }
1400
+
1401
+ if (/equirectangular/i.test(projection)) {
1402
+ return '360';
1403
+ }
1404
+
1405
+ for (var i = 0; i < validProjections.length; i++) {
1406
+ if (new RegExp('^' + validProjections[i] + '$', 'i').test(projection)) {
1407
+ return validProjections[i];
1408
+ }
1409
+ }
1410
+ };
1411
+
1412
+ /**
1413
+ * This class reacts to interactions with the canvas and
1414
+ * triggers appropriate functionality on the player. Right now
1415
+ * it does two things:
1416
+ *
1417
+ * 1. A `mousedown`/`touchstart` followed by `touchend`/`mouseup` without any
1418
+ * `touchmove` or `mousemove` toggles play/pause on the player
1419
+ * 2. Only moving on/clicking the control bar or toggling play/pause should
1420
+ * show the control bar. Moving around the scene in the canvas should not.
1421
+ */
1422
+
1423
+ var CanvasPlayerControls = /*#__PURE__*/function (_videojs$EventTarget) {
1424
+ _inheritsLoose(CanvasPlayerControls, _videojs$EventTarget);
1425
+
1426
+ function CanvasPlayerControls(player, canvas, options) {
1427
+ var _this;
1428
+
1429
+ _this = _videojs$EventTarget.call(this) || this;
1430
+ _this.player = player;
1431
+ _this.canvas = canvas;
1432
+ _this.options = options;
1433
+ _this.onMoveEnd = videojs.bind(_assertThisInitialized(_this), _this.onMoveEnd);
1434
+ _this.onMoveStart = videojs.bind(_assertThisInitialized(_this), _this.onMoveStart);
1435
+ _this.onMove = videojs.bind(_assertThisInitialized(_this), _this.onMove);
1436
+ _this.onControlBarMove = videojs.bind(_assertThisInitialized(_this), _this.onControlBarMove);
1437
+
1438
+ _this.player.controlBar.on(['mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend'], _this.onControlBarMove); // we have to override these here because
1439
+ // video.js listens for user activity on the video element
1440
+ // and makes the user active when the mouse moves.
1441
+ // We don't want that for 3d videos
1442
+
1443
+
1444
+ _this.oldReportUserActivity = _this.player.reportUserActivity;
1445
+
1446
+ _this.player.reportUserActivity = function () {}; // canvas movements
1447
+
1448
+
1449
+ _this.canvas.addEventListener('mousedown', _this.onMoveStart);
1450
+
1451
+ _this.canvas.addEventListener('touchstart', _this.onMoveStart);
1452
+
1453
+ _this.canvas.addEventListener('mousemove', _this.onMove);
1454
+
1455
+ _this.canvas.addEventListener('touchmove', _this.onMove);
1456
+
1457
+ _this.canvas.addEventListener('mouseup', _this.onMoveEnd);
1458
+
1459
+ _this.canvas.addEventListener('touchend', _this.onMoveEnd);
1460
+
1461
+ _this.shouldTogglePlay = false;
1462
+ return _this;
1463
+ }
1464
+
1465
+ var _proto = CanvasPlayerControls.prototype;
1466
+
1467
+ _proto.togglePlay = function togglePlay() {
1468
+ if (this.player.paused()) {
1469
+ this.player.play();
1470
+ } else {
1471
+ this.player.pause();
1472
+ }
1473
+ };
1474
+
1475
+ _proto.onMoveStart = function onMoveStart(e) {
1476
+ // if the player does not have a controlbar or
1477
+ // the move was a mouse click but not left click do not
1478
+ // toggle play.
1479
+ if (this.options.disableTogglePlay || !this.player.controls() || e.type === 'mousedown' && !videojs.dom.isSingleLeftClick(e)) {
1480
+ this.shouldTogglePlay = false;
1481
+ return;
1482
+ }
1483
+
1484
+ this.shouldTogglePlay = true;
1485
+ this.touchMoveCount_ = 0;
1486
+ };
1487
+
1488
+ _proto.onMoveEnd = function onMoveEnd(e) {
1489
+ // We want to have the same behavior in VR360 Player and standard player.
1490
+ // in touchend we want to know if was a touch click, for a click we show the bar,
1491
+ // otherwise continue with the mouse logic.
1492
+ //
1493
+ // Maximum movement allowed during a touch event to still be considered a tap
1494
+ // Other popular libs use anywhere from 2 (hammer.js) to 15,
1495
+ // so 10 seems like a nice, round number.
1496
+ if (e.type === 'touchend' && this.touchMoveCount_ < 10) {
1497
+ if (this.player.userActive() === false) {
1498
+ this.player.userActive(true);
1499
+ return;
1500
+ }
1501
+
1502
+ this.player.userActive(false);
1503
+ return;
1504
+ }
1505
+
1506
+ if (!this.shouldTogglePlay) {
1507
+ return;
1508
+ } // We want the same behavior in Desktop for VR360 and standard player
1509
+
1510
+
1511
+ if (e.type === 'mouseup') {
1512
+ this.togglePlay();
1513
+ }
1514
+ };
1515
+
1516
+ _proto.onMove = function onMove(e) {
1517
+ // Increase touchMoveCount_ since Android detects 1 - 6 touches when user click normally
1518
+ this.touchMoveCount_++;
1519
+ this.shouldTogglePlay = false;
1520
+ };
1521
+
1522
+ _proto.onControlBarMove = function onControlBarMove(e) {
1523
+ this.player.userActive(true);
1524
+ };
1525
+
1526
+ _proto.dispose = function dispose() {
1527
+ this.canvas.removeEventListener('mousedown', this.onMoveStart);
1528
+ this.canvas.removeEventListener('touchstart', this.onMoveStart);
1529
+ this.canvas.removeEventListener('mousemove', this.onMove);
1530
+ this.canvas.removeEventListener('touchmove', this.onMove);
1531
+ this.canvas.removeEventListener('mouseup', this.onMoveEnd);
1532
+ this.canvas.removeEventListener('touchend', this.onMoveEnd);
1533
+ this.player.controlBar.off(['mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend'], this.onControlBarMove);
1534
+ this.player.reportUserActivity = this.oldReportUserActivity;
1535
+ };
1536
+
1537
+ return CanvasPlayerControls;
1538
+ }(videojs.EventTarget);
1539
+
1540
+ /**
1541
+ * This class manages ambisonic decoding and binaural rendering via Omnitone library.
1542
+ */
1543
+
1544
+ var OmnitoneController = /*#__PURE__*/function (_videojs$EventTarget) {
1545
+ _inheritsLoose(OmnitoneController, _videojs$EventTarget);
1546
+
1547
+ /**
1548
+ * Omnitone controller class.
1549
+ *
1550
+ * @class
1551
+ * @param {AudioContext} audioContext - associated AudioContext.
1552
+ * @param {Omnitone library} omnitone - Omnitone library element.
1553
+ * @param {HTMLVideoElement} video - vidoe tag element.
1554
+ * @param {Object} options - omnitone options.
1555
+ */
1556
+ function OmnitoneController(audioContext, omnitone, video, options) {
1557
+ var _this;
1558
+
1559
+ _this = _videojs$EventTarget.call(this) || this;
1560
+ var settings = videojs.mergeOptions({
1561
+ // Safari uses the different AAC decoder than FFMPEG. The channel order is
1562
+ // The default 4ch AAC channel layout for FFMPEG AAC channel ordering.
1563
+ channelMap: videojs.browser.IS_SAFARI ? [2, 0, 1, 3] : [0, 1, 2, 3],
1564
+ ambisonicOrder: 1
1565
+ }, options);
1566
+ _this.videoElementSource = audioContext.createMediaElementSource(video);
1567
+ _this.foaRenderer = omnitone.createFOARenderer(audioContext, settings);
1568
+
1569
+ _this.foaRenderer.initialize().then(function () {
1570
+ if (audioContext.state === 'suspended') {
1571
+ _this.trigger({
1572
+ type: 'audiocontext-suspended'
1573
+ });
1574
+ }
1575
+
1576
+ _this.videoElementSource.connect(_this.foaRenderer.input);
1577
+
1578
+ _this.foaRenderer.output.connect(audioContext.destination);
1579
+
1580
+ _this.initialized = true;
1581
+
1582
+ _this.trigger({
1583
+ type: 'omnitone-ready'
1584
+ });
1585
+ }, function (error) {
1586
+ videojs.log.warn("videojs-vr: Omnitone initializes failed with the following error: " + error + ")");
1587
+ });
1588
+
1589
+ return _this;
1590
+ }
1591
+ /**
1592
+ * Updates the rotation of the Omnitone decoder based on three.js camera matrix.
1593
+ *
1594
+ * @param {Camera} camera Three.js camera object
1595
+ */
1596
+
1597
+
1598
+ var _proto = OmnitoneController.prototype;
1599
+
1600
+ _proto.update = function update(camera) {
1601
+ if (!this.initialized) {
1602
+ return;
1603
+ }
1604
+
1605
+ this.foaRenderer.setRotationMatrixFromCamera(camera.matrix);
1606
+ }
1607
+ /**
1608
+ * Destroys the controller and does any necessary cleanup.
1609
+ */
1610
+ ;
1611
+
1612
+ _proto.dispose = function dispose() {
1613
+ this.initialized = false;
1614
+ this.foaRenderer.setRenderingMode('bypass');
1615
+ this.foaRenderer = null;
1616
+ };
1617
+
1618
+ return OmnitoneController;
1619
+ }(videojs.EventTarget);
1620
+
1621
+ var Button = videojs.getComponent('Button');
1622
+
1623
+ var CardboardButton = /*#__PURE__*/function (_Button) {
1624
+ _inheritsLoose(CardboardButton, _Button);
1625
+
1626
+ function CardboardButton(player, options) {
1627
+ var _this;
1628
+
1629
+ _this = _Button.call(this, player, options) || this;
1630
+ _this.handleVrDisplayActivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayActivate_);
1631
+ _this.handleVrDisplayDeactivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayDeactivate_);
1632
+ _this.handleVrDisplayPresentChange_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayPresentChange_);
1633
+ _this.handleOrientationChange_ = videojs.bind(_assertThisInitialized(_this), _this.handleOrientationChange_);
1634
+ window$1.addEventListener('orientationchange', _this.handleOrientationChange_);
1635
+ window$1.addEventListener('vrdisplayactivate', _this.handleVrDisplayActivate_);
1636
+ window$1.addEventListener('vrdisplaydeactivate', _this.handleVrDisplayDeactivate_); // vrdisplaypresentchange does not fire activate or deactivate
1637
+ // and happens when hitting the back button during cardboard mode
1638
+ // so we need to make sure we stay in the correct state by
1639
+ // listening to it and checking if we are presenting it or not
1640
+
1641
+ window$1.addEventListener('vrdisplaypresentchange', _this.handleVrDisplayPresentChange_); // we cannot show the cardboard button in fullscreen on
1642
+ // android as it breaks the controls, and makes it impossible
1643
+ // to exit cardboard mode
1644
+
1645
+ if (videojs.browser.IS_ANDROID) {
1646
+ _this.on(player, 'fullscreenchange', function () {
1647
+ if (player.isFullscreen()) {
1648
+ _this.hide();
1649
+ } else {
1650
+ _this.show();
1651
+ }
1652
+ });
1653
+ }
1654
+
1655
+ return _this;
1656
+ }
1657
+
1658
+ var _proto = CardboardButton.prototype;
1659
+
1660
+ _proto.buildCSSClass = function buildCSSClass() {
1661
+ return "vjs-button-vr " + _Button.prototype.buildCSSClass.call(this);
1662
+ };
1663
+
1664
+ _proto.handleVrDisplayPresentChange_ = function handleVrDisplayPresentChange_() {
1665
+ if (!this.player_.vr().vrDisplay.isPresenting && this.active_) {
1666
+ this.handleVrDisplayDeactivate_();
1667
+ }
1668
+
1669
+ if (this.player_.vr().vrDisplay.isPresenting && !this.active_) {
1670
+ this.handleVrDisplayActivate_();
1671
+ }
1672
+ };
1673
+
1674
+ _proto.handleOrientationChange_ = function handleOrientationChange_() {
1675
+ if (this.active_ && videojs.browser.IS_IOS) {
1676
+ this.changeSize_();
1677
+ }
1678
+ };
1679
+
1680
+ _proto.changeSize_ = function changeSize_() {
1681
+ this.player_.width(window$1.innerWidth);
1682
+ this.player_.height(window$1.innerHeight);
1683
+ window$1.dispatchEvent(new window$1.Event('resize'));
1684
+ };
1685
+
1686
+ _proto.handleVrDisplayActivate_ = function handleVrDisplayActivate_() {
1687
+ // we mimic fullscreen on IOS
1688
+ if (videojs.browser.IS_IOS) {
1689
+ this.oldWidth_ = this.player_.currentWidth();
1690
+ this.oldHeight_ = this.player_.currentHeight();
1691
+ this.player_.enterFullWindow();
1692
+ this.changeSize_();
1693
+ }
1694
+
1695
+ this.active_ = true;
1696
+ };
1697
+
1698
+ _proto.handleVrDisplayDeactivate_ = function handleVrDisplayDeactivate_() {
1699
+ // un-mimic fullscreen on iOS
1700
+ if (videojs.browser.IS_IOS) {
1701
+ if (this.oldWidth_) {
1702
+ this.player_.width(this.oldWidth_);
1703
+ }
1704
+
1705
+ if (this.oldHeight_) {
1706
+ this.player_.height(this.oldHeight_);
1707
+ }
1708
+
1709
+ this.player_.exitFullWindow();
1710
+ }
1711
+
1712
+ this.active_ = false;
1713
+ };
1714
+
1715
+ _proto.handleClick = function handleClick(event) {
1716
+ // if cardboard mode display is not active, activate it
1717
+ // otherwise deactivate it
1718
+ if (!this.active_) {
1719
+ // This starts playback mode when the cardboard button
1720
+ // is clicked on Android. We need to do this as the controls
1721
+ // disappear
1722
+ if (!this.player_.hasStarted() && videojs.browser.IS_ANDROID) {
1723
+ this.player_.play();
1724
+ }
1725
+
1726
+ window$1.dispatchEvent(new window$1.Event('vrdisplayactivate'));
1727
+ } else {
1728
+ window$1.dispatchEvent(new window$1.Event('vrdisplaydeactivate'));
1729
+ }
1730
+ };
1731
+
1732
+ _proto.dispose = function dispose() {
1733
+ _Button.prototype.dispose.call(this);
1734
+
1735
+ window$1.removeEventListener('vrdisplayactivate', this.handleVrDisplayActivate_);
1736
+ window$1.removeEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_);
1737
+ window$1.removeEventListener('vrdisplaypresentchange', this.handleVrDisplayPresentChange_);
1738
+ };
1739
+
1740
+ return CardboardButton;
1741
+ }(Button);
1742
+
1743
+ videojs.registerComponent('CardboardButton', CardboardButton);
1744
+
1745
+ var BigPlayButton = videojs.getComponent('BigPlayButton');
1746
+
1747
+ var BigVrPlayButton = /*#__PURE__*/function (_BigPlayButton) {
1748
+ _inheritsLoose(BigVrPlayButton, _BigPlayButton);
1749
+
1750
+ function BigVrPlayButton() {
1751
+ return _BigPlayButton.apply(this, arguments) || this;
1752
+ }
1753
+
1754
+ var _proto = BigVrPlayButton.prototype;
1755
+
1756
+ _proto.buildCSSClass = function buildCSSClass() {
1757
+ return "vjs-big-vr-play-button " + _BigPlayButton.prototype.buildCSSClass.call(this);
1758
+ };
1759
+
1760
+ return BigVrPlayButton;
1761
+ }(BigPlayButton);
1762
+
1763
+ videojs.registerComponent('BigVrPlayButton', BigVrPlayButton);
1764
+
1765
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1766
+
1767
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1768
+
1769
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1770
+
1771
+ var defaults = {
1772
+ debug: false,
1773
+ omnitone: false,
1774
+ forceCardboard: false,
1775
+ omnitoneOptions: {},
1776
+ projection: 'AUTO',
1777
+ sphereDetail: 32,
1778
+ disableTogglePlay: false
1779
+ };
1780
+ var errors = {
1781
+ 'web-vr-out-of-date': {
1782
+ headline: '360 is out of date',
1783
+ type: '360_OUT_OF_DATE',
1784
+ message: "Your browser supports 360 but not the latest version. See <a href='http://webvr.info'>http://webvr.info</a> for more info."
1785
+ },
1786
+ 'web-vr-not-supported': {
1787
+ headline: '360 not supported on this device',
1788
+ type: '360_NOT_SUPPORTED',
1789
+ message: "Your browser does not support 360. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."
1790
+ },
1791
+ 'web-vr-hls-cors-not-supported': {
1792
+ headline: '360 HLS video not supported on this device',
1793
+ type: '360_NOT_SUPPORTED',
1794
+ message: "Your browser/device does not support HLS 360 video. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."
1795
+ }
1796
+ };
1797
+ var Plugin = videojs.getPlugin('plugin');
1798
+ var Component = videojs.getComponent('Component');
1799
+
1800
+ var VR = /*#__PURE__*/function (_Plugin) {
1801
+ _inheritsLoose(VR, _Plugin);
1802
+
1803
+ function VR(player, options) {
1804
+ var _this;
1805
+
1806
+ var settings = videojs.mergeOptions(defaults, options);
1807
+ _this = _Plugin.call(this, player, settings) || this;
1808
+ _this.options_ = settings;
1809
+ _this.player_ = player;
1810
+ _this.bigPlayButtonIndex_ = player.children().indexOf(player.getChild('BigPlayButton')) || 0; // custom videojs-errors integration boolean
1811
+
1812
+ _this.videojsErrorsSupport_ = !!videojs.errors;
1813
+
1814
+ if (_this.videojsErrorsSupport_) {
1815
+ player.errors({
1816
+ errors: errors
1817
+ });
1818
+ } // IE 11 does not support enough webgl to be supported
1819
+ // older safari does not support cors, so it wont work
1820
+
1821
+
1822
+ if (videojs.browser.IE_VERSION || !corsSupport) {
1823
+ // if a player triggers error before 'loadstart' is fired
1824
+ // video.js will reset the error overlay
1825
+ _this.player_.on('loadstart', function () {
1826
+ _this.triggerError_({
1827
+ code: 'web-vr-not-supported',
1828
+ dismiss: false
1829
+ });
1830
+ });
1831
+
1832
+ return _assertThisInitialized(_this);
1833
+ }
1834
+
1835
+ _this.polyfill_ = new WebVRPolyfill({
1836
+ // do not show rotate instructions
1837
+ ROTATE_INSTRUCTIONS_DISABLED: true
1838
+ });
1839
+ _this.polyfill_ = new WebVRPolyfill();
1840
+ _this.handleVrDisplayActivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayActivate_);
1841
+ _this.handleVrDisplayDeactivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayDeactivate_);
1842
+ _this.handleResize_ = videojs.bind(_assertThisInitialized(_this), _this.handleResize_);
1843
+ _this.animate_ = videojs.bind(_assertThisInitialized(_this), _this.animate_);
1844
+
1845
+ _this.setProjection(_this.options_.projection); // any time the video element is recycled for ads
1846
+ // we have to reset the vr state and re-init after ad
1847
+
1848
+
1849
+ _this.on(player, 'adstart', function () {
1850
+ return player.setTimeout(function () {
1851
+ // if the video element was recycled for this ad
1852
+ if (!player.ads || !player.ads.videoElementRecycled()) {
1853
+ _this.log('video element not recycled for this ad, no need to reset');
1854
+
1855
+ return;
1856
+ }
1857
+
1858
+ _this.log('video element recycled for this ad, reseting');
1859
+
1860
+ _this.reset();
1861
+
1862
+ _this.one(player, 'playing', _this.init);
1863
+ });
1864
+ }, 1);
1865
+
1866
+ _this.on(player, 'loadedmetadata', _this.init);
1867
+
1868
+ return _this;
1869
+ }
1870
+
1871
+ var _proto = VR.prototype;
1872
+
1873
+ _proto.changeProjection_ = function changeProjection_(projection) {
1874
+ var _this2 = this;
1875
+
1876
+ projection = getInternalProjectionName(projection); // don't change to an invalid projection
1877
+
1878
+ if (!projection) {
1879
+ projection = 'NONE';
1880
+ }
1881
+
1882
+ var position = {
1883
+ x: 0,
1884
+ y: 0,
1885
+ z: 0
1886
+ };
1887
+
1888
+ if (this.scene) {
1889
+ this.scene.remove(this.movieScreen);
1890
+ }
1891
+
1892
+ if (projection === 'AUTO') {
1893
+ // mediainfo cannot be set to auto or we would infinite loop here
1894
+ // each source should know whatever they are 360 or not, if using AUTO
1895
+ if (this.player_.mediainfo && this.player_.mediainfo.projection && this.player_.mediainfo.projection !== 'AUTO') {
1896
+ var autoProjection = getInternalProjectionName(this.player_.mediainfo.projection);
1897
+ return this.changeProjection_(autoProjection);
1898
+ }
1899
+
1900
+ return this.changeProjection_('NONE');
1901
+ } else if (projection === '360') {
1902
+ this.movieGeometry = new THREE.SphereBufferGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1903
+ this.movieMaterial = new THREE.MeshBasicMaterial({
1904
+ map: this.videoTexture,
1905
+ overdraw: true,
1906
+ side: THREE.BackSide
1907
+ });
1908
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial);
1909
+ this.movieScreen.position.set(position.x, position.y, position.z);
1910
+ this.movieScreen.scale.x = -1;
1911
+ this.movieScreen.quaternion.setFromAxisAngle({
1912
+ x: 0,
1913
+ y: 1,
1914
+ z: 0
1915
+ }, -Math.PI / 2);
1916
+ this.scene.add(this.movieScreen);
1917
+ } else if (projection === '360_LR' || projection === '360_TB') {
1918
+ // Left eye view
1919
+ var geometry = new THREE.SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1920
+ var uvs = geometry.faceVertexUvs[0];
1921
+
1922
+ for (var i = 0; i < uvs.length; i++) {
1923
+ for (var j = 0; j < 3; j++) {
1924
+ if (projection === '360_LR') {
1925
+ uvs[i][j].x *= 0.5;
1926
+ } else {
1927
+ uvs[i][j].y *= 0.5;
1928
+ uvs[i][j].y += 0.5;
1929
+ }
1930
+ }
1931
+ }
1932
+
1933
+ this.movieGeometry = new THREE.BufferGeometry().fromGeometry(geometry);
1934
+ this.movieMaterial = new THREE.MeshBasicMaterial({
1935
+ map: this.videoTexture,
1936
+ overdraw: true,
1937
+ side: THREE.BackSide
1938
+ });
1939
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial);
1940
+ this.movieScreen.scale.x = -1;
1941
+ this.movieScreen.quaternion.setFromAxisAngle({
1942
+ x: 0,
1943
+ y: 1,
1944
+ z: 0
1945
+ }, -Math.PI / 2); // display in left eye only
1946
+
1947
+ this.movieScreen.layers.set(1);
1948
+ this.scene.add(this.movieScreen); // Right eye view
1949
+
1950
+ geometry = new THREE.SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1951
+ uvs = geometry.faceVertexUvs[0];
1952
+
1953
+ for (var _i = 0; _i < uvs.length; _i++) {
1954
+ for (var _j = 0; _j < 3; _j++) {
1955
+ if (projection === '360_LR') {
1956
+ uvs[_i][_j].x *= 0.5;
1957
+ uvs[_i][_j].x += 0.5;
1958
+ } else {
1959
+ uvs[_i][_j].y *= 0.5;
1960
+ }
1961
+ }
1962
+ }
1963
+
1964
+ this.movieGeometry = new THREE.BufferGeometry().fromGeometry(geometry);
1965
+ this.movieMaterial = new THREE.MeshBasicMaterial({
1966
+ map: this.videoTexture,
1967
+ overdraw: true,
1968
+ side: THREE.BackSide
1969
+ });
1970
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial);
1971
+ this.movieScreen.scale.x = -1;
1972
+ this.movieScreen.quaternion.setFromAxisAngle({
1973
+ x: 0,
1974
+ y: 1,
1975
+ z: 0
1976
+ }, -Math.PI / 2); // display in right eye only
1977
+
1978
+ this.movieScreen.layers.set(2);
1979
+ this.scene.add(this.movieScreen);
1980
+ } else if (projection === '360_CUBE') {
1981
+ this.movieGeometry = new THREE.BoxGeometry(256, 256, 256);
1982
+ this.movieMaterial = new THREE.MeshBasicMaterial({
1983
+ map: this.videoTexture,
1984
+ overdraw: true,
1985
+ side: THREE.BackSide
1986
+ });
1987
+ var left = [new THREE.Vector2(0, 0.5), new THREE.Vector2(0.333, 0.5), new THREE.Vector2(0.333, 1), new THREE.Vector2(0, 1)];
1988
+ var right = [new THREE.Vector2(0.333, 0.5), new THREE.Vector2(0.666, 0.5), new THREE.Vector2(0.666, 1), new THREE.Vector2(0.333, 1)];
1989
+ var top = [new THREE.Vector2(0.666, 0.5), new THREE.Vector2(1, 0.5), new THREE.Vector2(1, 1), new THREE.Vector2(0.666, 1)];
1990
+ var bottom = [new THREE.Vector2(0, 0), new THREE.Vector2(0.333, 0), new THREE.Vector2(0.333, 0.5), new THREE.Vector2(0, 0.5)];
1991
+ var front = [new THREE.Vector2(0.333, 0), new THREE.Vector2(0.666, 0), new THREE.Vector2(0.666, 0.5), new THREE.Vector2(0.333, 0.5)];
1992
+ var back = [new THREE.Vector2(0.666, 0), new THREE.Vector2(1, 0), new THREE.Vector2(1, 0.5), new THREE.Vector2(0.666, 0.5)];
1993
+ this.movieGeometry.faceVertexUvs[0] = [];
1994
+ this.movieGeometry.faceVertexUvs[0][0] = [right[2], right[1], right[3]];
1995
+ this.movieGeometry.faceVertexUvs[0][1] = [right[1], right[0], right[3]];
1996
+ this.movieGeometry.faceVertexUvs[0][2] = [left[2], left[1], left[3]];
1997
+ this.movieGeometry.faceVertexUvs[0][3] = [left[1], left[0], left[3]];
1998
+ this.movieGeometry.faceVertexUvs[0][4] = [top[2], top[1], top[3]];
1999
+ this.movieGeometry.faceVertexUvs[0][5] = [top[1], top[0], top[3]];
2000
+ this.movieGeometry.faceVertexUvs[0][6] = [bottom[2], bottom[1], bottom[3]];
2001
+ this.movieGeometry.faceVertexUvs[0][7] = [bottom[1], bottom[0], bottom[3]];
2002
+ this.movieGeometry.faceVertexUvs[0][8] = [front[2], front[1], front[3]];
2003
+ this.movieGeometry.faceVertexUvs[0][9] = [front[1], front[0], front[3]];
2004
+ this.movieGeometry.faceVertexUvs[0][10] = [back[2], back[1], back[3]];
2005
+ this.movieGeometry.faceVertexUvs[0][11] = [back[1], back[0], back[3]];
2006
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial);
2007
+ this.movieScreen.position.set(position.x, position.y, position.z);
2008
+ this.movieScreen.rotation.y = -Math.PI;
2009
+ this.scene.add(this.movieScreen);
2010
+ } else if (projection === '180' || projection === '180_LR' || projection === '180_MONO') {
2011
+ var _geometry = new THREE.SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail, Math.PI, Math.PI); // Left eye view
2012
+
2013
+
2014
+ _geometry.scale(-1, 1, 1);
2015
+
2016
+ var _uvs = _geometry.faceVertexUvs[0];
2017
+
2018
+ if (projection !== '180_MONO') {
2019
+ for (var _i2 = 0; _i2 < _uvs.length; _i2++) {
2020
+ for (var _j2 = 0; _j2 < 3; _j2++) {
2021
+ _uvs[_i2][_j2].x *= 0.5;
2022
+ }
2023
+ }
2024
+ }
2025
+
2026
+ this.movieGeometry = new THREE.BufferGeometry().fromGeometry(_geometry);
2027
+ this.movieMaterial = new THREE.MeshBasicMaterial({
2028
+ map: this.videoTexture,
2029
+ overdraw: true
2030
+ });
2031
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial); // display in left eye only
2032
+
2033
+ this.movieScreen.layers.set(1);
2034
+ this.scene.add(this.movieScreen); // Right eye view
2035
+
2036
+ _geometry = new THREE.SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail, Math.PI, Math.PI);
2037
+
2038
+ _geometry.scale(-1, 1, 1);
2039
+
2040
+ _uvs = _geometry.faceVertexUvs[0];
2041
+
2042
+ for (var _i3 = 0; _i3 < _uvs.length; _i3++) {
2043
+ for (var _j3 = 0; _j3 < 3; _j3++) {
2044
+ _uvs[_i3][_j3].x *= 0.5;
2045
+ _uvs[_i3][_j3].x += 0.5;
2046
+ }
2047
+ }
2048
+
2049
+ this.movieGeometry = new THREE.BufferGeometry().fromGeometry(_geometry);
2050
+ this.movieMaterial = new THREE.MeshBasicMaterial({
2051
+ map: this.videoTexture,
2052
+ overdraw: true
2053
+ });
2054
+ this.movieScreen = new THREE.Mesh(this.movieGeometry, this.movieMaterial); // display in right eye only
2055
+
2056
+ this.movieScreen.layers.set(2);
2057
+ this.scene.add(this.movieScreen);
2058
+ } else if (projection === 'EAC' || projection === 'EAC_LR') {
2059
+ var makeScreen = function makeScreen(mapMatrix, scaleMatrix) {
2060
+ // "Continuity correction?": because of discontinuous faces and aliasing,
2061
+ // we truncate the 2-pixel-wide strips on all discontinuous edges,
2062
+ var contCorrect = 2;
2063
+ _this2.movieGeometry = new THREE.BoxGeometry(256, 256, 256);
2064
+ _this2.movieMaterial = new THREE.ShaderMaterial({
2065
+ overdraw: true,
2066
+ side: THREE.BackSide,
2067
+ uniforms: {
2068
+ mapped: {
2069
+ value: _this2.videoTexture
2070
+ },
2071
+ mapMatrix: {
2072
+ value: mapMatrix
2073
+ },
2074
+ contCorrect: {
2075
+ value: contCorrect
2076
+ },
2077
+ faceWH: {
2078
+ value: new THREE.Vector2(1 / 3, 1 / 2).applyMatrix3(scaleMatrix)
2079
+ },
2080
+ vidWH: {
2081
+ value: new THREE.Vector2(_this2.videoTexture.image.videoWidth, _this2.videoTexture.image.videoHeight).applyMatrix3(scaleMatrix)
2082
+ }
2083
+ },
2084
+ vertexShader: "\nvarying vec2 vUv;\nuniform mat3 mapMatrix;\n\nvoid main() {\n vUv = (mapMatrix * vec3(uv, 1.)).xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.);\n}",
2085
+ fragmentShader: "\nvarying vec2 vUv;\nuniform sampler2D mapped;\nuniform vec2 faceWH;\nuniform vec2 vidWH;\nuniform float contCorrect;\n\nconst float PI = 3.1415926535897932384626433832795;\n\nvoid main() {\n vec2 corner = vUv - mod(vUv, faceWH) + vec2(0, contCorrect / vidWH.y);\n\n vec2 faceWHadj = faceWH - vec2(0, contCorrect * 2. / vidWH.y);\n\n vec2 p = (vUv - corner) / faceWHadj - .5;\n vec2 q = 2. / PI * atan(2. * p) + .5;\n\n vec2 eUv = corner + q * faceWHadj;\n\n gl_FragColor = texture2D(mapped, eUv);\n}"
2086
+ });
2087
+ var right = [new THREE.Vector2(0, 1 / 2), new THREE.Vector2(1 / 3, 1 / 2), new THREE.Vector2(1 / 3, 1), new THREE.Vector2(0, 1)];
2088
+ var front = [new THREE.Vector2(1 / 3, 1 / 2), new THREE.Vector2(2 / 3, 1 / 2), new THREE.Vector2(2 / 3, 1), new THREE.Vector2(1 / 3, 1)];
2089
+ var left = [new THREE.Vector2(2 / 3, 1 / 2), new THREE.Vector2(1, 1 / 2), new THREE.Vector2(1, 1), new THREE.Vector2(2 / 3, 1)];
2090
+ var bottom = [new THREE.Vector2(1 / 3, 0), new THREE.Vector2(1 / 3, 1 / 2), new THREE.Vector2(0, 1 / 2), new THREE.Vector2(0, 0)];
2091
+ var back = [new THREE.Vector2(1 / 3, 1 / 2), new THREE.Vector2(1 / 3, 0), new THREE.Vector2(2 / 3, 0), new THREE.Vector2(2 / 3, 1 / 2)];
2092
+ var top = [new THREE.Vector2(1, 0), new THREE.Vector2(1, 1 / 2), new THREE.Vector2(2 / 3, 1 / 2), new THREE.Vector2(2 / 3, 0)];
2093
+
2094
+ for (var _i4 = 0, _arr = [right, front, left, bottom, back, top]; _i4 < _arr.length; _i4++) {
2095
+ var face = _arr[_i4];
2096
+ var height = _this2.videoTexture.image.videoHeight;
2097
+ var lowY = 1;
2098
+ var highY = 0;
2099
+
2100
+ for (var _iterator = _createForOfIteratorHelperLoose(face), _step; !(_step = _iterator()).done;) {
2101
+ var vector = _step.value;
2102
+
2103
+ if (vector.y < lowY) {
2104
+ lowY = vector.y;
2105
+ }
2106
+
2107
+ if (vector.y > highY) {
2108
+ highY = vector.y;
2109
+ }
2110
+ }
2111
+
2112
+ for (var _iterator2 = _createForOfIteratorHelperLoose(face), _step2; !(_step2 = _iterator2()).done;) {
2113
+ var _vector = _step2.value;
2114
+
2115
+ if (Math.abs(_vector.y - lowY) < Number.EPSILON) {
2116
+ _vector.y += contCorrect / height;
2117
+ }
2118
+
2119
+ if (Math.abs(_vector.y - highY) < Number.EPSILON) {
2120
+ _vector.y -= contCorrect / height;
2121
+ }
2122
+
2123
+ _vector.x = _vector.x / height * (height - contCorrect * 2) + contCorrect / height;
2124
+ }
2125
+ }
2126
+
2127
+ _this2.movieGeometry.faceVertexUvs[0] = [];
2128
+ _this2.movieGeometry.faceVertexUvs[0][0] = [right[2], right[1], right[3]];
2129
+ _this2.movieGeometry.faceVertexUvs[0][1] = [right[1], right[0], right[3]];
2130
+ _this2.movieGeometry.faceVertexUvs[0][2] = [left[2], left[1], left[3]];
2131
+ _this2.movieGeometry.faceVertexUvs[0][3] = [left[1], left[0], left[3]];
2132
+ _this2.movieGeometry.faceVertexUvs[0][4] = [top[2], top[1], top[3]];
2133
+ _this2.movieGeometry.faceVertexUvs[0][5] = [top[1], top[0], top[3]];
2134
+ _this2.movieGeometry.faceVertexUvs[0][6] = [bottom[2], bottom[1], bottom[3]];
2135
+ _this2.movieGeometry.faceVertexUvs[0][7] = [bottom[1], bottom[0], bottom[3]];
2136
+ _this2.movieGeometry.faceVertexUvs[0][8] = [front[2], front[1], front[3]];
2137
+ _this2.movieGeometry.faceVertexUvs[0][9] = [front[1], front[0], front[3]];
2138
+ _this2.movieGeometry.faceVertexUvs[0][10] = [back[2], back[1], back[3]];
2139
+ _this2.movieGeometry.faceVertexUvs[0][11] = [back[1], back[0], back[3]];
2140
+ _this2.movieScreen = new THREE.Mesh(_this2.movieGeometry, _this2.movieMaterial);
2141
+
2142
+ _this2.movieScreen.position.set(position.x, position.y, position.z);
2143
+
2144
+ _this2.movieScreen.rotation.y = -Math.PI;
2145
+ return _this2.movieScreen;
2146
+ };
2147
+
2148
+ if (projection === 'EAC') {
2149
+ this.scene.add(makeScreen(new THREE.Matrix3(), new THREE.Matrix3()));
2150
+ } else {
2151
+ var scaleMatrix = new THREE.Matrix3().set(0, 0.5, 0, 1, 0, 0, 0, 0, 1);
2152
+ makeScreen(new THREE.Matrix3().set(0, -0.5, 0.5, 1, 0, 0, 0, 0, 1), scaleMatrix); // display in left eye only
2153
+
2154
+ this.movieScreen.layers.set(1);
2155
+ this.scene.add(this.movieScreen);
2156
+ makeScreen(new THREE.Matrix3().set(0, -0.5, 1, 1, 0, 0, 0, 0, 1), scaleMatrix); // display in right eye only
2157
+
2158
+ this.movieScreen.layers.set(2);
2159
+ this.scene.add(this.movieScreen);
2160
+ }
2161
+ }
2162
+
2163
+ this.currentProjection_ = projection;
2164
+ };
2165
+
2166
+ _proto.triggerError_ = function triggerError_(errorObj) {
2167
+ // if we have videojs-errors use it
2168
+ if (this.videojsErrorsSupport_) {
2169
+ this.player_.error(errorObj); // if we don't have videojs-errors just use a normal player error
2170
+ } else {
2171
+ // strip any html content from the error message
2172
+ // as it is not supported outside of videojs-errors
2173
+ var div = document$1.createElement('div');
2174
+ div.innerHTML = errors[errorObj.code].message;
2175
+ var message = div.textContent || div.innerText || '';
2176
+ this.player_.error({
2177
+ code: errorObj.code,
2178
+ message: message
2179
+ });
2180
+ }
2181
+ };
2182
+
2183
+ _proto.log = function log() {
2184
+ if (!this.options_.debug) {
2185
+ return;
2186
+ }
2187
+
2188
+ for (var _len = arguments.length, msgs = new Array(_len), _key = 0; _key < _len; _key++) {
2189
+ msgs[_key] = arguments[_key];
2190
+ }
2191
+
2192
+ msgs.forEach(function (msg) {
2193
+ videojs.log('VR: ', msg);
2194
+ });
2195
+ };
2196
+
2197
+ _proto.handleVrDisplayActivate_ = function handleVrDisplayActivate_() {
2198
+ var _this3 = this;
2199
+
2200
+ if (!this.vrDisplay) {
2201
+ return;
2202
+ }
2203
+
2204
+ this.vrDisplay.requestPresent([{
2205
+ source: this.renderedCanvas
2206
+ }]).then(function () {
2207
+ if (!_this3.vrDisplay.cardboardUI_ || !videojs.browser.IS_IOS) {
2208
+ return;
2209
+ } // webvr-polyfill/cardboard ui only watches for click events
2210
+ // to tell that the back arrow button is pressed during cardboard vr.
2211
+ // but somewhere along the line these events are silenced with preventDefault
2212
+ // but only on iOS, so we translate them ourselves here
2213
+
2214
+
2215
+ var touches = [];
2216
+
2217
+ var iosCardboardTouchStart_ = function iosCardboardTouchStart_(e) {
2218
+ for (var i = 0; i < e.touches.length; i++) {
2219
+ touches.push(e.touches[i]);
2220
+ }
2221
+ };
2222
+
2223
+ var iosCardboardTouchEnd_ = function iosCardboardTouchEnd_(e) {
2224
+ if (!touches.length) {
2225
+ return;
2226
+ }
2227
+
2228
+ touches.forEach(function (t) {
2229
+ var simulatedClick = new window$1.MouseEvent('click', {
2230
+ screenX: t.screenX,
2231
+ screenY: t.screenY,
2232
+ clientX: t.clientX,
2233
+ clientY: t.clientY
2234
+ });
2235
+
2236
+ _this3.renderedCanvas.dispatchEvent(simulatedClick);
2237
+ });
2238
+ touches = [];
2239
+ };
2240
+
2241
+ _this3.renderedCanvas.addEventListener('touchstart', iosCardboardTouchStart_);
2242
+
2243
+ _this3.renderedCanvas.addEventListener('touchend', iosCardboardTouchEnd_);
2244
+
2245
+ _this3.iosRevertTouchToClick_ = function () {
2246
+ _this3.renderedCanvas.removeEventListener('touchstart', iosCardboardTouchStart_);
2247
+
2248
+ _this3.renderedCanvas.removeEventListener('touchend', iosCardboardTouchEnd_);
2249
+
2250
+ _this3.iosRevertTouchToClick_ = null;
2251
+ };
2252
+ });
2253
+ };
2254
+
2255
+ _proto.handleVrDisplayDeactivate_ = function handleVrDisplayDeactivate_() {
2256
+ if (!this.vrDisplay || !this.vrDisplay.isPresenting) {
2257
+ return;
2258
+ }
2259
+
2260
+ if (this.iosRevertTouchToClick_) {
2261
+ this.iosRevertTouchToClick_();
2262
+ }
2263
+
2264
+ this.vrDisplay.exitPresent();
2265
+ };
2266
+
2267
+ _proto.requestAnimationFrame = function requestAnimationFrame(fn) {
2268
+ if (this.vrDisplay) {
2269
+ return this.vrDisplay.requestAnimationFrame(fn);
2270
+ }
2271
+
2272
+ return this.player_.requestAnimationFrame(fn);
2273
+ };
2274
+
2275
+ _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {
2276
+ if (this.vrDisplay) {
2277
+ return this.vrDisplay.cancelAnimationFrame(id);
2278
+ }
2279
+
2280
+ return this.player_.cancelAnimationFrame(id);
2281
+ };
2282
+
2283
+ _proto.togglePlay_ = function togglePlay_() {
2284
+ if (this.player_.paused()) {
2285
+ this.player_.play();
2286
+ } else {
2287
+ this.player_.pause();
2288
+ }
2289
+ };
2290
+
2291
+ _proto.animate_ = function animate_() {
2292
+ if (!this.initialized_) {
2293
+ return;
2294
+ }
2295
+
2296
+ if (this.getVideoEl_().readyState === this.getVideoEl_().HAVE_ENOUGH_DATA) {
2297
+ if (this.videoTexture) {
2298
+ this.videoTexture.needsUpdate = true;
2299
+ }
2300
+ }
2301
+
2302
+ this.controls3d.update();
2303
+
2304
+ if (this.omniController) {
2305
+ this.omniController.update(this.camera);
2306
+ }
2307
+
2308
+ this.effect.render(this.scene, this.camera);
2309
+
2310
+ if (window$1.navigator.getGamepads) {
2311
+ // Grab all gamepads
2312
+ var gamepads = window$1.navigator.getGamepads();
2313
+
2314
+ for (var i = 0; i < gamepads.length; ++i) {
2315
+ var gamepad = gamepads[i]; // Make sure gamepad is defined
2316
+ // Only take input if state has changed since we checked last
2317
+
2318
+ if (!gamepad || !gamepad.timestamp || gamepad.timestamp === this.prevTimestamps_[i]) {
2319
+ continue;
2320
+ }
2321
+
2322
+ for (var j = 0; j < gamepad.buttons.length; ++j) {
2323
+ if (gamepad.buttons[j].pressed) {
2324
+ this.togglePlay_();
2325
+ this.prevTimestamps_[i] = gamepad.timestamp;
2326
+ break;
2327
+ }
2328
+ }
2329
+ }
2330
+ }
2331
+
2332
+ this.camera.getWorldDirection(this.cameraVector);
2333
+ this.animationFrameId_ = this.requestAnimationFrame(this.animate_);
2334
+ };
2335
+
2336
+ _proto.handleResize_ = function handleResize_() {
2337
+ var width = this.player_.currentWidth();
2338
+ var height = this.player_.currentHeight();
2339
+ this.effect.setSize(width, height, false);
2340
+ this.camera.aspect = width / height;
2341
+ this.camera.updateProjectionMatrix();
2342
+ };
2343
+
2344
+ _proto.setProjection = function setProjection(projection) {
2345
+ if (!getInternalProjectionName(projection)) {
2346
+ videojs.log.error('videojs-vr: please pass a valid projection ' + validProjections.join(', '));
2347
+ return;
2348
+ }
2349
+
2350
+ this.currentProjection_ = projection;
2351
+ this.defaultProjection_ = projection;
2352
+ };
2353
+
2354
+ _proto.init = function init() {
2355
+ var _this4 = this;
2356
+
2357
+ this.reset();
2358
+ this.camera = new THREE.PerspectiveCamera(75, this.player_.currentWidth() / this.player_.currentHeight(), 1, 1000); // Store vector representing the direction in which the camera is looking, in world space.
2359
+
2360
+ this.cameraVector = new THREE.Vector3();
2361
+
2362
+ if (this.currentProjection_ === '360_LR' || this.currentProjection_ === '360_TB' || this.currentProjection_ === '180' || this.currentProjection_ === '180_LR' || this.currentProjection_ === '180_MONO' || this.currentProjection_ === 'EAC_LR') {
2363
+ // Render left eye when not in VR mode
2364
+ this.camera.layers.enable(1);
2365
+ }
2366
+
2367
+ this.scene = new THREE.Scene();
2368
+ this.videoTexture = new THREE.VideoTexture(this.getVideoEl_()); // shared regardless of wether VideoTexture is used or
2369
+ // an image canvas is used
2370
+
2371
+ this.videoTexture.generateMipmaps = false;
2372
+ this.videoTexture.minFilter = THREE.LinearFilter;
2373
+ this.videoTexture.magFilter = THREE.LinearFilter;
2374
+ this.videoTexture.format = THREE.RGBFormat;
2375
+ this.changeProjection_(this.currentProjection_);
2376
+
2377
+ if (this.currentProjection_ === 'NONE') {
2378
+ this.log('Projection is NONE, dont init');
2379
+ this.reset();
2380
+ return;
2381
+ }
2382
+
2383
+ this.player_.removeChild('BigPlayButton');
2384
+ this.player_.addChild('BigVrPlayButton', {}, this.bigPlayButtonIndex_);
2385
+ this.player_.bigPlayButton = this.player_.getChild('BigVrPlayButton'); // mobile devices, or cardboard forced to on
2386
+
2387
+ if (this.options_.forceCardboard || videojs.browser.IS_ANDROID || videojs.browser.IS_IOS) {
2388
+ this.addCardboardButton_();
2389
+ } // if ios remove full screen toggle
2390
+
2391
+
2392
+ if (videojs.browser.IS_IOS && this.player_.controlBar && this.player_.controlBar.fullscreenToggle) {
2393
+ this.player_.controlBar.fullscreenToggle.hide();
2394
+ }
2395
+
2396
+ this.camera.position.set(0, 0, 0);
2397
+ this.renderer = new THREE.WebGLRenderer({
2398
+ devicePixelRatio: window$1.devicePixelRatio,
2399
+ alpha: false,
2400
+ clearColor: 0xffffff,
2401
+ antialias: true
2402
+ });
2403
+ var webglContext = this.renderer.getContext('webgl');
2404
+ var oldTexImage2D = webglContext.texImage2D;
2405
+ /* this is a workaround since threejs uses try catch */
2406
+
2407
+ webglContext.texImage2D = function () {
2408
+ try {
2409
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2410
+ args[_key2] = arguments[_key2];
2411
+ }
2412
+
2413
+ return oldTexImage2D.apply(webglContext, args);
2414
+ } catch (e) {
2415
+ _this4.reset();
2416
+
2417
+ _this4.player_.pause();
2418
+
2419
+ _this4.triggerError_({
2420
+ code: 'web-vr-hls-cors-not-supported',
2421
+ dismiss: false
2422
+ });
2423
+
2424
+ throw new Error(e);
2425
+ }
2426
+ };
2427
+
2428
+ this.renderer.setSize(this.player_.currentWidth(), this.player_.currentHeight(), false);
2429
+ this.effect = new VREffect(this.renderer);
2430
+ this.effect.setSize(this.player_.currentWidth(), this.player_.currentHeight(), false);
2431
+ this.vrDisplay = null; // Previous timestamps for gamepad updates
2432
+
2433
+ this.prevTimestamps_ = [];
2434
+ this.renderedCanvas = this.renderer.domElement;
2435
+ this.renderedCanvas.setAttribute('style', 'width: 100%; height: 100%; position: absolute; top:0;');
2436
+ var videoElStyle = this.getVideoEl_().style;
2437
+ this.player_.el().insertBefore(this.renderedCanvas, this.player_.el().firstChild);
2438
+ videoElStyle.zIndex = '-1';
2439
+ videoElStyle.opacity = '0';
2440
+
2441
+ if (window$1.navigator.getVRDisplays) {
2442
+ this.log('is supported, getting vr displays');
2443
+ window$1.navigator.getVRDisplays().then(function (displays) {
2444
+ if (displays.length > 0) {
2445
+ _this4.log('Displays found', displays);
2446
+
2447
+ _this4.vrDisplay = displays[0]; // Native WebVR Head Mounted Displays (HMDs) like the HTC Vive
2448
+ // also need the cardboard button to enter fully immersive mode
2449
+ // so, we want to add the button if we're not polyfilled.
2450
+
2451
+ if (!_this4.vrDisplay.isPolyfilled) {
2452
+ _this4.log('Real HMD found using VRControls', _this4.vrDisplay);
2453
+
2454
+ _this4.addCardboardButton_(); // We use VRControls here since we are working with an HMD
2455
+ // and we only want orientation controls.
2456
+
2457
+
2458
+ _this4.controls3d = new VRControls(_this4.camera);
2459
+ }
2460
+ }
2461
+
2462
+ if (!_this4.controls3d) {
2463
+ _this4.log('no HMD found Using Orbit & Orientation Controls');
2464
+
2465
+ var options = {
2466
+ camera: _this4.camera,
2467
+ canvas: _this4.renderedCanvas,
2468
+ // check if its a half sphere view projection
2469
+ halfView: _this4.currentProjection_.indexOf('180') === 0,
2470
+ orientation: videojs.browser.IS_IOS || videojs.browser.IS_ANDROID || false
2471
+ };
2472
+
2473
+ if (_this4.options_.motionControls === false) {
2474
+ options.orientation = false;
2475
+ }
2476
+
2477
+ _this4.controls3d = new OrbitOrientationControls(options);
2478
+ _this4.canvasPlayerControls = new CanvasPlayerControls(_this4.player_, _this4.renderedCanvas, _this4.options_);
2479
+ }
2480
+
2481
+ _this4.animationFrameId_ = _this4.requestAnimationFrame(_this4.animate_);
2482
+ });
2483
+ } else if (window$1.navigator.getVRDevices) {
2484
+ this.triggerError_({
2485
+ code: 'web-vr-out-of-date',
2486
+ dismiss: false
2487
+ });
2488
+ } else {
2489
+ this.triggerError_({
2490
+ code: 'web-vr-not-supported',
2491
+ dismiss: false
2492
+ });
2493
+ }
2494
+
2495
+ if (this.options_.omnitone) {
2496
+ var audiocontext = THREE.AudioContext.getContext();
2497
+ this.omniController = new OmnitoneController(audiocontext, this.options_.omnitone, this.getVideoEl_(), this.options_.omnitoneOptions);
2498
+ this.omniController.one('audiocontext-suspended', function () {
2499
+ _this4.player.pause();
2500
+
2501
+ _this4.player.one('playing', function () {
2502
+ audiocontext.resume();
2503
+ });
2504
+ });
2505
+ }
2506
+
2507
+ this.on(this.player_, 'fullscreenchange', this.handleResize_);
2508
+ window$1.addEventListener('vrdisplaypresentchange', this.handleResize_, true);
2509
+ window$1.addEventListener('resize', this.handleResize_, true);
2510
+ window$1.addEventListener('vrdisplayactivate', this.handleVrDisplayActivate_, true);
2511
+ window$1.addEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_, true);
2512
+ this.initialized_ = true;
2513
+ this.trigger('initialized');
2514
+ };
2515
+
2516
+ _proto.addCardboardButton_ = function addCardboardButton_() {
2517
+ if (!this.player_.controlBar.getChild('CardboardButton')) {
2518
+ this.player_.controlBar.addChild('CardboardButton', {});
2519
+ }
2520
+ };
2521
+
2522
+ _proto.getVideoEl_ = function getVideoEl_() {
2523
+ return this.player_.el().getElementsByTagName('video')[0];
2524
+ };
2525
+
2526
+ _proto.reset = function reset() {
2527
+ if (!this.initialized_) {
2528
+ return;
2529
+ }
2530
+
2531
+ if (this.omniController) {
2532
+ this.omniController.off('audiocontext-suspended');
2533
+ this.omniController.dispose();
2534
+ this.omniController = undefined;
2535
+ }
2536
+
2537
+ if (this.controls3d) {
2538
+ this.controls3d.dispose();
2539
+ this.controls3d = null;
2540
+ }
2541
+
2542
+ if (this.canvasPlayerControls) {
2543
+ this.canvasPlayerControls.dispose();
2544
+ this.canvasPlayerControls = null;
2545
+ }
2546
+
2547
+ if (this.effect) {
2548
+ this.effect.dispose();
2549
+ this.effect = null;
2550
+ }
2551
+
2552
+ window$1.removeEventListener('resize', this.handleResize_, true);
2553
+ window$1.removeEventListener('vrdisplaypresentchange', this.handleResize_, true);
2554
+ window$1.removeEventListener('vrdisplayactivate', this.handleVrDisplayActivate_, true);
2555
+ window$1.removeEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_, true); // re-add the big play button to player
2556
+
2557
+ if (!this.player_.getChild('BigPlayButton')) {
2558
+ this.player_.addChild('BigPlayButton', {}, this.bigPlayButtonIndex_);
2559
+ }
2560
+
2561
+ if (this.player_.getChild('BigVrPlayButton')) {
2562
+ this.player_.removeChild('BigVrPlayButton');
2563
+ } // remove the cardboard button
2564
+
2565
+
2566
+ if (this.player_.getChild('CardboardButton')) {
2567
+ this.player_.controlBar.removeChild('CardboardButton');
2568
+ } // show the fullscreen again
2569
+
2570
+
2571
+ if (videojs.browser.IS_IOS && this.player_.controlBar && this.player_.controlBar.fullscreenToggle) {
2572
+ this.player_.controlBar.fullscreenToggle.show();
2573
+ } // reset the video element style so that it will be displayed
2574
+
2575
+
2576
+ var videoElStyle = this.getVideoEl_().style;
2577
+ videoElStyle.zIndex = '';
2578
+ videoElStyle.opacity = ''; // set the current projection to the default
2579
+
2580
+ this.currentProjection_ = this.defaultProjection_; // reset the ios touch to click workaround
2581
+
2582
+ if (this.iosRevertTouchToClick_) {
2583
+ this.iosRevertTouchToClick_();
2584
+ } // remove the old canvas
2585
+
2586
+
2587
+ if (this.renderedCanvas) {
2588
+ this.renderedCanvas.parentNode.removeChild(this.renderedCanvas);
2589
+ }
2590
+
2591
+ if (this.animationFrameId_) {
2592
+ this.cancelAnimationFrame(this.animationFrameId_);
2593
+ }
2594
+
2595
+ this.initialized_ = false;
2596
+ };
2597
+
2598
+ _proto.dispose = function dispose() {
2599
+ _Plugin.prototype.dispose.call(this);
2600
+
2601
+ this.reset();
2602
+ };
2603
+
2604
+ _proto.polyfillVersion = function polyfillVersion() {
2605
+ return WebVRPolyfill.version;
2606
+ };
2607
+
2608
+ return VR;
2609
+ }(Plugin);
2610
+
2611
+ VR.prototype.setTimeout = Component.prototype.setTimeout;
2612
+ VR.prototype.clearTimeout = Component.prototype.clearTimeout;
2613
+ VR.VERSION = version;
2614
+ videojs.registerPlugin('vr', VR);
2615
+
2616
+ module.exports = VR;
public/lib/videojs-vr/videojs-vr.css ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .video-js .vjs-big-vr-play-button {
2
+ width: 100px;
3
+ height: 100px;
4
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'%3E%3Cpath fill='%23FFF' d='M334.883 275.78l-6.374-36.198-6.375-36.2-28.16 23.62-28.164 23.62 25.837 9.41C266.247 296.544 224 320.5 176.25 320.5c-77.47 0-140.5-63.03-140.5-140.5 0-77.472 63.03-140.5 140.5-140.5 53.428 0 99.98 29.978 123.733 73.993l13.304-6.923C287.025 57.76 235.45 24.5 176.25 24.5c-85.743 0-155.5 69.757-155.5 155.5 0 85.742 69.757 155.5 155.5 155.5 54.253 0 102.09-27.94 129.922-70.177l28.71 10.457z'/%3E%3Cpath fill='%23FFF' d='M314.492 175.167c-12.98 0-23.54-10.56-23.54-23.54s10.56-23.54 23.54-23.54c12.98 0 23.54 10.56 23.54 23.54s-10.56 23.54-23.54 23.54zm0-38.08c-8.018 0-14.54 6.522-14.54 14.54s6.522 14.54 14.54 14.54c8.017 0 14.54-6.522 14.54-14.54s-6.523-14.54-14.54-14.54z'/%3E%3Cg fill='%23FFF'%3E%3Cpath d='M88.76 173.102h9.395c4.74-.042 8.495-1.27 11.268-3.682 2.77-2.412 4.157-5.903 4.157-10.474 0-4.4-1.153-7.817-3.46-10.25-2.307-2.434-5.83-3.65-10.568-3.65-4.147 0-7.554 1.195-10.22 3.585-2.666 2.392-4 5.514-4 9.364H69.908c0-4.74 1.26-9.055 3.776-12.95 2.518-3.892 6.03-6.928 10.537-9.108 4.508-2.18 9.554-3.27 15.14-3.27 9.225 0 16.472 2.318 21.74 6.952 5.27 4.634 7.903 11.077 7.903 19.33 0 4.147-1.323 8.05-3.967 11.71-2.646 3.66-6.062 6.422-10.252 8.284 5.078 1.736 8.94 4.465 11.584 8.19s3.968 8.166 3.968 13.33c0 8.294-2.847 14.895-8.538 19.804s-13.17 7.363-22.438 7.363c-8.887 0-16.166-2.37-21.836-7.11-5.67-4.74-8.506-11.045-8.506-18.916h15.425c0 4.062 1.365 7.363 4.094 9.902 2.73 2.54 6.4 3.81 11.014 3.81 4.782 0 8.55-1.27 11.3-3.81s4.126-6.22 4.126-11.045c0-4.865-1.44-8.61-4.316-11.235-2.878-2.623-7.152-3.936-12.822-3.936H88.76V173.1zM187.598 133.493v12.76h-1.904c-8.633.126-15.53 2.497-20.693 7.108-5.162 4.614-8.23 11.152-9.203 19.615 4.95-5.205 11.277-7.808 18.98-7.808 8.166 0 14.608 2.878 19.328 8.633 4.718 5.755 7.077 13.182 7.077 22.28 0 9.395-2.76 17.002-8.284 22.82-5.52 5.818-12.77 8.73-21.74 8.73-9.226 0-16.705-3.407-22.44-10.222-5.733-6.812-8.6-15.742-8.6-26.787v-5.267c0-16.208 3.945-28.903 11.84-38.086 7.89-9.182 19.242-13.774 34.054-13.774h1.586zM171.03 177.61c-3.386 0-6.485.95-9.3 2.855-2.814 1.904-4.877 4.443-6.188 7.617v4.697c0 6.854 1.438 12.304 4.316 16.345 2.877 4.04 6.602 6.062 11.172 6.062s8.188-1.715 10.854-5.143 4-7.934 4-13.52-1.355-10.135-4.063-13.648c-2.708-3.51-6.304-5.267-10.79-5.267zM271.136 187.447c0 13.29-2.486 23.307-7.46 30.057s-12.535 10.125-22.69 10.125c-9.988 0-17.51-3.292-22.566-9.872-5.058-6.58-7.65-16.323-7.776-29.23V172.53c0-13.287 2.485-23.252 7.458-29.896 4.973-6.643 12.558-9.966 22.757-9.966 10.112 0 17.655 3.237 22.63 9.712 4.97 6.475 7.52 16.166 7.647 29.072v15.995zm-15.425-17.265c0-8.674-1.185-15.033-3.554-19.075-2.37-4.04-6.137-6.062-11.3-6.062-5.035 0-8.738 1.915-11.107 5.745-2.37 3.83-3.62 9.807-3.746 17.932v20.948c0 8.633 1.206 15.064 3.618 19.297s6.2 6.348 11.362 6.348c4.95 0 8.61-1.957 10.98-5.87 2.37-3.915 3.62-10.04 3.746-18.378v-20.885z'/%3E%3C/g%3E%3C/svg%3E");
5
+ background-size: contain;
6
+ background-color: rgba(0, 0, 0, 0.5);
7
+ }
8
+ .video-js .vjs-big-vr-play-button .vjs-icon-placeholder {
9
+ display: none;
10
+ }
11
+ :hover.video-js .vjs-big-vr-play-button {
12
+ -webkit-transition: border-color 0.4s, outline 0.4s, background-color 0.4s;
13
+ -moz-transition: border-color 0.4s, outline 0.4s, background-color 0.4s;
14
+ -ms-transition: border-color 0.4s, outline 0.4s, background-color 0.4s;
15
+ -o-transition: border-color 0.4s, outline 0.4s, background-color 0.4s;
16
+ transition: border-color 0.4s, outline 0.4s, background-color 0.4s;
17
+ }
18
+
19
+ .video-js .vjs-big-vr-play-button::before {
20
+ content: "";
21
+ }
22
+ .video-js canvas {
23
+ cursor: move;
24
+ }
25
+ .video-js .vjs-button-vr .vjs-icon-placeholder {
26
+ height: 30px;
27
+ width: 30px;
28
+ display: inline-block;
29
+ background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI0ZGRkZGRiI+CiAgICA8cGF0aCBkPSJNMjAuNzQgNkgzLjIxQzIuNTUgNiAyIDYuNTcgMiA3LjI4djEwLjQ0YzAgLjcuNTUgMS4yOCAxLjIzIDEuMjhoNC43OWMuNTIgMCAuOTYtLjMzIDEuMTQtLjc5bDEuNC0zLjQ4Yy4yMy0uNTkuNzktMS4wMSAxLjQ0LTEuMDFzMS4yMS40MiAxLjQ1IDEuMDFsMS4zOSAzLjQ4Yy4xOS40Ni42My43OSAxLjExLjc5aDQuNzljLjcxIDAgMS4yNi0uNTcgMS4yNi0xLjI4VjcuMjhjMC0uNy0uNTUtMS4yOC0xLjI2LTEuMjh6TTcuNSAxNC42MmMtMS4xNyAwLTIuMTMtLjk1LTIuMTMtMi4xMiAwLTEuMTcuOTYtMi4xMyAyLjEzLTIuMTMgMS4xOCAwIDIuMTIuOTYgMi4xMiAyLjEzcy0uOTUgMi4xMi0yLjEy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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! @name videojs-vr @version 1.10.0 @license Apache-2.0 */
2
+ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
3
+ import _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';
4
+ import window$1 from 'global/window';
5
+ import document$1 from 'global/document';
6
+ import WebVRPolyfill from 'webvr-polyfill';
7
+ import videojs from 'video.js';
8
+ import { Matrix4, Vector3, PerspectiveCamera, Quaternion, EventDispatcher, MOUSE, Spherical, Vector2, Euler, Math as Math$1, SphereBufferGeometry, MeshBasicMaterial, BackSide, Mesh, SphereGeometry, BufferGeometry, BoxGeometry, Matrix3, Scene, VideoTexture, LinearFilter, RGBFormat, WebGLRenderer, AudioContext, ShaderMaterial } from 'three';
9
+
10
+ var version = "1.10.0";
11
+
12
+ /**
13
+ * @author dmarcos / https://github.com/dmarcos
14
+ * @author mrdoob / http://mrdoob.com
15
+ *
16
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/VRControls.js
17
+ */
18
+
19
+ var VRControls = function VRControls(object, onError) {
20
+ var scope = this;
21
+ var vrDisplay, vrDisplays;
22
+ var standingMatrix = new Matrix4();
23
+ var frameData = null;
24
+
25
+ if ('VRFrameData' in window) {
26
+ frameData = new VRFrameData();
27
+ }
28
+
29
+ function gotVRDisplays(displays) {
30
+ vrDisplays = displays;
31
+
32
+ if (displays.length > 0) {
33
+ vrDisplay = displays[0];
34
+ } else {
35
+ if (onError) onError('VR input not available.');
36
+ }
37
+ }
38
+
39
+ if (navigator.getVRDisplays) {
40
+ navigator.getVRDisplays().then(gotVRDisplays).catch(function () {
41
+ console.warn('THREE.VRControls: Unable to get VR Displays');
42
+ });
43
+ } // the Rift SDK returns the position in meters
44
+ // this scale factor allows the user to define how meters
45
+ // are converted to scene units.
46
+
47
+
48
+ this.scale = 1; // If true will use "standing space" coordinate system where y=0 is the
49
+ // floor and x=0, z=0 is the center of the room.
50
+
51
+ this.standing = false; // Distance from the users eyes to the floor in meters. Used when
52
+ // standing=true but the VRDisplay doesn't provide stageParameters.
53
+
54
+ this.userHeight = 1.6;
55
+
56
+ this.getVRDisplay = function () {
57
+ return vrDisplay;
58
+ };
59
+
60
+ this.setVRDisplay = function (value) {
61
+ vrDisplay = value;
62
+ };
63
+
64
+ this.getVRDisplays = function () {
65
+ console.warn('THREE.VRControls: getVRDisplays() is being deprecated.');
66
+ return vrDisplays;
67
+ };
68
+
69
+ this.getStandingMatrix = function () {
70
+ return standingMatrix;
71
+ };
72
+
73
+ this.update = function () {
74
+ if (vrDisplay) {
75
+ var pose;
76
+
77
+ if (vrDisplay.getFrameData) {
78
+ vrDisplay.getFrameData(frameData);
79
+ pose = frameData.pose;
80
+ } else if (vrDisplay.getPose) {
81
+ pose = vrDisplay.getPose();
82
+ }
83
+
84
+ if (pose.orientation !== null) {
85
+ object.quaternion.fromArray(pose.orientation);
86
+ }
87
+
88
+ if (pose.position !== null) {
89
+ object.position.fromArray(pose.position);
90
+ } else {
91
+ object.position.set(0, 0, 0);
92
+ }
93
+
94
+ if (this.standing) {
95
+ if (vrDisplay.stageParameters) {
96
+ object.updateMatrix();
97
+ standingMatrix.fromArray(vrDisplay.stageParameters.sittingToStandingTransform);
98
+ object.applyMatrix(standingMatrix);
99
+ } else {
100
+ object.position.setY(object.position.y + this.userHeight);
101
+ }
102
+ }
103
+
104
+ object.position.multiplyScalar(scope.scale);
105
+ }
106
+ };
107
+
108
+ this.dispose = function () {
109
+ vrDisplay = null;
110
+ };
111
+ };
112
+
113
+ /**
114
+ * @author dmarcos / https://github.com/dmarcos
115
+ * @author mrdoob / http://mrdoob.com
116
+ *
117
+ * WebVR Spec: http://mozvr.github.io/webvr-spec/webvr.html
118
+ *
119
+ * Firefox: http://mozvr.com/downloads/
120
+ * Chromium: https://webvr.info/get-chrome
121
+ *
122
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/effects/VREffect.js
123
+ */
124
+
125
+ var VREffect = function VREffect(renderer, onError) {
126
+ var vrDisplay, vrDisplays;
127
+ var eyeTranslationL = new Vector3();
128
+ var eyeTranslationR = new Vector3();
129
+ var renderRectL, renderRectR;
130
+ var headMatrix = new Matrix4();
131
+ var eyeMatrixL = new Matrix4();
132
+ var eyeMatrixR = new Matrix4();
133
+ var frameData = null;
134
+
135
+ if ('VRFrameData' in window) {
136
+ frameData = new window.VRFrameData();
137
+ }
138
+
139
+ function gotVRDisplays(displays) {
140
+ vrDisplays = displays;
141
+
142
+ if (displays.length > 0) {
143
+ vrDisplay = displays[0];
144
+ } else {
145
+ if (onError) onError('HMD not available');
146
+ }
147
+ }
148
+
149
+ if (navigator.getVRDisplays) {
150
+ navigator.getVRDisplays().then(gotVRDisplays).catch(function () {
151
+ console.warn('THREE.VREffect: Unable to get VR Displays');
152
+ });
153
+ } //
154
+
155
+
156
+ this.isPresenting = false;
157
+ var scope = this;
158
+ var rendererSize = renderer.getSize();
159
+ var rendererUpdateStyle = false;
160
+ var rendererPixelRatio = renderer.getPixelRatio();
161
+
162
+ this.getVRDisplay = function () {
163
+ return vrDisplay;
164
+ };
165
+
166
+ this.setVRDisplay = function (value) {
167
+ vrDisplay = value;
168
+ };
169
+
170
+ this.getVRDisplays = function () {
171
+ console.warn('THREE.VREffect: getVRDisplays() is being deprecated.');
172
+ return vrDisplays;
173
+ };
174
+
175
+ this.setSize = function (width, height, updateStyle) {
176
+ rendererSize = {
177
+ width: width,
178
+ height: height
179
+ };
180
+ rendererUpdateStyle = updateStyle;
181
+
182
+ if (scope.isPresenting) {
183
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
184
+ renderer.setPixelRatio(1);
185
+ renderer.setSize(eyeParamsL.renderWidth * 2, eyeParamsL.renderHeight, false);
186
+ } else {
187
+ renderer.setPixelRatio(rendererPixelRatio);
188
+ renderer.setSize(width, height, updateStyle);
189
+ }
190
+ }; // VR presentation
191
+
192
+
193
+ var canvas = renderer.domElement;
194
+ var defaultLeftBounds = [0.0, 0.0, 0.5, 1.0];
195
+ var defaultRightBounds = [0.5, 0.0, 0.5, 1.0];
196
+
197
+ function onVRDisplayPresentChange() {
198
+ var wasPresenting = scope.isPresenting;
199
+ scope.isPresenting = vrDisplay !== undefined && vrDisplay.isPresenting;
200
+
201
+ if (scope.isPresenting) {
202
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
203
+ var eyeWidth = eyeParamsL.renderWidth;
204
+ var eyeHeight = eyeParamsL.renderHeight;
205
+
206
+ if (!wasPresenting) {
207
+ rendererPixelRatio = renderer.getPixelRatio();
208
+ rendererSize = renderer.getSize();
209
+ renderer.setPixelRatio(1);
210
+ renderer.setSize(eyeWidth * 2, eyeHeight, false);
211
+ }
212
+ } else if (wasPresenting) {
213
+ renderer.setPixelRatio(rendererPixelRatio);
214
+ renderer.setSize(rendererSize.width, rendererSize.height, rendererUpdateStyle);
215
+ }
216
+ }
217
+
218
+ window.addEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);
219
+
220
+ this.setFullScreen = function (boolean) {
221
+ return new Promise(function (resolve, reject) {
222
+ if (vrDisplay === undefined) {
223
+ reject(new Error('No VR hardware found.'));
224
+ return;
225
+ }
226
+
227
+ if (scope.isPresenting === boolean) {
228
+ resolve();
229
+ return;
230
+ }
231
+
232
+ if (boolean) {
233
+ resolve(vrDisplay.requestPresent([{
234
+ source: canvas
235
+ }]));
236
+ } else {
237
+ resolve(vrDisplay.exitPresent());
238
+ }
239
+ });
240
+ };
241
+
242
+ this.requestPresent = function () {
243
+ return this.setFullScreen(true);
244
+ };
245
+
246
+ this.exitPresent = function () {
247
+ return this.setFullScreen(false);
248
+ };
249
+
250
+ this.requestAnimationFrame = function (f) {
251
+ if (vrDisplay !== undefined) {
252
+ return vrDisplay.requestAnimationFrame(f);
253
+ } else {
254
+ return window.requestAnimationFrame(f);
255
+ }
256
+ };
257
+
258
+ this.cancelAnimationFrame = function (h) {
259
+ if (vrDisplay !== undefined) {
260
+ vrDisplay.cancelAnimationFrame(h);
261
+ } else {
262
+ window.cancelAnimationFrame(h);
263
+ }
264
+ };
265
+
266
+ this.submitFrame = function () {
267
+ if (vrDisplay !== undefined && scope.isPresenting) {
268
+ vrDisplay.submitFrame();
269
+ }
270
+ };
271
+
272
+ this.autoSubmitFrame = true; // render
273
+
274
+ var cameraL = new PerspectiveCamera();
275
+ cameraL.layers.enable(1);
276
+ var cameraR = new PerspectiveCamera();
277
+ cameraR.layers.enable(2);
278
+
279
+ this.render = function (scene, camera, renderTarget, forceClear) {
280
+ if (vrDisplay && scope.isPresenting) {
281
+ var autoUpdate = scene.autoUpdate;
282
+
283
+ if (autoUpdate) {
284
+ scene.updateMatrixWorld();
285
+ scene.autoUpdate = false;
286
+ }
287
+
288
+ if (Array.isArray(scene)) {
289
+ console.warn('THREE.VREffect.render() no longer supports arrays. Use object.layers instead.');
290
+ scene = scene[0];
291
+ } // When rendering we don't care what the recommended size is, only what the actual size
292
+ // of the backbuffer is.
293
+
294
+
295
+ var size = renderer.getSize();
296
+ var layers = vrDisplay.getLayers();
297
+ var leftBounds;
298
+ var rightBounds;
299
+
300
+ if (layers.length) {
301
+ var layer = layers[0];
302
+ leftBounds = layer.leftBounds !== null && layer.leftBounds.length === 4 ? layer.leftBounds : defaultLeftBounds;
303
+ rightBounds = layer.rightBounds !== null && layer.rightBounds.length === 4 ? layer.rightBounds : defaultRightBounds;
304
+ } else {
305
+ leftBounds = defaultLeftBounds;
306
+ rightBounds = defaultRightBounds;
307
+ }
308
+
309
+ renderRectL = {
310
+ x: Math.round(size.width * leftBounds[0]),
311
+ y: Math.round(size.height * leftBounds[1]),
312
+ width: Math.round(size.width * leftBounds[2]),
313
+ height: Math.round(size.height * leftBounds[3])
314
+ };
315
+ renderRectR = {
316
+ x: Math.round(size.width * rightBounds[0]),
317
+ y: Math.round(size.height * rightBounds[1]),
318
+ width: Math.round(size.width * rightBounds[2]),
319
+ height: Math.round(size.height * rightBounds[3])
320
+ };
321
+
322
+ if (renderTarget) {
323
+ renderer.setRenderTarget(renderTarget);
324
+ renderTarget.scissorTest = true;
325
+ } else {
326
+ renderer.setRenderTarget(null);
327
+ renderer.setScissorTest(true);
328
+ }
329
+
330
+ if (renderer.autoClear || forceClear) renderer.clear();
331
+ if (camera.parent === null) camera.updateMatrixWorld();
332
+ camera.matrixWorld.decompose(cameraL.position, cameraL.quaternion, cameraL.scale);
333
+ cameraR.position.copy(cameraL.position);
334
+ cameraR.quaternion.copy(cameraL.quaternion);
335
+ cameraR.scale.copy(cameraL.scale);
336
+
337
+ if (vrDisplay.getFrameData) {
338
+ vrDisplay.depthNear = camera.near;
339
+ vrDisplay.depthFar = camera.far;
340
+ vrDisplay.getFrameData(frameData);
341
+ cameraL.projectionMatrix.elements = frameData.leftProjectionMatrix;
342
+ cameraR.projectionMatrix.elements = frameData.rightProjectionMatrix;
343
+ getEyeMatrices(frameData);
344
+ cameraL.updateMatrix();
345
+ cameraL.matrix.multiply(eyeMatrixL);
346
+ cameraL.matrix.decompose(cameraL.position, cameraL.quaternion, cameraL.scale);
347
+ cameraR.updateMatrix();
348
+ cameraR.matrix.multiply(eyeMatrixR);
349
+ cameraR.matrix.decompose(cameraR.position, cameraR.quaternion, cameraR.scale);
350
+ } else {
351
+ var eyeParamsL = vrDisplay.getEyeParameters('left');
352
+ var eyeParamsR = vrDisplay.getEyeParameters('right');
353
+ cameraL.projectionMatrix = fovToProjection(eyeParamsL.fieldOfView, true, camera.near, camera.far);
354
+ cameraR.projectionMatrix = fovToProjection(eyeParamsR.fieldOfView, true, camera.near, camera.far);
355
+ eyeTranslationL.fromArray(eyeParamsL.offset);
356
+ eyeTranslationR.fromArray(eyeParamsR.offset);
357
+ cameraL.translateOnAxis(eyeTranslationL, cameraL.scale.x);
358
+ cameraR.translateOnAxis(eyeTranslationR, cameraR.scale.x);
359
+ } // render left eye
360
+
361
+
362
+ if (renderTarget) {
363
+ renderTarget.viewport.set(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
364
+ renderTarget.scissor.set(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
365
+ } else {
366
+ renderer.setViewport(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
367
+ renderer.setScissor(renderRectL.x, renderRectL.y, renderRectL.width, renderRectL.height);
368
+ }
369
+
370
+ renderer.render(scene, cameraL, renderTarget, forceClear); // render right eye
371
+
372
+ if (renderTarget) {
373
+ renderTarget.viewport.set(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
374
+ renderTarget.scissor.set(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
375
+ } else {
376
+ renderer.setViewport(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
377
+ renderer.setScissor(renderRectR.x, renderRectR.y, renderRectR.width, renderRectR.height);
378
+ }
379
+
380
+ renderer.render(scene, cameraR, renderTarget, forceClear);
381
+
382
+ if (renderTarget) {
383
+ renderTarget.viewport.set(0, 0, size.width, size.height);
384
+ renderTarget.scissor.set(0, 0, size.width, size.height);
385
+ renderTarget.scissorTest = false;
386
+ renderer.setRenderTarget(null);
387
+ } else {
388
+ renderer.setViewport(0, 0, size.width, size.height);
389
+ renderer.setScissorTest(false);
390
+ }
391
+
392
+ if (autoUpdate) {
393
+ scene.autoUpdate = true;
394
+ }
395
+
396
+ if (scope.autoSubmitFrame) {
397
+ scope.submitFrame();
398
+ }
399
+
400
+ return;
401
+ } // Regular render mode if not HMD
402
+
403
+
404
+ renderer.render(scene, camera, renderTarget, forceClear);
405
+ };
406
+
407
+ this.dispose = function () {
408
+ window.removeEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);
409
+ }; //
410
+
411
+
412
+ var poseOrientation = new Quaternion();
413
+ var posePosition = new Vector3(); // Compute model matrices of the eyes with respect to the head.
414
+
415
+ function getEyeMatrices(frameData) {
416
+ // Compute the matrix for the position of the head based on the pose
417
+ if (frameData.pose.orientation) {
418
+ poseOrientation.fromArray(frameData.pose.orientation);
419
+ headMatrix.makeRotationFromQuaternion(poseOrientation);
420
+ } else {
421
+ headMatrix.identity();
422
+ }
423
+
424
+ if (frameData.pose.position) {
425
+ posePosition.fromArray(frameData.pose.position);
426
+ headMatrix.setPosition(posePosition);
427
+ } // The view matrix transforms vertices from sitting space to eye space. As such, the view matrix can be thought of as a product of two matrices:
428
+ // headToEyeMatrix * sittingToHeadMatrix
429
+ // The headMatrix that we've calculated above is the model matrix of the head in sitting space, which is the inverse of sittingToHeadMatrix.
430
+ // So when we multiply the view matrix with headMatrix, we're left with headToEyeMatrix:
431
+ // viewMatrix * headMatrix = headToEyeMatrix * sittingToHeadMatrix * headMatrix = headToEyeMatrix
432
+
433
+
434
+ eyeMatrixL.fromArray(frameData.leftViewMatrix);
435
+ eyeMatrixL.multiply(headMatrix);
436
+ eyeMatrixR.fromArray(frameData.rightViewMatrix);
437
+ eyeMatrixR.multiply(headMatrix); // The eye's model matrix in head space is the inverse of headToEyeMatrix we calculated above.
438
+
439
+ eyeMatrixL.getInverse(eyeMatrixL);
440
+ eyeMatrixR.getInverse(eyeMatrixR);
441
+ }
442
+
443
+ function fovToNDCScaleOffset(fov) {
444
+ var pxscale = 2.0 / (fov.leftTan + fov.rightTan);
445
+ var pxoffset = (fov.leftTan - fov.rightTan) * pxscale * 0.5;
446
+ var pyscale = 2.0 / (fov.upTan + fov.downTan);
447
+ var pyoffset = (fov.upTan - fov.downTan) * pyscale * 0.5;
448
+ return {
449
+ scale: [pxscale, pyscale],
450
+ offset: [pxoffset, pyoffset]
451
+ };
452
+ }
453
+
454
+ function fovPortToProjection(fov, rightHanded, zNear, zFar) {
455
+ rightHanded = rightHanded === undefined ? true : rightHanded;
456
+ zNear = zNear === undefined ? 0.01 : zNear;
457
+ zFar = zFar === undefined ? 10000.0 : zFar;
458
+ var handednessScale = rightHanded ? -1.0 : 1.0; // start with an identity matrix
459
+
460
+ var mobj = new Matrix4();
461
+ var m = mobj.elements; // and with scale/offset info for normalized device coords
462
+
463
+ var scaleAndOffset = fovToNDCScaleOffset(fov); // X result, map clip edges to [-w,+w]
464
+
465
+ m[0 * 4 + 0] = scaleAndOffset.scale[0];
466
+ m[0 * 4 + 1] = 0.0;
467
+ m[0 * 4 + 2] = scaleAndOffset.offset[0] * handednessScale;
468
+ m[0 * 4 + 3] = 0.0; // Y result, map clip edges to [-w,+w]
469
+ // Y offset is negated because this proj matrix transforms from world coords with Y=up,
470
+ // but the NDC scaling has Y=down (thanks D3D?)
471
+
472
+ m[1 * 4 + 0] = 0.0;
473
+ m[1 * 4 + 1] = scaleAndOffset.scale[1];
474
+ m[1 * 4 + 2] = -scaleAndOffset.offset[1] * handednessScale;
475
+ m[1 * 4 + 3] = 0.0; // Z result (up to the app)
476
+
477
+ m[2 * 4 + 0] = 0.0;
478
+ m[2 * 4 + 1] = 0.0;
479
+ m[2 * 4 + 2] = zFar / (zNear - zFar) * -handednessScale;
480
+ m[2 * 4 + 3] = zFar * zNear / (zNear - zFar); // W result (= Z in)
481
+
482
+ m[3 * 4 + 0] = 0.0;
483
+ m[3 * 4 + 1] = 0.0;
484
+ m[3 * 4 + 2] = handednessScale;
485
+ m[3 * 4 + 3] = 0.0;
486
+ mobj.transpose();
487
+ return mobj;
488
+ }
489
+
490
+ function fovToProjection(fov, rightHanded, zNear, zFar) {
491
+ var DEG2RAD = Math.PI / 180.0;
492
+ var fovPort = {
493
+ upTan: Math.tan(fov.upDegrees * DEG2RAD),
494
+ downTan: Math.tan(fov.downDegrees * DEG2RAD),
495
+ leftTan: Math.tan(fov.leftDegrees * DEG2RAD),
496
+ rightTan: Math.tan(fov.rightDegrees * DEG2RAD)
497
+ };
498
+ return fovPortToProjection(fovPort, rightHanded, zNear, zFar);
499
+ }
500
+ };
501
+
502
+ /**
503
+ * @author qiao / https://github.com/qiao
504
+ * @author mrdoob / http://mrdoob.com
505
+ * @author alteredq / http://alteredqualia.com/
506
+ * @author WestLangley / http://github.com/WestLangley
507
+ * @author erich666 / http://erichaines.com
508
+ *
509
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/OrbitControls.js
510
+ */
511
+ // Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
512
+ //
513
+ // Orbit - left mouse / touch: one-finger move
514
+ // Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
515
+ // Pan - right mouse, or arrow keys / touch: two-finger move
516
+
517
+ var OrbitControls = function OrbitControls(object, domElement) {
518
+ this.object = object;
519
+ this.domElement = domElement !== undefined ? domElement : document; // Set to false to disable this control
520
+
521
+ this.enabled = true; // "target" sets the location of focus, where the object orbits around
522
+
523
+ this.target = new Vector3(); // How far you can dolly in and out ( PerspectiveCamera only )
524
+
525
+ this.minDistance = 0;
526
+ this.maxDistance = Infinity; // How far you can zoom in and out ( OrthographicCamera only )
527
+
528
+ this.minZoom = 0;
529
+ this.maxZoom = Infinity; // How far you can orbit vertically, upper and lower limits.
530
+ // Range is 0 to Math.PI radians.
531
+
532
+ this.minPolarAngle = 0; // radians
533
+
534
+ this.maxPolarAngle = Math.PI; // radians
535
+ // How far you can orbit horizontally, upper and lower limits.
536
+ // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ].
537
+
538
+ this.minAzimuthAngle = -Infinity; // radians
539
+
540
+ this.maxAzimuthAngle = Infinity; // radians
541
+ // Set to true to enable damping (inertia)
542
+ // If damping is enabled, you must call controls.update() in your animation loop
543
+
544
+ this.enableDamping = false;
545
+ this.dampingFactor = 0.25; // This option actually enables dollying in and out; left as "zoom" for backwards compatibility.
546
+ // Set to false to disable zooming
547
+
548
+ this.enableZoom = true;
549
+ this.zoomSpeed = 1.0; // Set to false to disable rotating
550
+
551
+ this.enableRotate = true;
552
+ this.rotateSpeed = 1.0; // Set to false to disable panning
553
+
554
+ this.enablePan = true;
555
+ this.panSpeed = 1.0;
556
+ this.screenSpacePanning = false; // if true, pan in screen-space
557
+
558
+ this.keyPanSpeed = 7.0; // pixels moved per arrow key push
559
+ // Set to true to automatically rotate around the target
560
+ // If auto-rotate is enabled, you must call controls.update() in your animation loop
561
+
562
+ this.autoRotate = false;
563
+ this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60
564
+ // Set to false to disable use of the keys
565
+
566
+ this.enableKeys = true; // The four arrow keys
567
+
568
+ this.keys = {
569
+ LEFT: 37,
570
+ UP: 38,
571
+ RIGHT: 39,
572
+ BOTTOM: 40
573
+ }; // Mouse buttons
574
+
575
+ this.mouseButtons = {
576
+ ORBIT: MOUSE.LEFT,
577
+ ZOOM: MOUSE.MIDDLE,
578
+ PAN: MOUSE.RIGHT
579
+ }; // for reset
580
+
581
+ this.target0 = this.target.clone();
582
+ this.position0 = this.object.position.clone();
583
+ this.zoom0 = this.object.zoom; //
584
+ // public methods
585
+ //
586
+
587
+ this.getPolarAngle = function () {
588
+ return spherical.phi;
589
+ };
590
+
591
+ this.getAzimuthalAngle = function () {
592
+ return spherical.theta;
593
+ };
594
+
595
+ this.saveState = function () {
596
+ scope.target0.copy(scope.target);
597
+ scope.position0.copy(scope.object.position);
598
+ scope.zoom0 = scope.object.zoom;
599
+ };
600
+
601
+ this.reset = function () {
602
+ scope.target.copy(scope.target0);
603
+ scope.object.position.copy(scope.position0);
604
+ scope.object.zoom = scope.zoom0;
605
+ scope.object.updateProjectionMatrix();
606
+ scope.dispatchEvent(changeEvent);
607
+ scope.update();
608
+ state = STATE.NONE;
609
+ }; // this method is exposed, but perhaps it would be better if we can make it private...
610
+
611
+
612
+ this.update = function () {
613
+ var offset = new Vector3(); // so camera.up is the orbit axis
614
+
615
+ var quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));
616
+ var quatInverse = quat.clone().inverse();
617
+ var lastPosition = new Vector3();
618
+ var lastQuaternion = new Quaternion();
619
+ return function update() {
620
+ var position = scope.object.position;
621
+ offset.copy(position).sub(scope.target); // rotate offset to "y-axis-is-up" space
622
+
623
+ offset.applyQuaternion(quat); // angle from z-axis around y-axis
624
+
625
+ spherical.setFromVector3(offset);
626
+
627
+ if (scope.autoRotate && state === STATE.NONE) {
628
+ scope.rotateLeft(getAutoRotationAngle());
629
+ }
630
+
631
+ spherical.theta += sphericalDelta.theta;
632
+ spherical.phi += sphericalDelta.phi; // restrict theta to be between desired limits
633
+
634
+ spherical.theta = Math.max(scope.minAzimuthAngle, Math.min(scope.maxAzimuthAngle, spherical.theta)); // restrict phi to be between desired limits
635
+
636
+ spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));
637
+ spherical.makeSafe();
638
+ spherical.radius *= scale; // restrict radius to be between desired limits
639
+
640
+ spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, spherical.radius)); // move target to panned location
641
+
642
+ scope.target.add(panOffset);
643
+ offset.setFromSpherical(spherical); // rotate offset back to "camera-up-vector-is-up" space
644
+
645
+ offset.applyQuaternion(quatInverse);
646
+ position.copy(scope.target).add(offset);
647
+ scope.object.lookAt(scope.target);
648
+
649
+ if (scope.enableDamping === true) {
650
+ sphericalDelta.theta *= 1 - scope.dampingFactor;
651
+ sphericalDelta.phi *= 1 - scope.dampingFactor;
652
+ panOffset.multiplyScalar(1 - scope.dampingFactor);
653
+ } else {
654
+ sphericalDelta.set(0, 0, 0);
655
+ panOffset.set(0, 0, 0);
656
+ }
657
+
658
+ scale = 1; // update condition is:
659
+ // min(camera displacement, camera rotation in radians)^2 > EPS
660
+ // using small-angle approximation cos(x/2) = 1 - x^2 / 8
661
+
662
+ if (zoomChanged || lastPosition.distanceToSquared(scope.object.position) > EPS || 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS) {
663
+ scope.dispatchEvent(changeEvent);
664
+ lastPosition.copy(scope.object.position);
665
+ lastQuaternion.copy(scope.object.quaternion);
666
+ zoomChanged = false;
667
+ return true;
668
+ }
669
+
670
+ return false;
671
+ };
672
+ }();
673
+
674
+ this.dispose = function () {
675
+ scope.domElement.removeEventListener('contextmenu', onContextMenu, false);
676
+ scope.domElement.removeEventListener('mousedown', onMouseDown, false);
677
+ scope.domElement.removeEventListener('wheel', onMouseWheel, false);
678
+ scope.domElement.removeEventListener('touchstart', onTouchStart, false);
679
+ scope.domElement.removeEventListener('touchend', onTouchEnd, false);
680
+ scope.domElement.removeEventListener('touchmove', onTouchMove, false);
681
+ document.removeEventListener('mousemove', onMouseMove, false);
682
+ document.removeEventListener('mouseup', onMouseUp, false);
683
+ window.removeEventListener('keydown', onKeyDown, false); //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?
684
+ }; //
685
+ // internals
686
+ //
687
+
688
+
689
+ var scope = this;
690
+ var changeEvent = {
691
+ type: 'change'
692
+ };
693
+ var startEvent = {
694
+ type: 'start'
695
+ };
696
+ var endEvent = {
697
+ type: 'end'
698
+ };
699
+ var STATE = {
700
+ NONE: -1,
701
+ ROTATE: 0,
702
+ DOLLY: 1,
703
+ PAN: 2,
704
+ TOUCH_ROTATE: 3,
705
+ TOUCH_DOLLY_PAN: 4
706
+ };
707
+ var state = STATE.NONE;
708
+ var EPS = 0.000001; // current position in spherical coordinates
709
+
710
+ var spherical = new Spherical();
711
+ var sphericalDelta = new Spherical();
712
+ var scale = 1;
713
+ var panOffset = new Vector3();
714
+ var zoomChanged = false;
715
+ var rotateStart = new Vector2();
716
+ var rotateEnd = new Vector2();
717
+ var rotateDelta = new Vector2();
718
+ var panStart = new Vector2();
719
+ var panEnd = new Vector2();
720
+ var panDelta = new Vector2();
721
+ var dollyStart = new Vector2();
722
+ var dollyEnd = new Vector2();
723
+ var dollyDelta = new Vector2();
724
+
725
+ function getAutoRotationAngle() {
726
+ return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;
727
+ }
728
+
729
+ function getZoomScale() {
730
+ return Math.pow(0.95, scope.zoomSpeed);
731
+ }
732
+
733
+ scope.rotateLeft = function rotateLeft(angle) {
734
+ sphericalDelta.theta -= angle;
735
+ };
736
+
737
+ scope.rotateUp = function rotateUp(angle) {
738
+ sphericalDelta.phi -= angle;
739
+ };
740
+
741
+ var panLeft = function () {
742
+ var v = new Vector3();
743
+ return function panLeft(distance, objectMatrix) {
744
+ v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix
745
+
746
+ v.multiplyScalar(-distance);
747
+ panOffset.add(v);
748
+ };
749
+ }();
750
+
751
+ var panUp = function () {
752
+ var v = new Vector3();
753
+ return function panUp(distance, objectMatrix) {
754
+ if (scope.screenSpacePanning === true) {
755
+ v.setFromMatrixColumn(objectMatrix, 1);
756
+ } else {
757
+ v.setFromMatrixColumn(objectMatrix, 0);
758
+ v.crossVectors(scope.object.up, v);
759
+ }
760
+
761
+ v.multiplyScalar(distance);
762
+ panOffset.add(v);
763
+ };
764
+ }(); // deltaX and deltaY are in pixels; right and down are positive
765
+
766
+
767
+ var pan = function () {
768
+ var offset = new Vector3();
769
+ return function pan(deltaX, deltaY) {
770
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
771
+
772
+ if (scope.object.isPerspectiveCamera) {
773
+ // perspective
774
+ var position = scope.object.position;
775
+ offset.copy(position).sub(scope.target);
776
+ var targetDistance = offset.length(); // half of the fov is center to top of screen
777
+
778
+ targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180.0); // we use only clientHeight here so aspect ratio does not distort speed
779
+
780
+ panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);
781
+ panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);
782
+ } else if (scope.object.isOrthographicCamera) {
783
+ // orthographic
784
+ panLeft(deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth, scope.object.matrix);
785
+ panUp(deltaY * (scope.object.top - scope.object.bottom) / scope.object.zoom / element.clientHeight, scope.object.matrix);
786
+ } else {
787
+ // camera neither orthographic nor perspective
788
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.');
789
+ scope.enablePan = false;
790
+ }
791
+ };
792
+ }();
793
+
794
+ function dollyIn(dollyScale) {
795
+ if (scope.object.isPerspectiveCamera) {
796
+ scale /= dollyScale;
797
+ } else if (scope.object.isOrthographicCamera) {
798
+ scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));
799
+ scope.object.updateProjectionMatrix();
800
+ zoomChanged = true;
801
+ } else {
802
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');
803
+ scope.enableZoom = false;
804
+ }
805
+ }
806
+
807
+ function dollyOut(dollyScale) {
808
+ if (scope.object.isPerspectiveCamera) {
809
+ scale *= dollyScale;
810
+ } else if (scope.object.isOrthographicCamera) {
811
+ scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));
812
+ scope.object.updateProjectionMatrix();
813
+ zoomChanged = true;
814
+ } else {
815
+ console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');
816
+ scope.enableZoom = false;
817
+ }
818
+ } //
819
+ // event callbacks - update the object state
820
+ //
821
+
822
+
823
+ function handleMouseDownRotate(event) {
824
+ //console.log( 'handleMouseDownRotate' );
825
+ rotateStart.set(event.clientX, event.clientY);
826
+ }
827
+
828
+ function handleMouseDownDolly(event) {
829
+ //console.log( 'handleMouseDownDolly' );
830
+ dollyStart.set(event.clientX, event.clientY);
831
+ }
832
+
833
+ function handleMouseDownPan(event) {
834
+ //console.log( 'handleMouseDownPan' );
835
+ panStart.set(event.clientX, event.clientY);
836
+ }
837
+
838
+ function handleMouseMoveRotate(event) {
839
+ //console.log( 'handleMouseMoveRotate' );
840
+ rotateEnd.set(event.clientX, event.clientY);
841
+ rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);
842
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
843
+ scope.rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height
844
+
845
+ scope.rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);
846
+ rotateStart.copy(rotateEnd);
847
+ scope.update();
848
+ }
849
+
850
+ function handleMouseMoveDolly(event) {
851
+ //console.log( 'handleMouseMoveDolly' );
852
+ dollyEnd.set(event.clientX, event.clientY);
853
+ dollyDelta.subVectors(dollyEnd, dollyStart);
854
+
855
+ if (dollyDelta.y > 0) {
856
+ dollyIn(getZoomScale());
857
+ } else if (dollyDelta.y < 0) {
858
+ dollyOut(getZoomScale());
859
+ }
860
+
861
+ dollyStart.copy(dollyEnd);
862
+ scope.update();
863
+ }
864
+
865
+ function handleMouseMovePan(event) {
866
+ //console.log( 'handleMouseMovePan' );
867
+ panEnd.set(event.clientX, event.clientY);
868
+ panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);
869
+ pan(panDelta.x, panDelta.y);
870
+ panStart.copy(panEnd);
871
+ scope.update();
872
+ }
873
+
874
+ function handleMouseWheel(event) {
875
+ // console.log( 'handleMouseWheel' );
876
+ if (event.deltaY < 0) {
877
+ dollyOut(getZoomScale());
878
+ } else if (event.deltaY > 0) {
879
+ dollyIn(getZoomScale());
880
+ }
881
+
882
+ scope.update();
883
+ }
884
+
885
+ function handleKeyDown(event) {
886
+ //console.log( 'handleKeyDown' );
887
+ switch (event.keyCode) {
888
+ case scope.keys.UP:
889
+ pan(0, scope.keyPanSpeed);
890
+ scope.update();
891
+ break;
892
+
893
+ case scope.keys.BOTTOM:
894
+ pan(0, -scope.keyPanSpeed);
895
+ scope.update();
896
+ break;
897
+
898
+ case scope.keys.LEFT:
899
+ pan(scope.keyPanSpeed, 0);
900
+ scope.update();
901
+ break;
902
+
903
+ case scope.keys.RIGHT:
904
+ pan(-scope.keyPanSpeed, 0);
905
+ scope.update();
906
+ break;
907
+ }
908
+ }
909
+
910
+ function handleTouchStartRotate(event) {
911
+ //console.log( 'handleTouchStartRotate' );
912
+ rotateStart.set(event.touches[0].pageX, event.touches[0].pageY);
913
+ }
914
+
915
+ function handleTouchStartDollyPan(event) {
916
+ //console.log( 'handleTouchStartDollyPan' );
917
+ if (scope.enableZoom) {
918
+ var dx = event.touches[0].pageX - event.touches[1].pageX;
919
+ var dy = event.touches[0].pageY - event.touches[1].pageY;
920
+ var distance = Math.sqrt(dx * dx + dy * dy);
921
+ dollyStart.set(0, distance);
922
+ }
923
+
924
+ if (scope.enablePan) {
925
+ var x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
926
+ var y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY);
927
+ panStart.set(x, y);
928
+ }
929
+ }
930
+
931
+ function handleTouchMoveRotate(event) {
932
+ //console.log( 'handleTouchMoveRotate' );
933
+ rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY);
934
+ rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);
935
+ var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
936
+ scope.rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height
937
+
938
+ scope.rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);
939
+ rotateStart.copy(rotateEnd);
940
+ scope.update();
941
+ }
942
+
943
+ function handleTouchMoveDollyPan(event) {
944
+ //console.log( 'handleTouchMoveDollyPan' );
945
+ if (scope.enableZoom) {
946
+ var dx = event.touches[0].pageX - event.touches[1].pageX;
947
+ var dy = event.touches[0].pageY - event.touches[1].pageY;
948
+ var distance = Math.sqrt(dx * dx + dy * dy);
949
+ dollyEnd.set(0, distance);
950
+ dollyDelta.set(0, Math.pow(dollyEnd.y / dollyStart.y, scope.zoomSpeed));
951
+ dollyIn(dollyDelta.y);
952
+ dollyStart.copy(dollyEnd);
953
+ }
954
+
955
+ if (scope.enablePan) {
956
+ var x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
957
+ var y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY);
958
+ panEnd.set(x, y);
959
+ panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);
960
+ pan(panDelta.x, panDelta.y);
961
+ panStart.copy(panEnd);
962
+ }
963
+
964
+ scope.update();
965
+ }
966
+ // event handlers - FSM: listen for events and reset state
967
+ //
968
+
969
+
970
+ function onMouseDown(event) {
971
+ if (scope.enabled === false) return;
972
+ event.preventDefault();
973
+
974
+ switch (event.button) {
975
+ case scope.mouseButtons.ORBIT:
976
+ if (scope.enableRotate === false) return;
977
+ handleMouseDownRotate(event);
978
+ state = STATE.ROTATE;
979
+ break;
980
+
981
+ case scope.mouseButtons.ZOOM:
982
+ if (scope.enableZoom === false) return;
983
+ handleMouseDownDolly(event);
984
+ state = STATE.DOLLY;
985
+ break;
986
+
987
+ case scope.mouseButtons.PAN:
988
+ if (scope.enablePan === false) return;
989
+ handleMouseDownPan(event);
990
+ state = STATE.PAN;
991
+ break;
992
+ }
993
+
994
+ if (state !== STATE.NONE) {
995
+ document.addEventListener('mousemove', onMouseMove, false);
996
+ document.addEventListener('mouseup', onMouseUp, false);
997
+ scope.dispatchEvent(startEvent);
998
+ }
999
+ }
1000
+
1001
+ function onMouseMove(event) {
1002
+ if (scope.enabled === false) return;
1003
+ event.preventDefault();
1004
+
1005
+ switch (state) {
1006
+ case STATE.ROTATE:
1007
+ if (scope.enableRotate === false) return;
1008
+ handleMouseMoveRotate(event);
1009
+ break;
1010
+
1011
+ case STATE.DOLLY:
1012
+ if (scope.enableZoom === false) return;
1013
+ handleMouseMoveDolly(event);
1014
+ break;
1015
+
1016
+ case STATE.PAN:
1017
+ if (scope.enablePan === false) return;
1018
+ handleMouseMovePan(event);
1019
+ break;
1020
+ }
1021
+ }
1022
+
1023
+ function onMouseUp(event) {
1024
+ if (scope.enabled === false) return;
1025
+ document.removeEventListener('mousemove', onMouseMove, false);
1026
+ document.removeEventListener('mouseup', onMouseUp, false);
1027
+ scope.dispatchEvent(endEvent);
1028
+ state = STATE.NONE;
1029
+ }
1030
+
1031
+ function onMouseWheel(event) {
1032
+ if (scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE && state !== STATE.ROTATE) return;
1033
+ event.preventDefault();
1034
+ event.stopPropagation();
1035
+ scope.dispatchEvent(startEvent);
1036
+ handleMouseWheel(event);
1037
+ scope.dispatchEvent(endEvent);
1038
+ }
1039
+
1040
+ function onKeyDown(event) {
1041
+ if (scope.enabled === false || scope.enableKeys === false || scope.enablePan === false) return;
1042
+ handleKeyDown(event);
1043
+ }
1044
+
1045
+ function onTouchStart(event) {
1046
+ if (scope.enabled === false) return;
1047
+ event.preventDefault();
1048
+
1049
+ switch (event.touches.length) {
1050
+ case 1:
1051
+ // one-fingered touch: rotate
1052
+ if (scope.enableRotate === false) return;
1053
+ handleTouchStartRotate(event);
1054
+ state = STATE.TOUCH_ROTATE;
1055
+ break;
1056
+
1057
+ case 2:
1058
+ // two-fingered touch: dolly-pan
1059
+ if (scope.enableZoom === false && scope.enablePan === false) return;
1060
+ handleTouchStartDollyPan(event);
1061
+ state = STATE.TOUCH_DOLLY_PAN;
1062
+ break;
1063
+
1064
+ default:
1065
+ state = STATE.NONE;
1066
+ }
1067
+
1068
+ if (state !== STATE.NONE) {
1069
+ scope.dispatchEvent(startEvent);
1070
+ }
1071
+ }
1072
+
1073
+ function onTouchMove(event) {
1074
+ if (scope.enabled === false) return;
1075
+ event.preventDefault();
1076
+ event.stopPropagation();
1077
+
1078
+ switch (event.touches.length) {
1079
+ case 1:
1080
+ // one-fingered touch: rotate
1081
+ if (scope.enableRotate === false) return;
1082
+ if (state !== STATE.TOUCH_ROTATE) return; // is this needed?
1083
+
1084
+ handleTouchMoveRotate(event);
1085
+ break;
1086
+
1087
+ case 2:
1088
+ // two-fingered touch: dolly-pan
1089
+ if (scope.enableZoom === false && scope.enablePan === false) return;
1090
+ if (state !== STATE.TOUCH_DOLLY_PAN) return; // is this needed?
1091
+
1092
+ handleTouchMoveDollyPan(event);
1093
+ break;
1094
+
1095
+ default:
1096
+ state = STATE.NONE;
1097
+ }
1098
+ }
1099
+
1100
+ function onTouchEnd(event) {
1101
+ if (scope.enabled === false) return;
1102
+ scope.dispatchEvent(endEvent);
1103
+ state = STATE.NONE;
1104
+ }
1105
+
1106
+ function onContextMenu(event) {
1107
+ if (scope.enabled === false) return;
1108
+ event.preventDefault();
1109
+ } //
1110
+ // scope.domElement.addEventListener( 'contextmenu', onContextMenu, false );
1111
+
1112
+
1113
+ scope.domElement.addEventListener('mousedown', onMouseDown, false);
1114
+ scope.domElement.addEventListener('wheel', onMouseWheel, false);
1115
+ scope.domElement.addEventListener('touchstart', onTouchStart, false);
1116
+ scope.domElement.addEventListener('touchend', onTouchEnd, false);
1117
+ scope.domElement.addEventListener('touchmove', onTouchMove, false);
1118
+ window.addEventListener('keydown', onKeyDown, false); // force an update at start
1119
+
1120
+ this.update();
1121
+ };
1122
+
1123
+ OrbitControls.prototype = Object.create(EventDispatcher.prototype);
1124
+ OrbitControls.prototype.constructor = OrbitControls;
1125
+ Object.defineProperties(OrbitControls.prototype, {
1126
+ center: {
1127
+ get: function get() {
1128
+ console.warn('THREE.OrbitControls: .center has been renamed to .target');
1129
+ return this.target;
1130
+ }
1131
+ },
1132
+ // backward compatibility
1133
+ noZoom: {
1134
+ get: function get() {
1135
+ console.warn('THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.');
1136
+ return !this.enableZoom;
1137
+ },
1138
+ set: function set(value) {
1139
+ console.warn('THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.');
1140
+ this.enableZoom = !value;
1141
+ }
1142
+ },
1143
+ noRotate: {
1144
+ get: function get() {
1145
+ console.warn('THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.');
1146
+ return !this.enableRotate;
1147
+ },
1148
+ set: function set(value) {
1149
+ console.warn('THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.');
1150
+ this.enableRotate = !value;
1151
+ }
1152
+ },
1153
+ noPan: {
1154
+ get: function get() {
1155
+ console.warn('THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.');
1156
+ return !this.enablePan;
1157
+ },
1158
+ set: function set(value) {
1159
+ console.warn('THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.');
1160
+ this.enablePan = !value;
1161
+ }
1162
+ },
1163
+ noKeys: {
1164
+ get: function get() {
1165
+ console.warn('THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.');
1166
+ return !this.enableKeys;
1167
+ },
1168
+ set: function set(value) {
1169
+ console.warn('THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.');
1170
+ this.enableKeys = !value;
1171
+ }
1172
+ },
1173
+ staticMoving: {
1174
+ get: function get() {
1175
+ console.warn('THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.');
1176
+ return !this.enableDamping;
1177
+ },
1178
+ set: function set(value) {
1179
+ console.warn('THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.');
1180
+ this.enableDamping = !value;
1181
+ }
1182
+ },
1183
+ dynamicDampingFactor: {
1184
+ get: function get() {
1185
+ console.warn('THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.');
1186
+ return this.dampingFactor;
1187
+ },
1188
+ set: function set(value) {
1189
+ console.warn('THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.');
1190
+ this.dampingFactor = value;
1191
+ }
1192
+ }
1193
+ });
1194
+
1195
+ /**
1196
+ * @author richt / http://richt.me
1197
+ * @author WestLangley / http://github.com/WestLangley
1198
+ *
1199
+ * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)
1200
+ *
1201
+ * originally from https://github.com/mrdoob/three.js/blob/r93/examples/js/controls/DeviceOrientationControls.js
1202
+ */
1203
+
1204
+ var DeviceOrientationControls = function DeviceOrientationControls(object) {
1205
+ var scope = this;
1206
+ this.object = object;
1207
+ this.object.rotation.reorder('YXZ');
1208
+ this.enabled = true;
1209
+ this.deviceOrientation = {};
1210
+ this.screenOrientation = 0;
1211
+ this.alphaOffset = 0; // radians
1212
+
1213
+ var onDeviceOrientationChangeEvent = function onDeviceOrientationChangeEvent(event) {
1214
+ scope.deviceOrientation = event;
1215
+ };
1216
+
1217
+ var onScreenOrientationChangeEvent = function onScreenOrientationChangeEvent() {
1218
+ scope.screenOrientation = window.orientation || 0;
1219
+ }; // The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''
1220
+
1221
+
1222
+ var setObjectQuaternion = function () {
1223
+ var zee = new Vector3(0, 0, 1);
1224
+ var euler = new Euler();
1225
+ var q0 = new Quaternion();
1226
+ var q1 = new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5)); // - PI/2 around the x-axis
1227
+
1228
+ return function (quaternion, alpha, beta, gamma, orient) {
1229
+ euler.set(beta, alpha, -gamma, 'YXZ'); // 'ZXY' for the device, but 'YXZ' for us
1230
+
1231
+ quaternion.setFromEuler(euler); // orient the device
1232
+
1233
+ quaternion.multiply(q1); // camera looks out the back of the device, not the top
1234
+
1235
+ quaternion.multiply(q0.setFromAxisAngle(zee, -orient)); // adjust for screen orientation
1236
+ };
1237
+ }();
1238
+
1239
+ this.connect = function () {
1240
+ onScreenOrientationChangeEvent(); // run once on load
1241
+
1242
+ window.addEventListener('orientationchange', onScreenOrientationChangeEvent, false);
1243
+ window.addEventListener('deviceorientation', onDeviceOrientationChangeEvent, false);
1244
+ scope.enabled = true;
1245
+ };
1246
+
1247
+ this.disconnect = function () {
1248
+ window.removeEventListener('orientationchange', onScreenOrientationChangeEvent, false);
1249
+ window.removeEventListener('deviceorientation', onDeviceOrientationChangeEvent, false);
1250
+ scope.enabled = false;
1251
+ };
1252
+
1253
+ this.update = function () {
1254
+ if (scope.enabled === false) return;
1255
+ var device = scope.deviceOrientation;
1256
+
1257
+ if (device) {
1258
+ var alpha = device.alpha ? Math$1.degToRad(device.alpha) + scope.alphaOffset : 0; // Z
1259
+
1260
+ var beta = device.beta ? Math$1.degToRad(device.beta) : 0; // X'
1261
+
1262
+ var gamma = device.gamma ? Math$1.degToRad(device.gamma) : 0; // Y''
1263
+
1264
+ var orient = scope.screenOrientation ? Math$1.degToRad(scope.screenOrientation) : 0; // O
1265
+
1266
+ setObjectQuaternion(scope.object.quaternion, alpha, beta, gamma, orient);
1267
+ }
1268
+ };
1269
+
1270
+ this.dispose = function () {
1271
+ scope.disconnect();
1272
+ };
1273
+
1274
+ this.connect();
1275
+ };
1276
+
1277
+ /**
1278
+ * Convert a quaternion to an angle
1279
+ *
1280
+ * Taken from https://stackoverflow.com/a/35448946
1281
+ * Thanks P. Ellul
1282
+ */
1283
+
1284
+ function Quat2Angle(x, y, z, w) {
1285
+ var test = x * y + z * w; // singularity at north pole
1286
+
1287
+ if (test > 0.499) {
1288
+ var _yaw = 2 * Math.atan2(x, w);
1289
+
1290
+ var _pitch = Math.PI / 2;
1291
+
1292
+ var _roll = 0;
1293
+ return new Vector3(_pitch, _roll, _yaw);
1294
+ } // singularity at south pole
1295
+
1296
+
1297
+ if (test < -0.499) {
1298
+ var _yaw2 = -2 * Math.atan2(x, w);
1299
+
1300
+ var _pitch2 = -Math.PI / 2;
1301
+
1302
+ var _roll2 = 0;
1303
+ return new Vector3(_pitch2, _roll2, _yaw2);
1304
+ }
1305
+
1306
+ var sqx = x * x;
1307
+ var sqy = y * y;
1308
+ var sqz = z * z;
1309
+ var yaw = Math.atan2(2 * y * w - 2 * x * z, 1 - 2 * sqy - 2 * sqz);
1310
+ var pitch = Math.asin(2 * test);
1311
+ var roll = Math.atan2(2 * x * w - 2 * y * z, 1 - 2 * sqx - 2 * sqz);
1312
+ return new Vector3(pitch, roll, yaw);
1313
+ }
1314
+
1315
+ var OrbitOrientationControls = /*#__PURE__*/function () {
1316
+ function OrbitOrientationControls(options) {
1317
+ this.object = options.camera;
1318
+ this.domElement = options.canvas;
1319
+ this.orbit = new OrbitControls(this.object, this.domElement);
1320
+ this.speed = 0.5;
1321
+ this.orbit.target.set(0, 0, -1);
1322
+ this.orbit.enableZoom = false;
1323
+ this.orbit.enablePan = false;
1324
+ this.orbit.rotateSpeed = -this.speed; // if orientation is supported
1325
+
1326
+ if (options.orientation) {
1327
+ this.orientation = new DeviceOrientationControls(this.object);
1328
+ } // if projection is not full view
1329
+ // limit the rotation angle in order to not display back half view
1330
+
1331
+
1332
+ if (options.halfView) {
1333
+ this.orbit.minAzimuthAngle = -Math.PI / 4;
1334
+ this.orbit.maxAzimuthAngle = Math.PI / 4;
1335
+ }
1336
+ }
1337
+
1338
+ var _proto = OrbitOrientationControls.prototype;
1339
+
1340
+ _proto.update = function update() {
1341
+ // orientation updates the camera using quaternions and
1342
+ // orbit updates the camera using angles. They are incompatible
1343
+ // and one update overrides the other. So before
1344
+ // orbit overrides orientation we convert our quaternion changes to
1345
+ // an angle change. Then save the angle into orbit so that
1346
+ // it will take those into account when it updates the camera and overrides
1347
+ // our changes
1348
+ if (this.orientation) {
1349
+ this.orientation.update();
1350
+ var quat = this.orientation.object.quaternion;
1351
+ var currentAngle = Quat2Angle(quat.x, quat.y, quat.z, quat.w); // we also have to store the last angle since quaternions are b
1352
+
1353
+ if (typeof this.lastAngle_ === 'undefined') {
1354
+ this.lastAngle_ = currentAngle;
1355
+ }
1356
+
1357
+ this.orbit.rotateLeft((this.lastAngle_.z - currentAngle.z) * (1 + this.speed));
1358
+ this.orbit.rotateUp((this.lastAngle_.y - currentAngle.y) * (1 + this.speed));
1359
+ this.lastAngle_ = currentAngle;
1360
+ }
1361
+
1362
+ this.orbit.update();
1363
+ };
1364
+
1365
+ _proto.dispose = function dispose() {
1366
+ this.orbit.dispose();
1367
+
1368
+ if (this.orientation) {
1369
+ this.orientation.dispose();
1370
+ }
1371
+ };
1372
+
1373
+ return OrbitOrientationControls;
1374
+ }();
1375
+
1376
+ var corsSupport = function () {
1377
+ var video = document$1.createElement('video');
1378
+ video.crossOrigin = 'anonymous';
1379
+ return video.hasAttribute('crossorigin');
1380
+ }();
1381
+ var validProjections = ['360', '360_LR', '360_TB', '360_CUBE', 'EAC', 'EAC_LR', 'NONE', 'AUTO', 'Sphere', 'Cube', 'equirectangular', '180', '180_LR', '180_MONO'];
1382
+ var getInternalProjectionName = function getInternalProjectionName(projection) {
1383
+ if (!projection) {
1384
+ return;
1385
+ }
1386
+
1387
+ projection = projection.toString().trim();
1388
+
1389
+ if (/sphere/i.test(projection)) {
1390
+ return '360';
1391
+ }
1392
+
1393
+ if (/cube/i.test(projection)) {
1394
+ return '360_CUBE';
1395
+ }
1396
+
1397
+ if (/equirectangular/i.test(projection)) {
1398
+ return '360';
1399
+ }
1400
+
1401
+ for (var i = 0; i < validProjections.length; i++) {
1402
+ if (new RegExp('^' + validProjections[i] + '$', 'i').test(projection)) {
1403
+ return validProjections[i];
1404
+ }
1405
+ }
1406
+ };
1407
+
1408
+ /**
1409
+ * This class reacts to interactions with the canvas and
1410
+ * triggers appropriate functionality on the player. Right now
1411
+ * it does two things:
1412
+ *
1413
+ * 1. A `mousedown`/`touchstart` followed by `touchend`/`mouseup` without any
1414
+ * `touchmove` or `mousemove` toggles play/pause on the player
1415
+ * 2. Only moving on/clicking the control bar or toggling play/pause should
1416
+ * show the control bar. Moving around the scene in the canvas should not.
1417
+ */
1418
+
1419
+ var CanvasPlayerControls = /*#__PURE__*/function (_videojs$EventTarget) {
1420
+ _inheritsLoose(CanvasPlayerControls, _videojs$EventTarget);
1421
+
1422
+ function CanvasPlayerControls(player, canvas, options) {
1423
+ var _this;
1424
+
1425
+ _this = _videojs$EventTarget.call(this) || this;
1426
+ _this.player = player;
1427
+ _this.canvas = canvas;
1428
+ _this.options = options;
1429
+ _this.onMoveEnd = videojs.bind(_assertThisInitialized(_this), _this.onMoveEnd);
1430
+ _this.onMoveStart = videojs.bind(_assertThisInitialized(_this), _this.onMoveStart);
1431
+ _this.onMove = videojs.bind(_assertThisInitialized(_this), _this.onMove);
1432
+ _this.onControlBarMove = videojs.bind(_assertThisInitialized(_this), _this.onControlBarMove);
1433
+
1434
+ _this.player.controlBar.on(['mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend'], _this.onControlBarMove); // we have to override these here because
1435
+ // video.js listens for user activity on the video element
1436
+ // and makes the user active when the mouse moves.
1437
+ // We don't want that for 3d videos
1438
+
1439
+
1440
+ _this.oldReportUserActivity = _this.player.reportUserActivity;
1441
+
1442
+ _this.player.reportUserActivity = function () {}; // canvas movements
1443
+
1444
+
1445
+ _this.canvas.addEventListener('mousedown', _this.onMoveStart);
1446
+
1447
+ _this.canvas.addEventListener('touchstart', _this.onMoveStart);
1448
+
1449
+ _this.canvas.addEventListener('mousemove', _this.onMove);
1450
+
1451
+ _this.canvas.addEventListener('touchmove', _this.onMove);
1452
+
1453
+ _this.canvas.addEventListener('mouseup', _this.onMoveEnd);
1454
+
1455
+ _this.canvas.addEventListener('touchend', _this.onMoveEnd);
1456
+
1457
+ _this.shouldTogglePlay = false;
1458
+ return _this;
1459
+ }
1460
+
1461
+ var _proto = CanvasPlayerControls.prototype;
1462
+
1463
+ _proto.togglePlay = function togglePlay() {
1464
+ if (this.player.paused()) {
1465
+ this.player.play();
1466
+ } else {
1467
+ this.player.pause();
1468
+ }
1469
+ };
1470
+
1471
+ _proto.onMoveStart = function onMoveStart(e) {
1472
+ // if the player does not have a controlbar or
1473
+ // the move was a mouse click but not left click do not
1474
+ // toggle play.
1475
+ if (this.options.disableTogglePlay || !this.player.controls() || e.type === 'mousedown' && !videojs.dom.isSingleLeftClick(e)) {
1476
+ this.shouldTogglePlay = false;
1477
+ return;
1478
+ }
1479
+
1480
+ this.shouldTogglePlay = true;
1481
+ this.touchMoveCount_ = 0;
1482
+ };
1483
+
1484
+ _proto.onMoveEnd = function onMoveEnd(e) {
1485
+ // We want to have the same behavior in VR360 Player and standard player.
1486
+ // in touchend we want to know if was a touch click, for a click we show the bar,
1487
+ // otherwise continue with the mouse logic.
1488
+ //
1489
+ // Maximum movement allowed during a touch event to still be considered a tap
1490
+ // Other popular libs use anywhere from 2 (hammer.js) to 15,
1491
+ // so 10 seems like a nice, round number.
1492
+ if (e.type === 'touchend' && this.touchMoveCount_ < 10) {
1493
+ if (this.player.userActive() === false) {
1494
+ this.player.userActive(true);
1495
+ return;
1496
+ }
1497
+
1498
+ this.player.userActive(false);
1499
+ return;
1500
+ }
1501
+
1502
+ if (!this.shouldTogglePlay) {
1503
+ return;
1504
+ } // We want the same behavior in Desktop for VR360 and standard player
1505
+
1506
+
1507
+ if (e.type === 'mouseup') {
1508
+ this.togglePlay();
1509
+ }
1510
+ };
1511
+
1512
+ _proto.onMove = function onMove(e) {
1513
+ // Increase touchMoveCount_ since Android detects 1 - 6 touches when user click normally
1514
+ this.touchMoveCount_++;
1515
+ this.shouldTogglePlay = false;
1516
+ };
1517
+
1518
+ _proto.onControlBarMove = function onControlBarMove(e) {
1519
+ this.player.userActive(true);
1520
+ };
1521
+
1522
+ _proto.dispose = function dispose() {
1523
+ this.canvas.removeEventListener('mousedown', this.onMoveStart);
1524
+ this.canvas.removeEventListener('touchstart', this.onMoveStart);
1525
+ this.canvas.removeEventListener('mousemove', this.onMove);
1526
+ this.canvas.removeEventListener('touchmove', this.onMove);
1527
+ this.canvas.removeEventListener('mouseup', this.onMoveEnd);
1528
+ this.canvas.removeEventListener('touchend', this.onMoveEnd);
1529
+ this.player.controlBar.off(['mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend'], this.onControlBarMove);
1530
+ this.player.reportUserActivity = this.oldReportUserActivity;
1531
+ };
1532
+
1533
+ return CanvasPlayerControls;
1534
+ }(videojs.EventTarget);
1535
+
1536
+ /**
1537
+ * This class manages ambisonic decoding and binaural rendering via Omnitone library.
1538
+ */
1539
+
1540
+ var OmnitoneController = /*#__PURE__*/function (_videojs$EventTarget) {
1541
+ _inheritsLoose(OmnitoneController, _videojs$EventTarget);
1542
+
1543
+ /**
1544
+ * Omnitone controller class.
1545
+ *
1546
+ * @class
1547
+ * @param {AudioContext} audioContext - associated AudioContext.
1548
+ * @param {Omnitone library} omnitone - Omnitone library element.
1549
+ * @param {HTMLVideoElement} video - vidoe tag element.
1550
+ * @param {Object} options - omnitone options.
1551
+ */
1552
+ function OmnitoneController(audioContext, omnitone, video, options) {
1553
+ var _this;
1554
+
1555
+ _this = _videojs$EventTarget.call(this) || this;
1556
+ var settings = videojs.mergeOptions({
1557
+ // Safari uses the different AAC decoder than FFMPEG. The channel order is
1558
+ // The default 4ch AAC channel layout for FFMPEG AAC channel ordering.
1559
+ channelMap: videojs.browser.IS_SAFARI ? [2, 0, 1, 3] : [0, 1, 2, 3],
1560
+ ambisonicOrder: 1
1561
+ }, options);
1562
+ _this.videoElementSource = audioContext.createMediaElementSource(video);
1563
+ _this.foaRenderer = omnitone.createFOARenderer(audioContext, settings);
1564
+
1565
+ _this.foaRenderer.initialize().then(function () {
1566
+ if (audioContext.state === 'suspended') {
1567
+ _this.trigger({
1568
+ type: 'audiocontext-suspended'
1569
+ });
1570
+ }
1571
+
1572
+ _this.videoElementSource.connect(_this.foaRenderer.input);
1573
+
1574
+ _this.foaRenderer.output.connect(audioContext.destination);
1575
+
1576
+ _this.initialized = true;
1577
+
1578
+ _this.trigger({
1579
+ type: 'omnitone-ready'
1580
+ });
1581
+ }, function (error) {
1582
+ videojs.log.warn("videojs-vr: Omnitone initializes failed with the following error: " + error + ")");
1583
+ });
1584
+
1585
+ return _this;
1586
+ }
1587
+ /**
1588
+ * Updates the rotation of the Omnitone decoder based on three.js camera matrix.
1589
+ *
1590
+ * @param {Camera} camera Three.js camera object
1591
+ */
1592
+
1593
+
1594
+ var _proto = OmnitoneController.prototype;
1595
+
1596
+ _proto.update = function update(camera) {
1597
+ if (!this.initialized) {
1598
+ return;
1599
+ }
1600
+
1601
+ this.foaRenderer.setRotationMatrixFromCamera(camera.matrix);
1602
+ }
1603
+ /**
1604
+ * Destroys the controller and does any necessary cleanup.
1605
+ */
1606
+ ;
1607
+
1608
+ _proto.dispose = function dispose() {
1609
+ this.initialized = false;
1610
+ this.foaRenderer.setRenderingMode('bypass');
1611
+ this.foaRenderer = null;
1612
+ };
1613
+
1614
+ return OmnitoneController;
1615
+ }(videojs.EventTarget);
1616
+
1617
+ var Button = videojs.getComponent('Button');
1618
+
1619
+ var CardboardButton = /*#__PURE__*/function (_Button) {
1620
+ _inheritsLoose(CardboardButton, _Button);
1621
+
1622
+ function CardboardButton(player, options) {
1623
+ var _this;
1624
+
1625
+ _this = _Button.call(this, player, options) || this;
1626
+ _this.handleVrDisplayActivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayActivate_);
1627
+ _this.handleVrDisplayDeactivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayDeactivate_);
1628
+ _this.handleVrDisplayPresentChange_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayPresentChange_);
1629
+ _this.handleOrientationChange_ = videojs.bind(_assertThisInitialized(_this), _this.handleOrientationChange_);
1630
+ window$1.addEventListener('orientationchange', _this.handleOrientationChange_);
1631
+ window$1.addEventListener('vrdisplayactivate', _this.handleVrDisplayActivate_);
1632
+ window$1.addEventListener('vrdisplaydeactivate', _this.handleVrDisplayDeactivate_); // vrdisplaypresentchange does not fire activate or deactivate
1633
+ // and happens when hitting the back button during cardboard mode
1634
+ // so we need to make sure we stay in the correct state by
1635
+ // listening to it and checking if we are presenting it or not
1636
+
1637
+ window$1.addEventListener('vrdisplaypresentchange', _this.handleVrDisplayPresentChange_); // we cannot show the cardboard button in fullscreen on
1638
+ // android as it breaks the controls, and makes it impossible
1639
+ // to exit cardboard mode
1640
+
1641
+ if (videojs.browser.IS_ANDROID) {
1642
+ _this.on(player, 'fullscreenchange', function () {
1643
+ if (player.isFullscreen()) {
1644
+ _this.hide();
1645
+ } else {
1646
+ _this.show();
1647
+ }
1648
+ });
1649
+ }
1650
+
1651
+ return _this;
1652
+ }
1653
+
1654
+ var _proto = CardboardButton.prototype;
1655
+
1656
+ _proto.buildCSSClass = function buildCSSClass() {
1657
+ return "vjs-button-vr " + _Button.prototype.buildCSSClass.call(this);
1658
+ };
1659
+
1660
+ _proto.handleVrDisplayPresentChange_ = function handleVrDisplayPresentChange_() {
1661
+ if (!this.player_.vr().vrDisplay.isPresenting && this.active_) {
1662
+ this.handleVrDisplayDeactivate_();
1663
+ }
1664
+
1665
+ if (this.player_.vr().vrDisplay.isPresenting && !this.active_) {
1666
+ this.handleVrDisplayActivate_();
1667
+ }
1668
+ };
1669
+
1670
+ _proto.handleOrientationChange_ = function handleOrientationChange_() {
1671
+ if (this.active_ && videojs.browser.IS_IOS) {
1672
+ this.changeSize_();
1673
+ }
1674
+ };
1675
+
1676
+ _proto.changeSize_ = function changeSize_() {
1677
+ this.player_.width(window$1.innerWidth);
1678
+ this.player_.height(window$1.innerHeight);
1679
+ window$1.dispatchEvent(new window$1.Event('resize'));
1680
+ };
1681
+
1682
+ _proto.handleVrDisplayActivate_ = function handleVrDisplayActivate_() {
1683
+ // we mimic fullscreen on IOS
1684
+ if (videojs.browser.IS_IOS) {
1685
+ this.oldWidth_ = this.player_.currentWidth();
1686
+ this.oldHeight_ = this.player_.currentHeight();
1687
+ this.player_.enterFullWindow();
1688
+ this.changeSize_();
1689
+ }
1690
+
1691
+ this.active_ = true;
1692
+ };
1693
+
1694
+ _proto.handleVrDisplayDeactivate_ = function handleVrDisplayDeactivate_() {
1695
+ // un-mimic fullscreen on iOS
1696
+ if (videojs.browser.IS_IOS) {
1697
+ if (this.oldWidth_) {
1698
+ this.player_.width(this.oldWidth_);
1699
+ }
1700
+
1701
+ if (this.oldHeight_) {
1702
+ this.player_.height(this.oldHeight_);
1703
+ }
1704
+
1705
+ this.player_.exitFullWindow();
1706
+ }
1707
+
1708
+ this.active_ = false;
1709
+ };
1710
+
1711
+ _proto.handleClick = function handleClick(event) {
1712
+ // if cardboard mode display is not active, activate it
1713
+ // otherwise deactivate it
1714
+ if (!this.active_) {
1715
+ // This starts playback mode when the cardboard button
1716
+ // is clicked on Android. We need to do this as the controls
1717
+ // disappear
1718
+ if (!this.player_.hasStarted() && videojs.browser.IS_ANDROID) {
1719
+ this.player_.play();
1720
+ }
1721
+
1722
+ window$1.dispatchEvent(new window$1.Event('vrdisplayactivate'));
1723
+ } else {
1724
+ window$1.dispatchEvent(new window$1.Event('vrdisplaydeactivate'));
1725
+ }
1726
+ };
1727
+
1728
+ _proto.dispose = function dispose() {
1729
+ _Button.prototype.dispose.call(this);
1730
+
1731
+ window$1.removeEventListener('vrdisplayactivate', this.handleVrDisplayActivate_);
1732
+ window$1.removeEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_);
1733
+ window$1.removeEventListener('vrdisplaypresentchange', this.handleVrDisplayPresentChange_);
1734
+ };
1735
+
1736
+ return CardboardButton;
1737
+ }(Button);
1738
+
1739
+ videojs.registerComponent('CardboardButton', CardboardButton);
1740
+
1741
+ var BigPlayButton = videojs.getComponent('BigPlayButton');
1742
+
1743
+ var BigVrPlayButton = /*#__PURE__*/function (_BigPlayButton) {
1744
+ _inheritsLoose(BigVrPlayButton, _BigPlayButton);
1745
+
1746
+ function BigVrPlayButton() {
1747
+ return _BigPlayButton.apply(this, arguments) || this;
1748
+ }
1749
+
1750
+ var _proto = BigVrPlayButton.prototype;
1751
+
1752
+ _proto.buildCSSClass = function buildCSSClass() {
1753
+ return "vjs-big-vr-play-button " + _BigPlayButton.prototype.buildCSSClass.call(this);
1754
+ };
1755
+
1756
+ return BigVrPlayButton;
1757
+ }(BigPlayButton);
1758
+
1759
+ videojs.registerComponent('BigVrPlayButton', BigVrPlayButton);
1760
+
1761
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1762
+
1763
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1764
+
1765
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1766
+
1767
+ var defaults = {
1768
+ debug: false,
1769
+ omnitone: false,
1770
+ forceCardboard: false,
1771
+ omnitoneOptions: {},
1772
+ projection: 'AUTO',
1773
+ sphereDetail: 32,
1774
+ disableTogglePlay: false
1775
+ };
1776
+ var errors = {
1777
+ 'web-vr-out-of-date': {
1778
+ headline: '360 is out of date',
1779
+ type: '360_OUT_OF_DATE',
1780
+ message: "Your browser supports 360 but not the latest version. See <a href='http://webvr.info'>http://webvr.info</a> for more info."
1781
+ },
1782
+ 'web-vr-not-supported': {
1783
+ headline: '360 not supported on this device',
1784
+ type: '360_NOT_SUPPORTED',
1785
+ message: "Your browser does not support 360. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."
1786
+ },
1787
+ 'web-vr-hls-cors-not-supported': {
1788
+ headline: '360 HLS video not supported on this device',
1789
+ type: '360_NOT_SUPPORTED',
1790
+ message: "Your browser/device does not support HLS 360 video. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."
1791
+ }
1792
+ };
1793
+ var Plugin = videojs.getPlugin('plugin');
1794
+ var Component = videojs.getComponent('Component');
1795
+
1796
+ var VR = /*#__PURE__*/function (_Plugin) {
1797
+ _inheritsLoose(VR, _Plugin);
1798
+
1799
+ function VR(player, options) {
1800
+ var _this;
1801
+
1802
+ var settings = videojs.mergeOptions(defaults, options);
1803
+ _this = _Plugin.call(this, player, settings) || this;
1804
+ _this.options_ = settings;
1805
+ _this.player_ = player;
1806
+ _this.bigPlayButtonIndex_ = player.children().indexOf(player.getChild('BigPlayButton')) || 0; // custom videojs-errors integration boolean
1807
+
1808
+ _this.videojsErrorsSupport_ = !!videojs.errors;
1809
+
1810
+ if (_this.videojsErrorsSupport_) {
1811
+ player.errors({
1812
+ errors: errors
1813
+ });
1814
+ } // IE 11 does not support enough webgl to be supported
1815
+ // older safari does not support cors, so it wont work
1816
+
1817
+
1818
+ if (videojs.browser.IE_VERSION || !corsSupport) {
1819
+ // if a player triggers error before 'loadstart' is fired
1820
+ // video.js will reset the error overlay
1821
+ _this.player_.on('loadstart', function () {
1822
+ _this.triggerError_({
1823
+ code: 'web-vr-not-supported',
1824
+ dismiss: false
1825
+ });
1826
+ });
1827
+
1828
+ return _assertThisInitialized(_this);
1829
+ }
1830
+
1831
+ _this.polyfill_ = new WebVRPolyfill({
1832
+ // do not show rotate instructions
1833
+ ROTATE_INSTRUCTIONS_DISABLED: true
1834
+ });
1835
+ _this.polyfill_ = new WebVRPolyfill();
1836
+ _this.handleVrDisplayActivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayActivate_);
1837
+ _this.handleVrDisplayDeactivate_ = videojs.bind(_assertThisInitialized(_this), _this.handleVrDisplayDeactivate_);
1838
+ _this.handleResize_ = videojs.bind(_assertThisInitialized(_this), _this.handleResize_);
1839
+ _this.animate_ = videojs.bind(_assertThisInitialized(_this), _this.animate_);
1840
+
1841
+ _this.setProjection(_this.options_.projection); // any time the video element is recycled for ads
1842
+ // we have to reset the vr state and re-init after ad
1843
+
1844
+
1845
+ _this.on(player, 'adstart', function () {
1846
+ return player.setTimeout(function () {
1847
+ // if the video element was recycled for this ad
1848
+ if (!player.ads || !player.ads.videoElementRecycled()) {
1849
+ _this.log('video element not recycled for this ad, no need to reset');
1850
+
1851
+ return;
1852
+ }
1853
+
1854
+ _this.log('video element recycled for this ad, reseting');
1855
+
1856
+ _this.reset();
1857
+
1858
+ _this.one(player, 'playing', _this.init);
1859
+ });
1860
+ }, 1);
1861
+
1862
+ _this.on(player, 'loadedmetadata', _this.init);
1863
+
1864
+ return _this;
1865
+ }
1866
+
1867
+ var _proto = VR.prototype;
1868
+
1869
+ _proto.changeProjection_ = function changeProjection_(projection) {
1870
+ var _this2 = this;
1871
+
1872
+ projection = getInternalProjectionName(projection); // don't change to an invalid projection
1873
+
1874
+ if (!projection) {
1875
+ projection = 'NONE';
1876
+ }
1877
+
1878
+ var position = {
1879
+ x: 0,
1880
+ y: 0,
1881
+ z: 0
1882
+ };
1883
+
1884
+ if (this.scene) {
1885
+ this.scene.remove(this.movieScreen);
1886
+ }
1887
+
1888
+ if (projection === 'AUTO') {
1889
+ // mediainfo cannot be set to auto or we would infinite loop here
1890
+ // each source should know whatever they are 360 or not, if using AUTO
1891
+ if (this.player_.mediainfo && this.player_.mediainfo.projection && this.player_.mediainfo.projection !== 'AUTO') {
1892
+ var autoProjection = getInternalProjectionName(this.player_.mediainfo.projection);
1893
+ return this.changeProjection_(autoProjection);
1894
+ }
1895
+
1896
+ return this.changeProjection_('NONE');
1897
+ } else if (projection === '360') {
1898
+ this.movieGeometry = new SphereBufferGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1899
+ this.movieMaterial = new MeshBasicMaterial({
1900
+ map: this.videoTexture,
1901
+ overdraw: true,
1902
+ side: BackSide
1903
+ });
1904
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial);
1905
+ this.movieScreen.position.set(position.x, position.y, position.z);
1906
+ this.movieScreen.scale.x = -1;
1907
+ this.movieScreen.quaternion.setFromAxisAngle({
1908
+ x: 0,
1909
+ y: 1,
1910
+ z: 0
1911
+ }, -Math.PI / 2);
1912
+ this.scene.add(this.movieScreen);
1913
+ } else if (projection === '360_LR' || projection === '360_TB') {
1914
+ // Left eye view
1915
+ var geometry = new SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1916
+ var uvs = geometry.faceVertexUvs[0];
1917
+
1918
+ for (var i = 0; i < uvs.length; i++) {
1919
+ for (var j = 0; j < 3; j++) {
1920
+ if (projection === '360_LR') {
1921
+ uvs[i][j].x *= 0.5;
1922
+ } else {
1923
+ uvs[i][j].y *= 0.5;
1924
+ uvs[i][j].y += 0.5;
1925
+ }
1926
+ }
1927
+ }
1928
+
1929
+ this.movieGeometry = new BufferGeometry().fromGeometry(geometry);
1930
+ this.movieMaterial = new MeshBasicMaterial({
1931
+ map: this.videoTexture,
1932
+ overdraw: true,
1933
+ side: BackSide
1934
+ });
1935
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial);
1936
+ this.movieScreen.scale.x = -1;
1937
+ this.movieScreen.quaternion.setFromAxisAngle({
1938
+ x: 0,
1939
+ y: 1,
1940
+ z: 0
1941
+ }, -Math.PI / 2); // display in left eye only
1942
+
1943
+ this.movieScreen.layers.set(1);
1944
+ this.scene.add(this.movieScreen); // Right eye view
1945
+
1946
+ geometry = new SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail);
1947
+ uvs = geometry.faceVertexUvs[0];
1948
+
1949
+ for (var _i = 0; _i < uvs.length; _i++) {
1950
+ for (var _j = 0; _j < 3; _j++) {
1951
+ if (projection === '360_LR') {
1952
+ uvs[_i][_j].x *= 0.5;
1953
+ uvs[_i][_j].x += 0.5;
1954
+ } else {
1955
+ uvs[_i][_j].y *= 0.5;
1956
+ }
1957
+ }
1958
+ }
1959
+
1960
+ this.movieGeometry = new BufferGeometry().fromGeometry(geometry);
1961
+ this.movieMaterial = new MeshBasicMaterial({
1962
+ map: this.videoTexture,
1963
+ overdraw: true,
1964
+ side: BackSide
1965
+ });
1966
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial);
1967
+ this.movieScreen.scale.x = -1;
1968
+ this.movieScreen.quaternion.setFromAxisAngle({
1969
+ x: 0,
1970
+ y: 1,
1971
+ z: 0
1972
+ }, -Math.PI / 2); // display in right eye only
1973
+
1974
+ this.movieScreen.layers.set(2);
1975
+ this.scene.add(this.movieScreen);
1976
+ } else if (projection === '360_CUBE') {
1977
+ this.movieGeometry = new BoxGeometry(256, 256, 256);
1978
+ this.movieMaterial = new MeshBasicMaterial({
1979
+ map: this.videoTexture,
1980
+ overdraw: true,
1981
+ side: BackSide
1982
+ });
1983
+ var left = [new Vector2(0, 0.5), new Vector2(0.333, 0.5), new Vector2(0.333, 1), new Vector2(0, 1)];
1984
+ var right = [new Vector2(0.333, 0.5), new Vector2(0.666, 0.5), new Vector2(0.666, 1), new Vector2(0.333, 1)];
1985
+ var top = [new Vector2(0.666, 0.5), new Vector2(1, 0.5), new Vector2(1, 1), new Vector2(0.666, 1)];
1986
+ var bottom = [new Vector2(0, 0), new Vector2(0.333, 0), new Vector2(0.333, 0.5), new Vector2(0, 0.5)];
1987
+ var front = [new Vector2(0.333, 0), new Vector2(0.666, 0), new Vector2(0.666, 0.5), new Vector2(0.333, 0.5)];
1988
+ var back = [new Vector2(0.666, 0), new Vector2(1, 0), new Vector2(1, 0.5), new Vector2(0.666, 0.5)];
1989
+ this.movieGeometry.faceVertexUvs[0] = [];
1990
+ this.movieGeometry.faceVertexUvs[0][0] = [right[2], right[1], right[3]];
1991
+ this.movieGeometry.faceVertexUvs[0][1] = [right[1], right[0], right[3]];
1992
+ this.movieGeometry.faceVertexUvs[0][2] = [left[2], left[1], left[3]];
1993
+ this.movieGeometry.faceVertexUvs[0][3] = [left[1], left[0], left[3]];
1994
+ this.movieGeometry.faceVertexUvs[0][4] = [top[2], top[1], top[3]];
1995
+ this.movieGeometry.faceVertexUvs[0][5] = [top[1], top[0], top[3]];
1996
+ this.movieGeometry.faceVertexUvs[0][6] = [bottom[2], bottom[1], bottom[3]];
1997
+ this.movieGeometry.faceVertexUvs[0][7] = [bottom[1], bottom[0], bottom[3]];
1998
+ this.movieGeometry.faceVertexUvs[0][8] = [front[2], front[1], front[3]];
1999
+ this.movieGeometry.faceVertexUvs[0][9] = [front[1], front[0], front[3]];
2000
+ this.movieGeometry.faceVertexUvs[0][10] = [back[2], back[1], back[3]];
2001
+ this.movieGeometry.faceVertexUvs[0][11] = [back[1], back[0], back[3]];
2002
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial);
2003
+ this.movieScreen.position.set(position.x, position.y, position.z);
2004
+ this.movieScreen.rotation.y = -Math.PI;
2005
+ this.scene.add(this.movieScreen);
2006
+ } else if (projection === '180' || projection === '180_LR' || projection === '180_MONO') {
2007
+ var _geometry = new SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail, Math.PI, Math.PI); // Left eye view
2008
+
2009
+
2010
+ _geometry.scale(-1, 1, 1);
2011
+
2012
+ var _uvs = _geometry.faceVertexUvs[0];
2013
+
2014
+ if (projection !== '180_MONO') {
2015
+ for (var _i2 = 0; _i2 < _uvs.length; _i2++) {
2016
+ for (var _j2 = 0; _j2 < 3; _j2++) {
2017
+ _uvs[_i2][_j2].x *= 0.5;
2018
+ }
2019
+ }
2020
+ }
2021
+
2022
+ this.movieGeometry = new BufferGeometry().fromGeometry(_geometry);
2023
+ this.movieMaterial = new MeshBasicMaterial({
2024
+ map: this.videoTexture,
2025
+ overdraw: true
2026
+ });
2027
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial); // display in left eye only
2028
+
2029
+ this.movieScreen.layers.set(1);
2030
+ this.scene.add(this.movieScreen); // Right eye view
2031
+
2032
+ _geometry = new SphereGeometry(256, this.options_.sphereDetail, this.options_.sphereDetail, Math.PI, Math.PI);
2033
+
2034
+ _geometry.scale(-1, 1, 1);
2035
+
2036
+ _uvs = _geometry.faceVertexUvs[0];
2037
+
2038
+ for (var _i3 = 0; _i3 < _uvs.length; _i3++) {
2039
+ for (var _j3 = 0; _j3 < 3; _j3++) {
2040
+ _uvs[_i3][_j3].x *= 0.5;
2041
+ _uvs[_i3][_j3].x += 0.5;
2042
+ }
2043
+ }
2044
+
2045
+ this.movieGeometry = new BufferGeometry().fromGeometry(_geometry);
2046
+ this.movieMaterial = new MeshBasicMaterial({
2047
+ map: this.videoTexture,
2048
+ overdraw: true
2049
+ });
2050
+ this.movieScreen = new Mesh(this.movieGeometry, this.movieMaterial); // display in right eye only
2051
+
2052
+ this.movieScreen.layers.set(2);
2053
+ this.scene.add(this.movieScreen);
2054
+ } else if (projection === 'EAC' || projection === 'EAC_LR') {
2055
+ var makeScreen = function makeScreen(mapMatrix, scaleMatrix) {
2056
+ // "Continuity correction?": because of discontinuous faces and aliasing,
2057
+ // we truncate the 2-pixel-wide strips on all discontinuous edges,
2058
+ var contCorrect = 2;
2059
+ _this2.movieGeometry = new BoxGeometry(256, 256, 256);
2060
+ _this2.movieMaterial = new ShaderMaterial({
2061
+ overdraw: true,
2062
+ side: BackSide,
2063
+ uniforms: {
2064
+ mapped: {
2065
+ value: _this2.videoTexture
2066
+ },
2067
+ mapMatrix: {
2068
+ value: mapMatrix
2069
+ },
2070
+ contCorrect: {
2071
+ value: contCorrect
2072
+ },
2073
+ faceWH: {
2074
+ value: new Vector2(1 / 3, 1 / 2).applyMatrix3(scaleMatrix)
2075
+ },
2076
+ vidWH: {
2077
+ value: new Vector2(_this2.videoTexture.image.videoWidth, _this2.videoTexture.image.videoHeight).applyMatrix3(scaleMatrix)
2078
+ }
2079
+ },
2080
+ vertexShader: "\nvarying vec2 vUv;\nuniform mat3 mapMatrix;\n\nvoid main() {\n vUv = (mapMatrix * vec3(uv, 1.)).xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.);\n}",
2081
+ fragmentShader: "\nvarying vec2 vUv;\nuniform sampler2D mapped;\nuniform vec2 faceWH;\nuniform vec2 vidWH;\nuniform float contCorrect;\n\nconst float PI = 3.1415926535897932384626433832795;\n\nvoid main() {\n vec2 corner = vUv - mod(vUv, faceWH) + vec2(0, contCorrect / vidWH.y);\n\n vec2 faceWHadj = faceWH - vec2(0, contCorrect * 2. / vidWH.y);\n\n vec2 p = (vUv - corner) / faceWHadj - .5;\n vec2 q = 2. / PI * atan(2. * p) + .5;\n\n vec2 eUv = corner + q * faceWHadj;\n\n gl_FragColor = texture2D(mapped, eUv);\n}"
2082
+ });
2083
+ var right = [new Vector2(0, 1 / 2), new Vector2(1 / 3, 1 / 2), new Vector2(1 / 3, 1), new Vector2(0, 1)];
2084
+ var front = [new Vector2(1 / 3, 1 / 2), new Vector2(2 / 3, 1 / 2), new Vector2(2 / 3, 1), new Vector2(1 / 3, 1)];
2085
+ var left = [new Vector2(2 / 3, 1 / 2), new Vector2(1, 1 / 2), new Vector2(1, 1), new Vector2(2 / 3, 1)];
2086
+ var bottom = [new Vector2(1 / 3, 0), new Vector2(1 / 3, 1 / 2), new Vector2(0, 1 / 2), new Vector2(0, 0)];
2087
+ var back = [new Vector2(1 / 3, 1 / 2), new Vector2(1 / 3, 0), new Vector2(2 / 3, 0), new Vector2(2 / 3, 1 / 2)];
2088
+ var top = [new Vector2(1, 0), new Vector2(1, 1 / 2), new Vector2(2 / 3, 1 / 2), new Vector2(2 / 3, 0)];
2089
+
2090
+ for (var _i4 = 0, _arr = [right, front, left, bottom, back, top]; _i4 < _arr.length; _i4++) {
2091
+ var face = _arr[_i4];
2092
+ var height = _this2.videoTexture.image.videoHeight;
2093
+ var lowY = 1;
2094
+ var highY = 0;
2095
+
2096
+ for (var _iterator = _createForOfIteratorHelperLoose(face), _step; !(_step = _iterator()).done;) {
2097
+ var vector = _step.value;
2098
+
2099
+ if (vector.y < lowY) {
2100
+ lowY = vector.y;
2101
+ }
2102
+
2103
+ if (vector.y > highY) {
2104
+ highY = vector.y;
2105
+ }
2106
+ }
2107
+
2108
+ for (var _iterator2 = _createForOfIteratorHelperLoose(face), _step2; !(_step2 = _iterator2()).done;) {
2109
+ var _vector = _step2.value;
2110
+
2111
+ if (Math.abs(_vector.y - lowY) < Number.EPSILON) {
2112
+ _vector.y += contCorrect / height;
2113
+ }
2114
+
2115
+ if (Math.abs(_vector.y - highY) < Number.EPSILON) {
2116
+ _vector.y -= contCorrect / height;
2117
+ }
2118
+
2119
+ _vector.x = _vector.x / height * (height - contCorrect * 2) + contCorrect / height;
2120
+ }
2121
+ }
2122
+
2123
+ _this2.movieGeometry.faceVertexUvs[0] = [];
2124
+ _this2.movieGeometry.faceVertexUvs[0][0] = [right[2], right[1], right[3]];
2125
+ _this2.movieGeometry.faceVertexUvs[0][1] = [right[1], right[0], right[3]];
2126
+ _this2.movieGeometry.faceVertexUvs[0][2] = [left[2], left[1], left[3]];
2127
+ _this2.movieGeometry.faceVertexUvs[0][3] = [left[1], left[0], left[3]];
2128
+ _this2.movieGeometry.faceVertexUvs[0][4] = [top[2], top[1], top[3]];
2129
+ _this2.movieGeometry.faceVertexUvs[0][5] = [top[1], top[0], top[3]];
2130
+ _this2.movieGeometry.faceVertexUvs[0][6] = [bottom[2], bottom[1], bottom[3]];
2131
+ _this2.movieGeometry.faceVertexUvs[0][7] = [bottom[1], bottom[0], bottom[3]];
2132
+ _this2.movieGeometry.faceVertexUvs[0][8] = [front[2], front[1], front[3]];
2133
+ _this2.movieGeometry.faceVertexUvs[0][9] = [front[1], front[0], front[3]];
2134
+ _this2.movieGeometry.faceVertexUvs[0][10] = [back[2], back[1], back[3]];
2135
+ _this2.movieGeometry.faceVertexUvs[0][11] = [back[1], back[0], back[3]];
2136
+ _this2.movieScreen = new Mesh(_this2.movieGeometry, _this2.movieMaterial);
2137
+
2138
+ _this2.movieScreen.position.set(position.x, position.y, position.z);
2139
+
2140
+ _this2.movieScreen.rotation.y = -Math.PI;
2141
+ return _this2.movieScreen;
2142
+ };
2143
+
2144
+ if (projection === 'EAC') {
2145
+ this.scene.add(makeScreen(new Matrix3(), new Matrix3()));
2146
+ } else {
2147
+ var scaleMatrix = new Matrix3().set(0, 0.5, 0, 1, 0, 0, 0, 0, 1);
2148
+ makeScreen(new Matrix3().set(0, -0.5, 0.5, 1, 0, 0, 0, 0, 1), scaleMatrix); // display in left eye only
2149
+
2150
+ this.movieScreen.layers.set(1);
2151
+ this.scene.add(this.movieScreen);
2152
+ makeScreen(new Matrix3().set(0, -0.5, 1, 1, 0, 0, 0, 0, 1), scaleMatrix); // display in right eye only
2153
+
2154
+ this.movieScreen.layers.set(2);
2155
+ this.scene.add(this.movieScreen);
2156
+ }
2157
+ }
2158
+
2159
+ this.currentProjection_ = projection;
2160
+ };
2161
+
2162
+ _proto.triggerError_ = function triggerError_(errorObj) {
2163
+ // if we have videojs-errors use it
2164
+ if (this.videojsErrorsSupport_) {
2165
+ this.player_.error(errorObj); // if we don't have videojs-errors just use a normal player error
2166
+ } else {
2167
+ // strip any html content from the error message
2168
+ // as it is not supported outside of videojs-errors
2169
+ var div = document$1.createElement('div');
2170
+ div.innerHTML = errors[errorObj.code].message;
2171
+ var message = div.textContent || div.innerText || '';
2172
+ this.player_.error({
2173
+ code: errorObj.code,
2174
+ message: message
2175
+ });
2176
+ }
2177
+ };
2178
+
2179
+ _proto.log = function log() {
2180
+ if (!this.options_.debug) {
2181
+ return;
2182
+ }
2183
+
2184
+ for (var _len = arguments.length, msgs = new Array(_len), _key = 0; _key < _len; _key++) {
2185
+ msgs[_key] = arguments[_key];
2186
+ }
2187
+
2188
+ msgs.forEach(function (msg) {
2189
+ videojs.log('VR: ', msg);
2190
+ });
2191
+ };
2192
+
2193
+ _proto.handleVrDisplayActivate_ = function handleVrDisplayActivate_() {
2194
+ var _this3 = this;
2195
+
2196
+ if (!this.vrDisplay) {
2197
+ return;
2198
+ }
2199
+
2200
+ this.vrDisplay.requestPresent([{
2201
+ source: this.renderedCanvas
2202
+ }]).then(function () {
2203
+ if (!_this3.vrDisplay.cardboardUI_ || !videojs.browser.IS_IOS) {
2204
+ return;
2205
+ } // webvr-polyfill/cardboard ui only watches for click events
2206
+ // to tell that the back arrow button is pressed during cardboard vr.
2207
+ // but somewhere along the line these events are silenced with preventDefault
2208
+ // but only on iOS, so we translate them ourselves here
2209
+
2210
+
2211
+ var touches = [];
2212
+
2213
+ var iosCardboardTouchStart_ = function iosCardboardTouchStart_(e) {
2214
+ for (var i = 0; i < e.touches.length; i++) {
2215
+ touches.push(e.touches[i]);
2216
+ }
2217
+ };
2218
+
2219
+ var iosCardboardTouchEnd_ = function iosCardboardTouchEnd_(e) {
2220
+ if (!touches.length) {
2221
+ return;
2222
+ }
2223
+
2224
+ touches.forEach(function (t) {
2225
+ var simulatedClick = new window$1.MouseEvent('click', {
2226
+ screenX: t.screenX,
2227
+ screenY: t.screenY,
2228
+ clientX: t.clientX,
2229
+ clientY: t.clientY
2230
+ });
2231
+
2232
+ _this3.renderedCanvas.dispatchEvent(simulatedClick);
2233
+ });
2234
+ touches = [];
2235
+ };
2236
+
2237
+ _this3.renderedCanvas.addEventListener('touchstart', iosCardboardTouchStart_);
2238
+
2239
+ _this3.renderedCanvas.addEventListener('touchend', iosCardboardTouchEnd_);
2240
+
2241
+ _this3.iosRevertTouchToClick_ = function () {
2242
+ _this3.renderedCanvas.removeEventListener('touchstart', iosCardboardTouchStart_);
2243
+
2244
+ _this3.renderedCanvas.removeEventListener('touchend', iosCardboardTouchEnd_);
2245
+
2246
+ _this3.iosRevertTouchToClick_ = null;
2247
+ };
2248
+ });
2249
+ };
2250
+
2251
+ _proto.handleVrDisplayDeactivate_ = function handleVrDisplayDeactivate_() {
2252
+ if (!this.vrDisplay || !this.vrDisplay.isPresenting) {
2253
+ return;
2254
+ }
2255
+
2256
+ if (this.iosRevertTouchToClick_) {
2257
+ this.iosRevertTouchToClick_();
2258
+ }
2259
+
2260
+ this.vrDisplay.exitPresent();
2261
+ };
2262
+
2263
+ _proto.requestAnimationFrame = function requestAnimationFrame(fn) {
2264
+ if (this.vrDisplay) {
2265
+ return this.vrDisplay.requestAnimationFrame(fn);
2266
+ }
2267
+
2268
+ return this.player_.requestAnimationFrame(fn);
2269
+ };
2270
+
2271
+ _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {
2272
+ if (this.vrDisplay) {
2273
+ return this.vrDisplay.cancelAnimationFrame(id);
2274
+ }
2275
+
2276
+ return this.player_.cancelAnimationFrame(id);
2277
+ };
2278
+
2279
+ _proto.togglePlay_ = function togglePlay_() {
2280
+ if (this.player_.paused()) {
2281
+ this.player_.play();
2282
+ } else {
2283
+ this.player_.pause();
2284
+ }
2285
+ };
2286
+
2287
+ _proto.animate_ = function animate_() {
2288
+ if (!this.initialized_) {
2289
+ return;
2290
+ }
2291
+
2292
+ if (this.getVideoEl_().readyState === this.getVideoEl_().HAVE_ENOUGH_DATA) {
2293
+ if (this.videoTexture) {
2294
+ this.videoTexture.needsUpdate = true;
2295
+ }
2296
+ }
2297
+
2298
+ this.controls3d.update();
2299
+
2300
+ if (this.omniController) {
2301
+ this.omniController.update(this.camera);
2302
+ }
2303
+
2304
+ this.effect.render(this.scene, this.camera);
2305
+
2306
+ if (window$1.navigator.getGamepads) {
2307
+ // Grab all gamepads
2308
+ var gamepads = window$1.navigator.getGamepads();
2309
+
2310
+ for (var i = 0; i < gamepads.length; ++i) {
2311
+ var gamepad = gamepads[i]; // Make sure gamepad is defined
2312
+ // Only take input if state has changed since we checked last
2313
+
2314
+ if (!gamepad || !gamepad.timestamp || gamepad.timestamp === this.prevTimestamps_[i]) {
2315
+ continue;
2316
+ }
2317
+
2318
+ for (var j = 0; j < gamepad.buttons.length; ++j) {
2319
+ if (gamepad.buttons[j].pressed) {
2320
+ this.togglePlay_();
2321
+ this.prevTimestamps_[i] = gamepad.timestamp;
2322
+ break;
2323
+ }
2324
+ }
2325
+ }
2326
+ }
2327
+
2328
+ this.camera.getWorldDirection(this.cameraVector);
2329
+ this.animationFrameId_ = this.requestAnimationFrame(this.animate_);
2330
+ };
2331
+
2332
+ _proto.handleResize_ = function handleResize_() {
2333
+ var width = this.player_.currentWidth();
2334
+ var height = this.player_.currentHeight();
2335
+ this.effect.setSize(width, height, false);
2336
+ this.camera.aspect = width / height;
2337
+ this.camera.updateProjectionMatrix();
2338
+ };
2339
+
2340
+ _proto.setProjection = function setProjection(projection) {
2341
+ if (!getInternalProjectionName(projection)) {
2342
+ videojs.log.error('videojs-vr: please pass a valid projection ' + validProjections.join(', '));
2343
+ return;
2344
+ }
2345
+
2346
+ this.currentProjection_ = projection;
2347
+ this.defaultProjection_ = projection;
2348
+ };
2349
+
2350
+ _proto.init = function init() {
2351
+ var _this4 = this;
2352
+
2353
+ this.reset();
2354
+ this.camera = new PerspectiveCamera(75, this.player_.currentWidth() / this.player_.currentHeight(), 1, 1000); // Store vector representing the direction in which the camera is looking, in world space.
2355
+
2356
+ this.cameraVector = new Vector3();
2357
+
2358
+ if (this.currentProjection_ === '360_LR' || this.currentProjection_ === '360_TB' || this.currentProjection_ === '180' || this.currentProjection_ === '180_LR' || this.currentProjection_ === '180_MONO' || this.currentProjection_ === 'EAC_LR') {
2359
+ // Render left eye when not in VR mode
2360
+ this.camera.layers.enable(1);
2361
+ }
2362
+
2363
+ this.scene = new Scene();
2364
+ this.videoTexture = new VideoTexture(this.getVideoEl_()); // shared regardless of wether VideoTexture is used or
2365
+ // an image canvas is used
2366
+
2367
+ this.videoTexture.generateMipmaps = false;
2368
+ this.videoTexture.minFilter = LinearFilter;
2369
+ this.videoTexture.magFilter = LinearFilter;
2370
+ this.videoTexture.format = RGBFormat;
2371
+ this.changeProjection_(this.currentProjection_);
2372
+
2373
+ if (this.currentProjection_ === 'NONE') {
2374
+ this.log('Projection is NONE, dont init');
2375
+ this.reset();
2376
+ return;
2377
+ }
2378
+
2379
+ this.player_.removeChild('BigPlayButton');
2380
+ this.player_.addChild('BigVrPlayButton', {}, this.bigPlayButtonIndex_);
2381
+ this.player_.bigPlayButton = this.player_.getChild('BigVrPlayButton'); // mobile devices, or cardboard forced to on
2382
+
2383
+ if (this.options_.forceCardboard || videojs.browser.IS_ANDROID || videojs.browser.IS_IOS) {
2384
+ this.addCardboardButton_();
2385
+ } // if ios remove full screen toggle
2386
+
2387
+
2388
+ if (videojs.browser.IS_IOS && this.player_.controlBar && this.player_.controlBar.fullscreenToggle) {
2389
+ this.player_.controlBar.fullscreenToggle.hide();
2390
+ }
2391
+
2392
+ this.camera.position.set(0, 0, 0);
2393
+ this.renderer = new WebGLRenderer({
2394
+ devicePixelRatio: window$1.devicePixelRatio,
2395
+ alpha: false,
2396
+ clearColor: 0xffffff,
2397
+ antialias: true
2398
+ });
2399
+ var webglContext = this.renderer.getContext('webgl');
2400
+ var oldTexImage2D = webglContext.texImage2D;
2401
+ /* this is a workaround since threejs uses try catch */
2402
+
2403
+ webglContext.texImage2D = function () {
2404
+ try {
2405
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2406
+ args[_key2] = arguments[_key2];
2407
+ }
2408
+
2409
+ return oldTexImage2D.apply(webglContext, args);
2410
+ } catch (e) {
2411
+ _this4.reset();
2412
+
2413
+ _this4.player_.pause();
2414
+
2415
+ _this4.triggerError_({
2416
+ code: 'web-vr-hls-cors-not-supported',
2417
+ dismiss: false
2418
+ });
2419
+
2420
+ throw new Error(e);
2421
+ }
2422
+ };
2423
+
2424
+ this.renderer.setSize(this.player_.currentWidth(), this.player_.currentHeight(), false);
2425
+ this.effect = new VREffect(this.renderer);
2426
+ this.effect.setSize(this.player_.currentWidth(), this.player_.currentHeight(), false);
2427
+ this.vrDisplay = null; // Previous timestamps for gamepad updates
2428
+
2429
+ this.prevTimestamps_ = [];
2430
+ this.renderedCanvas = this.renderer.domElement;
2431
+ this.renderedCanvas.setAttribute('style', 'width: 100%; height: 100%; position: absolute; top:0;');
2432
+ var videoElStyle = this.getVideoEl_().style;
2433
+ this.player_.el().insertBefore(this.renderedCanvas, this.player_.el().firstChild);
2434
+ videoElStyle.zIndex = '-1';
2435
+ videoElStyle.opacity = '0';
2436
+
2437
+ if (window$1.navigator.getVRDisplays) {
2438
+ this.log('is supported, getting vr displays');
2439
+ window$1.navigator.getVRDisplays().then(function (displays) {
2440
+ if (displays.length > 0) {
2441
+ _this4.log('Displays found', displays);
2442
+
2443
+ _this4.vrDisplay = displays[0]; // Native WebVR Head Mounted Displays (HMDs) like the HTC Vive
2444
+ // also need the cardboard button to enter fully immersive mode
2445
+ // so, we want to add the button if we're not polyfilled.
2446
+
2447
+ if (!_this4.vrDisplay.isPolyfilled) {
2448
+ _this4.log('Real HMD found using VRControls', _this4.vrDisplay);
2449
+
2450
+ _this4.addCardboardButton_(); // We use VRControls here since we are working with an HMD
2451
+ // and we only want orientation controls.
2452
+
2453
+
2454
+ _this4.controls3d = new VRControls(_this4.camera);
2455
+ }
2456
+ }
2457
+
2458
+ if (!_this4.controls3d) {
2459
+ _this4.log('no HMD found Using Orbit & Orientation Controls');
2460
+
2461
+ var options = {
2462
+ camera: _this4.camera,
2463
+ canvas: _this4.renderedCanvas,
2464
+ // check if its a half sphere view projection
2465
+ halfView: _this4.currentProjection_.indexOf('180') === 0,
2466
+ orientation: videojs.browser.IS_IOS || videojs.browser.IS_ANDROID || false
2467
+ };
2468
+
2469
+ if (_this4.options_.motionControls === false) {
2470
+ options.orientation = false;
2471
+ }
2472
+
2473
+ _this4.controls3d = new OrbitOrientationControls(options);
2474
+ _this4.canvasPlayerControls = new CanvasPlayerControls(_this4.player_, _this4.renderedCanvas, _this4.options_);
2475
+ }
2476
+
2477
+ _this4.animationFrameId_ = _this4.requestAnimationFrame(_this4.animate_);
2478
+ });
2479
+ } else if (window$1.navigator.getVRDevices) {
2480
+ this.triggerError_({
2481
+ code: 'web-vr-out-of-date',
2482
+ dismiss: false
2483
+ });
2484
+ } else {
2485
+ this.triggerError_({
2486
+ code: 'web-vr-not-supported',
2487
+ dismiss: false
2488
+ });
2489
+ }
2490
+
2491
+ if (this.options_.omnitone) {
2492
+ var audiocontext = AudioContext.getContext();
2493
+ this.omniController = new OmnitoneController(audiocontext, this.options_.omnitone, this.getVideoEl_(), this.options_.omnitoneOptions);
2494
+ this.omniController.one('audiocontext-suspended', function () {
2495
+ _this4.player.pause();
2496
+
2497
+ _this4.player.one('playing', function () {
2498
+ audiocontext.resume();
2499
+ });
2500
+ });
2501
+ }
2502
+
2503
+ this.on(this.player_, 'fullscreenchange', this.handleResize_);
2504
+ window$1.addEventListener('vrdisplaypresentchange', this.handleResize_, true);
2505
+ window$1.addEventListener('resize', this.handleResize_, true);
2506
+ window$1.addEventListener('vrdisplayactivate', this.handleVrDisplayActivate_, true);
2507
+ window$1.addEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_, true);
2508
+ this.initialized_ = true;
2509
+ this.trigger('initialized');
2510
+ };
2511
+
2512
+ _proto.addCardboardButton_ = function addCardboardButton_() {
2513
+ if (!this.player_.controlBar.getChild('CardboardButton')) {
2514
+ this.player_.controlBar.addChild('CardboardButton', {});
2515
+ }
2516
+ };
2517
+
2518
+ _proto.getVideoEl_ = function getVideoEl_() {
2519
+ return this.player_.el().getElementsByTagName('video')[0];
2520
+ };
2521
+
2522
+ _proto.reset = function reset() {
2523
+ if (!this.initialized_) {
2524
+ return;
2525
+ }
2526
+
2527
+ if (this.omniController) {
2528
+ this.omniController.off('audiocontext-suspended');
2529
+ this.omniController.dispose();
2530
+ this.omniController = undefined;
2531
+ }
2532
+
2533
+ if (this.controls3d) {
2534
+ this.controls3d.dispose();
2535
+ this.controls3d = null;
2536
+ }
2537
+
2538
+ if (this.canvasPlayerControls) {
2539
+ this.canvasPlayerControls.dispose();
2540
+ this.canvasPlayerControls = null;
2541
+ }
2542
+
2543
+ if (this.effect) {
2544
+ this.effect.dispose();
2545
+ this.effect = null;
2546
+ }
2547
+
2548
+ window$1.removeEventListener('resize', this.handleResize_, true);
2549
+ window$1.removeEventListener('vrdisplaypresentchange', this.handleResize_, true);
2550
+ window$1.removeEventListener('vrdisplayactivate', this.handleVrDisplayActivate_, true);
2551
+ window$1.removeEventListener('vrdisplaydeactivate', this.handleVrDisplayDeactivate_, true); // re-add the big play button to player
2552
+
2553
+ if (!this.player_.getChild('BigPlayButton')) {
2554
+ this.player_.addChild('BigPlayButton', {}, this.bigPlayButtonIndex_);
2555
+ }
2556
+
2557
+ if (this.player_.getChild('BigVrPlayButton')) {
2558
+ this.player_.removeChild('BigVrPlayButton');
2559
+ } // remove the cardboard button
2560
+
2561
+
2562
+ if (this.player_.getChild('CardboardButton')) {
2563
+ this.player_.controlBar.removeChild('CardboardButton');
2564
+ } // show the fullscreen again
2565
+
2566
+
2567
+ if (videojs.browser.IS_IOS && this.player_.controlBar && this.player_.controlBar.fullscreenToggle) {
2568
+ this.player_.controlBar.fullscreenToggle.show();
2569
+ } // reset the video element style so that it will be displayed
2570
+
2571
+
2572
+ var videoElStyle = this.getVideoEl_().style;
2573
+ videoElStyle.zIndex = '';
2574
+ videoElStyle.opacity = ''; // set the current projection to the default
2575
+
2576
+ this.currentProjection_ = this.defaultProjection_; // reset the ios touch to click workaround
2577
+
2578
+ if (this.iosRevertTouchToClick_) {
2579
+ this.iosRevertTouchToClick_();
2580
+ } // remove the old canvas
2581
+
2582
+
2583
+ if (this.renderedCanvas) {
2584
+ this.renderedCanvas.parentNode.removeChild(this.renderedCanvas);
2585
+ }
2586
+
2587
+ if (this.animationFrameId_) {
2588
+ this.cancelAnimationFrame(this.animationFrameId_);
2589
+ }
2590
+
2591
+ this.initialized_ = false;
2592
+ };
2593
+
2594
+ _proto.dispose = function dispose() {
2595
+ _Plugin.prototype.dispose.call(this);
2596
+
2597
+ this.reset();
2598
+ };
2599
+
2600
+ _proto.polyfillVersion = function polyfillVersion() {
2601
+ return WebVRPolyfill.version;
2602
+ };
2603
+
2604
+ return VR;
2605
+ }(Plugin);
2606
+
2607
+ VR.prototype.setTimeout = Component.prototype.setTimeout;
2608
+ VR.prototype.clearTimeout = Component.prototype.clearTimeout;
2609
+ VR.VERSION = version;
2610
+ videojs.registerPlugin('vr', VR);
2611
+
2612
+ export default VR;
public/lib/videojs-vr/videojs-vr.js ADDED
@@ -0,0 +1,52745 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! @name videojs-vr @version 1.7.2 @license Apache-2.0 */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('global/window'), require('global/document'), require('video.js')) :
4
+ typeof define === 'function' && define.amd ? define(['global/window', 'global/document', 'video.js'], factory) :
5
+ (global = global || self, global.videojsVr = factory(global.window, global.document, global.videojs));
6
+ }(this, (function (window$1, document$1, videojs) {
7
+ 'use strict';
8
+
9
+ window$1 = window$1 && window$1.hasOwnProperty('default') ? window$1['default'] : window$1;
10
+ document$1 = document$1 && document$1.hasOwnProperty('default') ? document$1['default'] : document$1;
11
+ videojs = videojs && videojs.hasOwnProperty('default') ? videojs['default'] : videojs;
12
+
13
+ function _assertThisInitialized(self) {
14
+ if (self === void 0) {
15
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16
+ }
17
+
18
+ return self;
19
+ }
20
+
21
+ var assertThisInitialized = _assertThisInitialized;
22
+
23
+ function _inheritsLoose(subClass, superClass) {
24
+ subClass.prototype = Object.create(superClass.prototype);
25
+ subClass.prototype.constructor = subClass;
26
+ subClass.__proto__ = superClass;
27
+ }
28
+
29
+ var inheritsLoose = _inheritsLoose;
30
+
31
+ var version = "1.7.2";
32
+
33
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
34
+
35
+ function unwrapExports(x) {
36
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
37
+ }
38
+
39
+ function createCommonjsModule(fn, module) {
40
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
41
+ }
42
+
43
+ var webvrPolyfill = createCommonjsModule(function (module, exports) {
44
+ /**
45
+ * @license
46
+ * webvr-polyfill
47
+ * Copyright (c) 2015-2017 Google
48
+ * Licensed under the Apache License, Version 2.0 (the "License");
49
+ * you may not use this file except in compliance with the License.
50
+ * You may obtain a copy of the License at
51
+ *
52
+ * http://www.apache.org/licenses/LICENSE-2.0
53
+ *
54
+ * Unless required by applicable law or agreed to in writing, software
55
+ * distributed under the License is distributed on an "AS IS" BASIS,
56
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
57
+ * See the License for the specific language governing permissions and
58
+ * limitations under the License.
59
+ */
60
+
61
+ /**
62
+ * @license
63
+ * cardboard-vr-display
64
+ * Copyright (c) 2015-2017 Google
65
+ * Licensed under the Apache License, Version 2.0 (the "License");
66
+ * you may not use this file except in compliance with the License.
67
+ * You may obtain a copy of the License at
68
+ *
69
+ * http://www.apache.org/licenses/LICENSE-2.0
70
+ *
71
+ * Unless required by applicable law or agreed to in writing, software
72
+ * distributed under the License is distributed on an "AS IS" BASIS,
73
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
+ * See the License for the specific language governing permissions and
75
+ * limitations under the License.
76
+ */
77
+
78
+ /**
79
+ * @license
80
+ * webvr-polyfill-dpdb
81
+ * Copyright (c) 2017 Google
82
+ * Licensed under the Apache License, Version 2.0 (the "License");
83
+ * you may not use this file except in compliance with the License.
84
+ * You may obtain a copy of the License at
85
+ *
86
+ * http://www.apache.org/licenses/LICENSE-2.0
87
+ *
88
+ * Unless required by applicable law or agreed to in writing, software
89
+ * distributed under the License is distributed on an "AS IS" BASIS,
90
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
91
+ * See the License for the specific language governing permissions and
92
+ * limitations under the License.
93
+ */
94
+
95
+ /**
96
+ * @license
97
+ * wglu-preserve-state
98
+ * Copyright (c) 2016, Brandon Jones.
99
+ *
100
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
101
+ * of this software and associated documentation files (the "Software"), to deal
102
+ * in the Software without restriction, including without limitation the rights
103
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
104
+ * copies of the Software, and to permit persons to whom the Software is
105
+ * furnished to do so, subject to the following conditions:
106
+ *
107
+ * The above copyright notice and this permission notice shall be included in
108
+ * all copies or substantial portions of the Software.
109
+ *
110
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
111
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
112
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
113
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
114
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
115
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
116
+ * THE SOFTWARE.
117
+ */
118
+
119
+ /**
120
+ * @license
121
+ * nosleep.js
122
+ * Copyright (c) 2017, Rich Tibbett
123
+ *
124
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
125
+ * of this software and associated documentation files (the "Software"), to deal
126
+ * in the Software without restriction, including without limitation the rights
127
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
128
+ * copies of the Software, and to permit persons to whom the Software is
129
+ * furnished to do so, subject to the following conditions:
130
+ *
131
+ * The above copyright notice and this permission notice shall be included in
132
+ * all copies or substantial portions of the Software.
133
+ *
134
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
135
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
136
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
137
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
138
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
139
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
140
+ * THE SOFTWARE.
141
+ */
142
+
143
+ (function (global, factory) {
144
+ module.exports = factory();
145
+ }(commonjsGlobal, (function () {
146
+ var commonjsGlobal$1 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {};
147
+
148
+
149
+
150
+ function unwrapExports(x) {
151
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
152
+ }
153
+
154
+ function createCommonjsModule(fn, module) {
155
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
156
+ }
157
+
158
+ var race = function race(promises) {
159
+ if (Promise.race) {
160
+ return Promise.race(promises);
161
+ }
162
+ return new Promise(function (resolve, reject) {
163
+ for (var i = 0; i < promises.length; i++) {
164
+ promises[i].then(resolve, reject);
165
+ }
166
+ });
167
+ };
168
+
169
+ var isMobile = function isMobile() {
170
+ return (/Android/i.test(navigator.userAgent) || /iPhone|iPad|iPod/i.test(navigator.userAgent)
171
+ );
172
+ };
173
+ var copyArray = function copyArray(source, dest) {
174
+ for (var i = 0, n = source.length; i < n; i++) {
175
+ dest[i] = source[i];
176
+ }
177
+ };
178
+ var extend = function extend(dest, src) {
179
+ for (var key in src) {
180
+ if (src.hasOwnProperty(key)) {
181
+ dest[key] = src[key];
182
+ }
183
+ }
184
+ return dest;
185
+ };
186
+
187
+ var cardboardVrDisplay = createCommonjsModule(function (module, exports) {
188
+ /**
189
+ * @license
190
+ * cardboard-vr-display
191
+ * Copyright (c) 2015-2017 Google
192
+ * Licensed under the Apache License, Version 2.0 (the "License");
193
+ * you may not use this file except in compliance with the License.
194
+ * You may obtain a copy of the License at
195
+ *
196
+ * http://www.apache.org/licenses/LICENSE-2.0
197
+ *
198
+ * Unless required by applicable law or agreed to in writing, software
199
+ * distributed under the License is distributed on an "AS IS" BASIS,
200
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ * See the License for the specific language governing permissions and
202
+ * limitations under the License.
203
+ */
204
+ /**
205
+ * @license
206
+ * gl-preserve-state
207
+ * Copyright (c) 2016, Brandon Jones.
208
+ *
209
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
210
+ * of this software and associated documentation files (the "Software"), to deal
211
+ * in the Software without restriction, including without limitation the rights
212
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
213
+ * copies of the Software, and to permit persons to whom the Software is
214
+ * furnished to do so, subject to the following conditions:
215
+ *
216
+ * The above copyright notice and this permission notice shall be included in
217
+ * all copies or substantial portions of the Software.
218
+ *
219
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
220
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
221
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
222
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
223
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
224
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
225
+ * THE SOFTWARE.
226
+ */
227
+ /**
228
+ * @license
229
+ * webvr-polyfill-dpdb
230
+ * Copyright (c) 2015-2017 Google
231
+ * Licensed under the Apache License, Version 2.0 (the "License");
232
+ * you may not use this file except in compliance with the License.
233
+ * You may obtain a copy of the License at
234
+ *
235
+ * http://www.apache.org/licenses/LICENSE-2.0
236
+ *
237
+ * Unless required by applicable law or agreed to in writing, software
238
+ * distributed under the License is distributed on an "AS IS" BASIS,
239
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240
+ * See the License for the specific language governing permissions and
241
+ * limitations under the License.
242
+ */
243
+ /**
244
+ * @license
245
+ * nosleep.js
246
+ * Copyright (c) 2017, Rich Tibbett
247
+ *
248
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
249
+ * of this software and associated documentation files (the "Software"), to deal
250
+ * in the Software without restriction, including without limitation the rights
251
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
252
+ * copies of the Software, and to permit persons to whom the Software is
253
+ * furnished to do so, subject to the following conditions:
254
+ *
255
+ * The above copyright notice and this permission notice shall be included in
256
+ * all copies or substantial portions of the Software.
257
+ *
258
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
259
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
260
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
261
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
262
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
263
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
264
+ * THE SOFTWARE.
265
+ */
266
+ (function (global, factory) {
267
+ module.exports = factory();
268
+ }(commonjsGlobal$1, (function () {
269
+ var classCallCheck = function (instance, Constructor) {
270
+ if (!(instance instanceof Constructor)) {
271
+ throw new TypeError("Cannot call a class as a function");
272
+ }
273
+ };
274
+ var createClass = function () {
275
+ function defineProperties(target, props) {
276
+ for (var i = 0; i < props.length; i++) {
277
+ var descriptor = props[i];
278
+ descriptor.enumerable = descriptor.enumerable || false;
279
+ descriptor.configurable = true;
280
+ if ("value" in descriptor) descriptor.writable = true;
281
+ Object.defineProperty(target, descriptor.key, descriptor);
282
+ }
283
+ }
284
+ return function (Constructor, protoProps, staticProps) {
285
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
286
+ if (staticProps) defineProperties(Constructor, staticProps);
287
+ return Constructor;
288
+ };
289
+ }();
290
+ var slicedToArray = function () {
291
+ function sliceIterator(arr, i) {
292
+ var _arr = [];
293
+ var _n = true;
294
+ var _d = false;
295
+ var _e = undefined;
296
+ try {
297
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
298
+ _arr.push(_s.value);
299
+ if (i && _arr.length === i) break;
300
+ }
301
+ } catch (err) {
302
+ _d = true;
303
+ _e = err;
304
+ } finally {
305
+ try {
306
+ if (!_n && _i["return"]) _i["return"]();
307
+ } finally {
308
+ if (_d) throw _e;
309
+ }
310
+ }
311
+ return _arr;
312
+ }
313
+ return function (arr, i) {
314
+ if (Array.isArray(arr)) {
315
+ return arr;
316
+ } else if (Symbol.iterator in Object(arr)) {
317
+ return sliceIterator(arr, i);
318
+ } else {
319
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
320
+ }
321
+ };
322
+ }();
323
+ var MIN_TIMESTEP = 0.001;
324
+ var MAX_TIMESTEP = 1;
325
+ var base64 = function base64(mimeType, _base) {
326
+ return 'data:' + mimeType + ';base64,' + _base;
327
+ };
328
+ var lerp = function lerp(a, b, t) {
329
+ return a + (b - a) * t;
330
+ };
331
+ var isIOS = function () {
332
+ var isIOS = /iPad|iPhone|iPod/.test(navigator.platform);
333
+ return function () {
334
+ return isIOS;
335
+ };
336
+ }();
337
+ var isWebViewAndroid = function () {
338
+ var isWebViewAndroid = navigator.userAgent.indexOf('Version') !== -1 && navigator.userAgent.indexOf('Android') !== -1 && navigator.userAgent.indexOf('Chrome') !== -1;
339
+ return function () {
340
+ return isWebViewAndroid;
341
+ };
342
+ }();
343
+ var isSafari = function () {
344
+ var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
345
+ return function () {
346
+ return isSafari;
347
+ };
348
+ }();
349
+ var isFirefoxAndroid = function () {
350
+ var isFirefoxAndroid = navigator.userAgent.indexOf('Firefox') !== -1 && navigator.userAgent.indexOf('Android') !== -1;
351
+ return function () {
352
+ return isFirefoxAndroid;
353
+ };
354
+ }();
355
+ var getChromeVersion = function () {
356
+ var match = navigator.userAgent.match(/.*Chrome\/([0-9]+)/);
357
+ var value = match ? parseInt(match[1], 10) : null;
358
+ return function () {
359
+ return value;
360
+ };
361
+ }();
362
+ var isChromeWithoutDeviceMotion = function () {
363
+ var value = false;
364
+ if (getChromeVersion() === 65) {
365
+ var match = navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);
366
+ if (match) {
367
+ var _match$1$split = match[1].split('.'),
368
+ _match$1$split2 = slicedToArray(_match$1$split, 4),
369
+ major = _match$1$split2[0],
370
+ minor = _match$1$split2[1],
371
+ branch = _match$1$split2[2],
372
+ build = _match$1$split2[3];
373
+ value = parseInt(branch, 10) === 3325 && parseInt(build, 10) < 148;
374
+ }
375
+ }
376
+ return function () {
377
+ return value;
378
+ };
379
+ }();
380
+ var isR7 = function () {
381
+ var isR7 = navigator.userAgent.indexOf('R7 Build') !== -1;
382
+ return function () {
383
+ return isR7;
384
+ };
385
+ }();
386
+ var isLandscapeMode = function isLandscapeMode() {
387
+ var rtn = window.orientation == 90 || window.orientation == -90;
388
+ return isR7() ? !rtn : rtn;
389
+ };
390
+ var isTimestampDeltaValid = function isTimestampDeltaValid(timestampDeltaS) {
391
+ if (isNaN(timestampDeltaS)) {
392
+ return false;
393
+ }
394
+ if (timestampDeltaS <= MIN_TIMESTEP) {
395
+ return false;
396
+ }
397
+ if (timestampDeltaS > MAX_TIMESTEP) {
398
+ return false;
399
+ }
400
+ return true;
401
+ };
402
+ var getScreenWidth = function getScreenWidth() {
403
+ return Math.max(window.screen.width, window.screen.height) * window.devicePixelRatio;
404
+ };
405
+ var getScreenHeight = function getScreenHeight() {
406
+ return Math.min(window.screen.width, window.screen.height) * window.devicePixelRatio;
407
+ };
408
+ var requestFullscreen = function requestFullscreen(element) {
409
+ if (isWebViewAndroid()) {
410
+ return false;
411
+ }
412
+ if (element.requestFullscreen) {
413
+ element.requestFullscreen();
414
+ } else if (element.webkitRequestFullscreen) {
415
+ element.webkitRequestFullscreen();
416
+ } else if (element.mozRequestFullScreen) {
417
+ element.mozRequestFullScreen();
418
+ } else if (element.msRequestFullscreen) {
419
+ element.msRequestFullscreen();
420
+ } else {
421
+ return false;
422
+ }
423
+ return true;
424
+ };
425
+ var exitFullscreen = function exitFullscreen() {
426
+ if (document.exitFullscreen) {
427
+ document.exitFullscreen();
428
+ } else if (document.webkitExitFullscreen) {
429
+ document.webkitExitFullscreen();
430
+ } else if (document.mozCancelFullScreen) {
431
+ document.mozCancelFullScreen();
432
+ } else if (document.msExitFullscreen) {
433
+ document.msExitFullscreen();
434
+ } else {
435
+ return false;
436
+ }
437
+ return true;
438
+ };
439
+ var getFullscreenElement = function getFullscreenElement() {
440
+ return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
441
+ };
442
+ var linkProgram = function linkProgram(gl, vertexSource, fragmentSource, attribLocationMap) {
443
+ var vertexShader = gl.createShader(gl.VERTEX_SHADER);
444
+ gl.shaderSource(vertexShader, vertexSource);
445
+ gl.compileShader(vertexShader);
446
+ var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
447
+ gl.shaderSource(fragmentShader, fragmentSource);
448
+ gl.compileShader(fragmentShader);
449
+ var program = gl.createProgram();
450
+ gl.attachShader(program, vertexShader);
451
+ gl.attachShader(program, fragmentShader);
452
+ for (var attribName in attribLocationMap) {
453
+ gl.bindAttribLocation(program, attribLocationMap[attribName], attribName);
454
+ } gl.linkProgram(program);
455
+ gl.deleteShader(vertexShader);
456
+ gl.deleteShader(fragmentShader);
457
+ return program;
458
+ };
459
+ var getProgramUniforms = function getProgramUniforms(gl, program) {
460
+ var uniforms = {};
461
+ var uniformCount = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
462
+ var uniformName = '';
463
+ for (var i = 0; i < uniformCount; i++) {
464
+ var uniformInfo = gl.getActiveUniform(program, i);
465
+ uniformName = uniformInfo.name.replace('[0]', '');
466
+ uniforms[uniformName] = gl.getUniformLocation(program, uniformName);
467
+ }
468
+ return uniforms;
469
+ };
470
+ var orthoMatrix = function orthoMatrix(out, left, right, bottom, top, near, far) {
471
+ var lr = 1 / (left - right),
472
+ bt = 1 / (bottom - top),
473
+ nf = 1 / (near - far);
474
+ out[0] = -2 * lr;
475
+ out[1] = 0;
476
+ out[2] = 0;
477
+ out[3] = 0;
478
+ out[4] = 0;
479
+ out[5] = -2 * bt;
480
+ out[6] = 0;
481
+ out[7] = 0;
482
+ out[8] = 0;
483
+ out[9] = 0;
484
+ out[10] = 2 * nf;
485
+ out[11] = 0;
486
+ out[12] = (left + right) * lr;
487
+ out[13] = (top + bottom) * bt;
488
+ out[14] = (far + near) * nf;
489
+ out[15] = 1;
490
+ return out;
491
+ };
492
+ var isMobile = function isMobile() {
493
+ var check = false;
494
+ (function (a) {
495
+ if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
496
+ })(navigator.userAgent || navigator.vendor || window.opera);
497
+ return check;
498
+ };
499
+ var extend = function extend(dest, src) {
500
+ for (var key in src) {
501
+ if (src.hasOwnProperty(key)) {
502
+ dest[key] = src[key];
503
+ }
504
+ }
505
+ return dest;
506
+ };
507
+ var safariCssSizeWorkaround = function safariCssSizeWorkaround(canvas) {
508
+ if (isIOS()) {
509
+ var width = canvas.style.width;
510
+ var height = canvas.style.height;
511
+ canvas.style.width = parseInt(width) + 1 + 'px';
512
+ canvas.style.height = parseInt(height) + 'px';
513
+ setTimeout(function () {
514
+ canvas.style.width = width;
515
+ canvas.style.height = height;
516
+ }, 100);
517
+ }
518
+ window.canvas = canvas;
519
+ };
520
+ var frameDataFromPose = function () {
521
+ var piOver180 = Math.PI / 180.0;
522
+ var rad45 = Math.PI * 0.25;
523
+ function mat4_perspectiveFromFieldOfView(out, fov, near, far) {
524
+ var upTan = Math.tan(fov ? fov.upDegrees * piOver180 : rad45),
525
+ downTan = Math.tan(fov ? fov.downDegrees * piOver180 : rad45),
526
+ leftTan = Math.tan(fov ? fov.leftDegrees * piOver180 : rad45),
527
+ rightTan = Math.tan(fov ? fov.rightDegrees * piOver180 : rad45),
528
+ xScale = 2.0 / (leftTan + rightTan),
529
+ yScale = 2.0 / (upTan + downTan);
530
+ out[0] = xScale;
531
+ out[1] = 0.0;
532
+ out[2] = 0.0;
533
+ out[3] = 0.0;
534
+ out[4] = 0.0;
535
+ out[5] = yScale;
536
+ out[6] = 0.0;
537
+ out[7] = 0.0;
538
+ out[8] = -((leftTan - rightTan) * xScale * 0.5);
539
+ out[9] = (upTan - downTan) * yScale * 0.5;
540
+ out[10] = far / (near - far);
541
+ out[11] = -1.0;
542
+ out[12] = 0.0;
543
+ out[13] = 0.0;
544
+ out[14] = far * near / (near - far);
545
+ out[15] = 0.0;
546
+ return out;
547
+ }
548
+ function mat4_fromRotationTranslation(out, q, v) {
549
+ var x = q[0],
550
+ y = q[1],
551
+ z = q[2],
552
+ w = q[3],
553
+ x2 = x + x,
554
+ y2 = y + y,
555
+ z2 = z + z,
556
+ xx = x * x2,
557
+ xy = x * y2,
558
+ xz = x * z2,
559
+ yy = y * y2,
560
+ yz = y * z2,
561
+ zz = z * z2,
562
+ wx = w * x2,
563
+ wy = w * y2,
564
+ wz = w * z2;
565
+ out[0] = 1 - (yy + zz);
566
+ out[1] = xy + wz;
567
+ out[2] = xz - wy;
568
+ out[3] = 0;
569
+ out[4] = xy - wz;
570
+ out[5] = 1 - (xx + zz);
571
+ out[6] = yz + wx;
572
+ out[7] = 0;
573
+ out[8] = xz + wy;
574
+ out[9] = yz - wx;
575
+ out[10] = 1 - (xx + yy);
576
+ out[11] = 0;
577
+ out[12] = v[0];
578
+ out[13] = v[1];
579
+ out[14] = v[2];
580
+ out[15] = 1;
581
+ return out;
582
+ }
583
+ function mat4_translate(out, a, v) {
584
+ var x = v[0],
585
+ y = v[1],
586
+ z = v[2],
587
+ a00,
588
+ a01,
589
+ a02,
590
+ a03,
591
+ a10,
592
+ a11,
593
+ a12,
594
+ a13,
595
+ a20,
596
+ a21,
597
+ a22,
598
+ a23;
599
+ if (a === out) {
600
+ out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
601
+ out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
602
+ out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
603
+ out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
604
+ } else {
605
+ a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
606
+ a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
607
+ a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
608
+ out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;
609
+ out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;
610
+ out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;
611
+ out[12] = a00 * x + a10 * y + a20 * z + a[12];
612
+ out[13] = a01 * x + a11 * y + a21 * z + a[13];
613
+ out[14] = a02 * x + a12 * y + a22 * z + a[14];
614
+ out[15] = a03 * x + a13 * y + a23 * z + a[15];
615
+ }
616
+ return out;
617
+ }
618
+ function mat4_invert(out, a) {
619
+ var a00 = a[0],
620
+ a01 = a[1],
621
+ a02 = a[2],
622
+ a03 = a[3],
623
+ a10 = a[4],
624
+ a11 = a[5],
625
+ a12 = a[6],
626
+ a13 = a[7],
627
+ a20 = a[8],
628
+ a21 = a[9],
629
+ a22 = a[10],
630
+ a23 = a[11],
631
+ a30 = a[12],
632
+ a31 = a[13],
633
+ a32 = a[14],
634
+ a33 = a[15],
635
+ b00 = a00 * a11 - a01 * a10,
636
+ b01 = a00 * a12 - a02 * a10,
637
+ b02 = a00 * a13 - a03 * a10,
638
+ b03 = a01 * a12 - a02 * a11,
639
+ b04 = a01 * a13 - a03 * a11,
640
+ b05 = a02 * a13 - a03 * a12,
641
+ b06 = a20 * a31 - a21 * a30,
642
+ b07 = a20 * a32 - a22 * a30,
643
+ b08 = a20 * a33 - a23 * a30,
644
+ b09 = a21 * a32 - a22 * a31,
645
+ b10 = a21 * a33 - a23 * a31,
646
+ b11 = a22 * a33 - a23 * a32,
647
+ det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
648
+ if (!det) {
649
+ return null;
650
+ }
651
+ det = 1.0 / det;
652
+ out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
653
+ out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
654
+ out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
655
+ out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
656
+ out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
657
+ out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
658
+ out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
659
+ out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
660
+ out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
661
+ out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
662
+ out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
663
+ out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
664
+ out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
665
+ out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
666
+ out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
667
+ out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
668
+ return out;
669
+ }
670
+ var defaultOrientation = new Float32Array([0, 0, 0, 1]);
671
+ var defaultPosition = new Float32Array([0, 0, 0]);
672
+ function updateEyeMatrices(projection, view, pose, fov, offset, vrDisplay) {
673
+ mat4_perspectiveFromFieldOfView(projection, fov || null, vrDisplay.depthNear, vrDisplay.depthFar);
674
+ var orientation = pose.orientation || defaultOrientation;
675
+ var position = pose.position || defaultPosition;
676
+ mat4_fromRotationTranslation(view, orientation, position);
677
+ if (offset) mat4_translate(view, view, offset);
678
+ mat4_invert(view, view);
679
+ }
680
+ return function (frameData, pose, vrDisplay) {
681
+ if (!frameData || !pose) return false;
682
+ frameData.pose = pose;
683
+ frameData.timestamp = pose.timestamp;
684
+ updateEyeMatrices(frameData.leftProjectionMatrix, frameData.leftViewMatrix, pose, vrDisplay._getFieldOfView("left"), vrDisplay._getEyeOffset("left"), vrDisplay);
685
+ updateEyeMatrices(frameData.rightProjectionMatrix, frameData.rightViewMatrix, pose, vrDisplay._getFieldOfView("right"), vrDisplay._getEyeOffset("right"), vrDisplay);
686
+ return true;
687
+ };
688
+ }();
689
+ var isInsideCrossOriginIFrame = function isInsideCrossOriginIFrame() {
690
+ var isFramed = window.self !== window.top;
691
+ var refOrigin = getOriginFromUrl(document.referrer);
692
+ var thisOrigin = getOriginFromUrl(window.location.href);
693
+ return isFramed && refOrigin !== thisOrigin;
694
+ };
695
+ var getOriginFromUrl = function getOriginFromUrl(url) {
696
+ var domainIdx;
697
+ var protoSepIdx = url.indexOf("://");
698
+ if (protoSepIdx !== -1) {
699
+ domainIdx = protoSepIdx + 3;
700
+ } else {
701
+ domainIdx = 0;
702
+ }
703
+ var domainEndIdx = url.indexOf('/', domainIdx);
704
+ if (domainEndIdx === -1) {
705
+ domainEndIdx = url.length;
706
+ }
707
+ return url.substring(0, domainEndIdx);
708
+ };
709
+ var getQuaternionAngle = function getQuaternionAngle(quat) {
710
+ if (quat.w > 1) {
711
+ console.warn('getQuaternionAngle: w > 1');
712
+ return 0;
713
+ }
714
+ var angle = 2 * Math.acos(quat.w);
715
+ return angle;
716
+ };
717
+ var warnOnce = function () {
718
+ var observedWarnings = {};
719
+ return function (key, message) {
720
+ if (observedWarnings[key] === undefined) {
721
+ console.warn('webvr-polyfill: ' + message);
722
+ observedWarnings[key] = true;
723
+ }
724
+ };
725
+ }();
726
+ var deprecateWarning = function deprecateWarning(deprecated, suggested) {
727
+ var alternative = suggested ? 'Please use ' + suggested + ' instead.' : '';
728
+ warnOnce(deprecated, deprecated + ' has been deprecated. ' + 'This may not work on native WebVR displays. ' + alternative);
729
+ };
730
+ function WGLUPreserveGLState(gl, bindings, callback) {
731
+ if (!bindings) {
732
+ callback(gl);
733
+ return;
734
+ }
735
+ var boundValues = [];
736
+ var activeTexture = null;
737
+ for (var i = 0; i < bindings.length; ++i) {
738
+ var binding = bindings[i];
739
+ switch (binding) {
740
+ case gl.TEXTURE_BINDING_2D:
741
+ case gl.TEXTURE_BINDING_CUBE_MAP:
742
+ var textureUnit = bindings[++i];
743
+ if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31) {
744
+ console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit");
745
+ boundValues.push(null, null);
746
+ break;
747
+ }
748
+ if (!activeTexture) {
749
+ activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);
750
+ }
751
+ gl.activeTexture(textureUnit);
752
+ boundValues.push(gl.getParameter(binding), null);
753
+ break;
754
+ case gl.ACTIVE_TEXTURE:
755
+ activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);
756
+ boundValues.push(null);
757
+ break;
758
+ default:
759
+ boundValues.push(gl.getParameter(binding));
760
+ break;
761
+ }
762
+ }
763
+ callback(gl);
764
+ for (var i = 0; i < bindings.length; ++i) {
765
+ var binding = bindings[i];
766
+ var boundValue = boundValues[i];
767
+ switch (binding) {
768
+ case gl.ACTIVE_TEXTURE:
769
+ break;
770
+ case gl.ARRAY_BUFFER_BINDING:
771
+ gl.bindBuffer(gl.ARRAY_BUFFER, boundValue);
772
+ break;
773
+ case gl.COLOR_CLEAR_VALUE:
774
+ gl.clearColor(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);
775
+ break;
776
+ case gl.COLOR_WRITEMASK:
777
+ gl.colorMask(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);
778
+ break;
779
+ case gl.CURRENT_PROGRAM:
780
+ gl.useProgram(boundValue);
781
+ break;
782
+ case gl.ELEMENT_ARRAY_BUFFER_BINDING:
783
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, boundValue);
784
+ break;
785
+ case gl.FRAMEBUFFER_BINDING:
786
+ gl.bindFramebuffer(gl.FRAMEBUFFER, boundValue);
787
+ break;
788
+ case gl.RENDERBUFFER_BINDING:
789
+ gl.bindRenderbuffer(gl.RENDERBUFFER, boundValue);
790
+ break;
791
+ case gl.TEXTURE_BINDING_2D:
792
+ var textureUnit = bindings[++i];
793
+ if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)
794
+ break;
795
+ gl.activeTexture(textureUnit);
796
+ gl.bindTexture(gl.TEXTURE_2D, boundValue);
797
+ break;
798
+ case gl.TEXTURE_BINDING_CUBE_MAP:
799
+ var textureUnit = bindings[++i];
800
+ if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)
801
+ break;
802
+ gl.activeTexture(textureUnit);
803
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, boundValue);
804
+ break;
805
+ case gl.VIEWPORT:
806
+ gl.viewport(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);
807
+ break;
808
+ case gl.BLEND:
809
+ case gl.CULL_FACE:
810
+ case gl.DEPTH_TEST:
811
+ case gl.SCISSOR_TEST:
812
+ case gl.STENCIL_TEST:
813
+ if (boundValue) {
814
+ gl.enable(binding);
815
+ } else {
816
+ gl.disable(binding);
817
+ }
818
+ break;
819
+ default:
820
+ console.log("No GL restore behavior for 0x" + binding.toString(16));
821
+ break;
822
+ }
823
+ if (activeTexture) {
824
+ gl.activeTexture(activeTexture);
825
+ }
826
+ }
827
+ }
828
+ var glPreserveState = WGLUPreserveGLState;
829
+ var distortionVS = ['attribute vec2 position;', 'attribute vec3 texCoord;', 'varying vec2 vTexCoord;', 'uniform vec4 viewportOffsetScale[2];', 'void main() {', ' vec4 viewport = viewportOffsetScale[int(texCoord.z)];', ' vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;', ' gl_Position = vec4( position, 1.0, 1.0 );', '}'].join('\n');
830
+ var distortionFS = ['precision mediump float;', 'uniform sampler2D diffuse;', 'varying vec2 vTexCoord;', 'void main() {', ' gl_FragColor = texture2D(diffuse, vTexCoord);', '}'].join('\n');
831
+ function CardboardDistorter(gl, cardboardUI, bufferScale, dirtySubmitFrameBindings) {
832
+ this.gl = gl;
833
+ this.cardboardUI = cardboardUI;
834
+ this.bufferScale = bufferScale;
835
+ this.dirtySubmitFrameBindings = dirtySubmitFrameBindings;
836
+ this.ctxAttribs = gl.getContextAttributes();
837
+ this.meshWidth = 20;
838
+ this.meshHeight = 20;
839
+ this.bufferWidth = gl.drawingBufferWidth;
840
+ this.bufferHeight = gl.drawingBufferHeight;
841
+ this.realBindFramebuffer = gl.bindFramebuffer;
842
+ this.realEnable = gl.enable;
843
+ this.realDisable = gl.disable;
844
+ this.realColorMask = gl.colorMask;
845
+ this.realClearColor = gl.clearColor;
846
+ this.realViewport = gl.viewport;
847
+ if (!isIOS()) {
848
+ this.realCanvasWidth = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'width');
849
+ this.realCanvasHeight = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'height');
850
+ }
851
+ this.isPatched = false;
852
+ this.lastBoundFramebuffer = null;
853
+ this.cullFace = false;
854
+ this.depthTest = false;
855
+ this.blend = false;
856
+ this.scissorTest = false;
857
+ this.stencilTest = false;
858
+ this.viewport = [0, 0, 0, 0];
859
+ this.colorMask = [true, true, true, true];
860
+ this.clearColor = [0, 0, 0, 0];
861
+ this.attribs = {
862
+ position: 0,
863
+ texCoord: 1
864
+ };
865
+ this.program = linkProgram(gl, distortionVS, distortionFS, this.attribs);
866
+ this.uniforms = getProgramUniforms(gl, this.program);
867
+ this.viewportOffsetScale = new Float32Array(8);
868
+ this.setTextureBounds();
869
+ this.vertexBuffer = gl.createBuffer();
870
+ this.indexBuffer = gl.createBuffer();
871
+ this.indexCount = 0;
872
+ this.renderTarget = gl.createTexture();
873
+ this.framebuffer = gl.createFramebuffer();
874
+ this.depthStencilBuffer = null;
875
+ this.depthBuffer = null;
876
+ this.stencilBuffer = null;
877
+ if (this.ctxAttribs.depth && this.ctxAttribs.stencil) {
878
+ this.depthStencilBuffer = gl.createRenderbuffer();
879
+ } else if (this.ctxAttribs.depth) {
880
+ this.depthBuffer = gl.createRenderbuffer();
881
+ } else if (this.ctxAttribs.stencil) {
882
+ this.stencilBuffer = gl.createRenderbuffer();
883
+ }
884
+ this.patch();
885
+ this.onResize();
886
+ }
887
+ CardboardDistorter.prototype.destroy = function () {
888
+ var gl = this.gl;
889
+ this.unpatch();
890
+ gl.deleteProgram(this.program);
891
+ gl.deleteBuffer(this.vertexBuffer);
892
+ gl.deleteBuffer(this.indexBuffer);
893
+ gl.deleteTexture(this.renderTarget);
894
+ gl.deleteFramebuffer(this.framebuffer);
895
+ if (this.depthStencilBuffer) {
896
+ gl.deleteRenderbuffer(this.depthStencilBuffer);
897
+ }
898
+ if (this.depthBuffer) {
899
+ gl.deleteRenderbuffer(this.depthBuffer);
900
+ }
901
+ if (this.stencilBuffer) {
902
+ gl.deleteRenderbuffer(this.stencilBuffer);
903
+ }
904
+ if (this.cardboardUI) {
905
+ this.cardboardUI.destroy();
906
+ }
907
+ };
908
+ CardboardDistorter.prototype.onResize = function () {
909
+ var gl = this.gl;
910
+ var self = this;
911
+ var glState = [gl.RENDERBUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0];
912
+ glPreserveState(gl, glState, function (gl) {
913
+ self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);
914
+ if (self.scissorTest) {
915
+ self.realDisable.call(gl, gl.SCISSOR_TEST);
916
+ }
917
+ self.realColorMask.call(gl, true, true, true, true);
918
+ self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
919
+ self.realClearColor.call(gl, 0, 0, 0, 1);
920
+ gl.clear(gl.COLOR_BUFFER_BIT);
921
+ self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.framebuffer);
922
+ gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);
923
+ gl.texImage2D(gl.TEXTURE_2D, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, self.bufferWidth, self.bufferHeight, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, gl.UNSIGNED_BYTE, null);
924
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
925
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
926
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
927
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
928
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, self.renderTarget, 0);
929
+ if (self.ctxAttribs.depth && self.ctxAttribs.stencil) {
930
+ gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthStencilBuffer);
931
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, self.bufferWidth, self.bufferHeight);
932
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.depthStencilBuffer);
933
+ } else if (self.ctxAttribs.depth) {
934
+ gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthBuffer);
935
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, self.bufferWidth, self.bufferHeight);
936
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, self.depthBuffer);
937
+ } else if (self.ctxAttribs.stencil) {
938
+ gl.bindRenderbuffer(gl.RENDERBUFFER, self.stencilBuffer);
939
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.STENCIL_INDEX8, self.bufferWidth, self.bufferHeight);
940
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.stencilBuffer);
941
+ }
942
+ if (!gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE) {
943
+ console.error('Framebuffer incomplete!');
944
+ }
945
+ self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);
946
+ if (self.scissorTest) {
947
+ self.realEnable.call(gl, gl.SCISSOR_TEST);
948
+ }
949
+ self.realColorMask.apply(gl, self.colorMask);
950
+ self.realViewport.apply(gl, self.viewport);
951
+ self.realClearColor.apply(gl, self.clearColor);
952
+ });
953
+ if (this.cardboardUI) {
954
+ this.cardboardUI.onResize();
955
+ }
956
+ };
957
+ CardboardDistorter.prototype.patch = function () {
958
+ if (this.isPatched) {
959
+ return;
960
+ }
961
+ var self = this;
962
+ var canvas = this.gl.canvas;
963
+ var gl = this.gl;
964
+ if (!isIOS()) {
965
+ canvas.width = getScreenWidth() * this.bufferScale;
966
+ canvas.height = getScreenHeight() * this.bufferScale;
967
+ Object.defineProperty(canvas, 'width', {
968
+ configurable: true,
969
+ enumerable: true,
970
+ get: function get() {
971
+ return self.bufferWidth;
972
+ },
973
+ set: function set(value) {
974
+ self.bufferWidth = value;
975
+ self.realCanvasWidth.set.call(canvas, value);
976
+ self.onResize();
977
+ }
978
+ });
979
+ Object.defineProperty(canvas, 'height', {
980
+ configurable: true,
981
+ enumerable: true,
982
+ get: function get() {
983
+ return self.bufferHeight;
984
+ },
985
+ set: function set(value) {
986
+ self.bufferHeight = value;
987
+ self.realCanvasHeight.set.call(canvas, value);
988
+ self.onResize();
989
+ }
990
+ });
991
+ }
992
+ this.lastBoundFramebuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);
993
+ if (this.lastBoundFramebuffer == null) {
994
+ this.lastBoundFramebuffer = this.framebuffer;
995
+ this.gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
996
+ }
997
+ this.gl.bindFramebuffer = function (target, framebuffer) {
998
+ self.lastBoundFramebuffer = framebuffer ? framebuffer : self.framebuffer;
999
+ self.realBindFramebuffer.call(gl, target, self.lastBoundFramebuffer);
1000
+ };
1001
+ this.cullFace = gl.getParameter(gl.CULL_FACE);
1002
+ this.depthTest = gl.getParameter(gl.DEPTH_TEST);
1003
+ this.blend = gl.getParameter(gl.BLEND);
1004
+ this.scissorTest = gl.getParameter(gl.SCISSOR_TEST);
1005
+ this.stencilTest = gl.getParameter(gl.STENCIL_TEST);
1006
+ gl.enable = function (pname) {
1007
+ switch (pname) {
1008
+ case gl.CULL_FACE:
1009
+ self.cullFace = true; break;
1010
+ case gl.DEPTH_TEST:
1011
+ self.depthTest = true; break;
1012
+ case gl.BLEND:
1013
+ self.blend = true; break;
1014
+ case gl.SCISSOR_TEST:
1015
+ self.scissorTest = true; break;
1016
+ case gl.STENCIL_TEST:
1017
+ self.stencilTest = true; break;
1018
+ }
1019
+ self.realEnable.call(gl, pname);
1020
+ };
1021
+ gl.disable = function (pname) {
1022
+ switch (pname) {
1023
+ case gl.CULL_FACE:
1024
+ self.cullFace = false; break;
1025
+ case gl.DEPTH_TEST:
1026
+ self.depthTest = false; break;
1027
+ case gl.BLEND:
1028
+ self.blend = false; break;
1029
+ case gl.SCISSOR_TEST:
1030
+ self.scissorTest = false; break;
1031
+ case gl.STENCIL_TEST:
1032
+ self.stencilTest = false; break;
1033
+ }
1034
+ self.realDisable.call(gl, pname);
1035
+ };
1036
+ this.colorMask = gl.getParameter(gl.COLOR_WRITEMASK);
1037
+ gl.colorMask = function (r, g, b, a) {
1038
+ self.colorMask[0] = r;
1039
+ self.colorMask[1] = g;
1040
+ self.colorMask[2] = b;
1041
+ self.colorMask[3] = a;
1042
+ self.realColorMask.call(gl, r, g, b, a);
1043
+ };
1044
+ this.clearColor = gl.getParameter(gl.COLOR_CLEAR_VALUE);
1045
+ gl.clearColor = function (r, g, b, a) {
1046
+ self.clearColor[0] = r;
1047
+ self.clearColor[1] = g;
1048
+ self.clearColor[2] = b;
1049
+ self.clearColor[3] = a;
1050
+ self.realClearColor.call(gl, r, g, b, a);
1051
+ };
1052
+ this.viewport = gl.getParameter(gl.VIEWPORT);
1053
+ gl.viewport = function (x, y, w, h) {
1054
+ self.viewport[0] = x;
1055
+ self.viewport[1] = y;
1056
+ self.viewport[2] = w;
1057
+ self.viewport[3] = h;
1058
+ self.realViewport.call(gl, x, y, w, h);
1059
+ };
1060
+ this.isPatched = true;
1061
+ safariCssSizeWorkaround(canvas);
1062
+ };
1063
+ CardboardDistorter.prototype.unpatch = function () {
1064
+ if (!this.isPatched) {
1065
+ return;
1066
+ }
1067
+ var gl = this.gl;
1068
+ var canvas = this.gl.canvas;
1069
+ if (!isIOS()) {
1070
+ Object.defineProperty(canvas, 'width', this.realCanvasWidth);
1071
+ Object.defineProperty(canvas, 'height', this.realCanvasHeight);
1072
+ }
1073
+ canvas.width = this.bufferWidth;
1074
+ canvas.height = this.bufferHeight;
1075
+ gl.bindFramebuffer = this.realBindFramebuffer;
1076
+ gl.enable = this.realEnable;
1077
+ gl.disable = this.realDisable;
1078
+ gl.colorMask = this.realColorMask;
1079
+ gl.clearColor = this.realClearColor;
1080
+ gl.viewport = this.realViewport;
1081
+ if (this.lastBoundFramebuffer == this.framebuffer) {
1082
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
1083
+ }
1084
+ this.isPatched = false;
1085
+ setTimeout(function () {
1086
+ safariCssSizeWorkaround(canvas);
1087
+ }, 1);
1088
+ };
1089
+ CardboardDistorter.prototype.setTextureBounds = function (leftBounds, rightBounds) {
1090
+ if (!leftBounds) {
1091
+ leftBounds = [0, 0, 0.5, 1];
1092
+ }
1093
+ if (!rightBounds) {
1094
+ rightBounds = [0.5, 0, 0.5, 1];
1095
+ }
1096
+ this.viewportOffsetScale[0] = leftBounds[0];
1097
+ this.viewportOffsetScale[1] = leftBounds[1];
1098
+ this.viewportOffsetScale[2] = leftBounds[2];
1099
+ this.viewportOffsetScale[3] = leftBounds[3];
1100
+ this.viewportOffsetScale[4] = rightBounds[0];
1101
+ this.viewportOffsetScale[5] = rightBounds[1];
1102
+ this.viewportOffsetScale[6] = rightBounds[2];
1103
+ this.viewportOffsetScale[7] = rightBounds[3];
1104
+ };
1105
+ CardboardDistorter.prototype.submitFrame = function () {
1106
+ var gl = this.gl;
1107
+ var self = this;
1108
+ var glState = [];
1109
+ if (!this.dirtySubmitFrameBindings) {
1110
+ glState.push(gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0);
1111
+ }
1112
+ glPreserveState(gl, glState, function (gl) {
1113
+ self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);
1114
+ if (self.cullFace) {
1115
+ self.realDisable.call(gl, gl.CULL_FACE);
1116
+ }
1117
+ if (self.depthTest) {
1118
+ self.realDisable.call(gl, gl.DEPTH_TEST);
1119
+ }
1120
+ if (self.blend) {
1121
+ self.realDisable.call(gl, gl.BLEND);
1122
+ }
1123
+ if (self.scissorTest) {
1124
+ self.realDisable.call(gl, gl.SCISSOR_TEST);
1125
+ }
1126
+ if (self.stencilTest) {
1127
+ self.realDisable.call(gl, gl.STENCIL_TEST);
1128
+ }
1129
+ self.realColorMask.call(gl, true, true, true, true);
1130
+ self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
1131
+ if (self.ctxAttribs.alpha || isIOS()) {
1132
+ self.realClearColor.call(gl, 0, 0, 0, 1);
1133
+ gl.clear(gl.COLOR_BUFFER_BIT);
1134
+ }
1135
+ gl.useProgram(self.program);
1136
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);
1137
+ gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);
1138
+ gl.enableVertexAttribArray(self.attribs.position);
1139
+ gl.enableVertexAttribArray(self.attribs.texCoord);
1140
+ gl.vertexAttribPointer(self.attribs.position, 2, gl.FLOAT, false, 20, 0);
1141
+ gl.vertexAttribPointer(self.attribs.texCoord, 3, gl.FLOAT, false, 20, 8);
1142
+ gl.activeTexture(gl.TEXTURE0);
1143
+ gl.uniform1i(self.uniforms.diffuse, 0);
1144
+ gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);
1145
+ gl.uniform4fv(self.uniforms.viewportOffsetScale, self.viewportOffsetScale);
1146
+ gl.drawElements(gl.TRIANGLES, self.indexCount, gl.UNSIGNED_SHORT, 0);
1147
+ if (self.cardboardUI) {
1148
+ self.cardboardUI.renderNoState();
1149
+ }
1150
+ self.realBindFramebuffer.call(self.gl, gl.FRAMEBUFFER, self.framebuffer);
1151
+ if (!self.ctxAttribs.preserveDrawingBuffer) {
1152
+ self.realClearColor.call(gl, 0, 0, 0, 0);
1153
+ gl.clear(gl.COLOR_BUFFER_BIT);
1154
+ }
1155
+ if (!self.dirtySubmitFrameBindings) {
1156
+ self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);
1157
+ }
1158
+ if (self.cullFace) {
1159
+ self.realEnable.call(gl, gl.CULL_FACE);
1160
+ }
1161
+ if (self.depthTest) {
1162
+ self.realEnable.call(gl, gl.DEPTH_TEST);
1163
+ }
1164
+ if (self.blend) {
1165
+ self.realEnable.call(gl, gl.BLEND);
1166
+ }
1167
+ if (self.scissorTest) {
1168
+ self.realEnable.call(gl, gl.SCISSOR_TEST);
1169
+ }
1170
+ if (self.stencilTest) {
1171
+ self.realEnable.call(gl, gl.STENCIL_TEST);
1172
+ }
1173
+ self.realColorMask.apply(gl, self.colorMask);
1174
+ self.realViewport.apply(gl, self.viewport);
1175
+ if (self.ctxAttribs.alpha || !self.ctxAttribs.preserveDrawingBuffer) {
1176
+ self.realClearColor.apply(gl, self.clearColor);
1177
+ }
1178
+ });
1179
+ if (isIOS()) {
1180
+ var canvas = gl.canvas;
1181
+ if (canvas.width != self.bufferWidth || canvas.height != self.bufferHeight) {
1182
+ self.bufferWidth = canvas.width;
1183
+ self.bufferHeight = canvas.height;
1184
+ self.onResize();
1185
+ }
1186
+ }
1187
+ };
1188
+ CardboardDistorter.prototype.updateDeviceInfo = function (deviceInfo) {
1189
+ var gl = this.gl;
1190
+ var self = this;
1191
+ var glState = [gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING];
1192
+ glPreserveState(gl, glState, function (gl) {
1193
+ var vertices = self.computeMeshVertices_(self.meshWidth, self.meshHeight, deviceInfo);
1194
+ gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);
1195
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
1196
+ if (!self.indexCount) {
1197
+ var indices = self.computeMeshIndices_(self.meshWidth, self.meshHeight);
1198
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);
1199
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
1200
+ self.indexCount = indices.length;
1201
+ }
1202
+ });
1203
+ };
1204
+ CardboardDistorter.prototype.computeMeshVertices_ = function (width, height, deviceInfo) {
1205
+ var vertices = new Float32Array(2 * width * height * 5);
1206
+ var lensFrustum = deviceInfo.getLeftEyeVisibleTanAngles();
1207
+ var noLensFrustum = deviceInfo.getLeftEyeNoLensTanAngles();
1208
+ var viewport = deviceInfo.getLeftEyeVisibleScreenRect(noLensFrustum);
1209
+ var vidx = 0;
1210
+ for (var e = 0; e < 2; e++) {
1211
+ for (var j = 0; j < height; j++) {
1212
+ for (var i = 0; i < width; i++, vidx++) {
1213
+ var u = i / (width - 1);
1214
+ var v = j / (height - 1);
1215
+ var s = u;
1216
+ var t = v;
1217
+ var x = lerp(lensFrustum[0], lensFrustum[2], u);
1218
+ var y = lerp(lensFrustum[3], lensFrustum[1], v);
1219
+ var d = Math.sqrt(x * x + y * y);
1220
+ var r = deviceInfo.distortion.distortInverse(d);
1221
+ var p = x * r / d;
1222
+ var q = y * r / d;
1223
+ u = (p - noLensFrustum[0]) / (noLensFrustum[2] - noLensFrustum[0]);
1224
+ v = (q - noLensFrustum[3]) / (noLensFrustum[1] - noLensFrustum[3]);
1225
+ u = (viewport.x + u * viewport.width - 0.5) * 2.0;
1226
+ v = (viewport.y + v * viewport.height - 0.5) * 2.0;
1227
+ vertices[vidx * 5 + 0] = u;
1228
+ vertices[vidx * 5 + 1] = v;
1229
+ vertices[vidx * 5 + 2] = s;
1230
+ vertices[vidx * 5 + 3] = t;
1231
+ vertices[vidx * 5 + 4] = e;
1232
+ }
1233
+ }
1234
+ var w = lensFrustum[2] - lensFrustum[0];
1235
+ lensFrustum[0] = -(w + lensFrustum[0]);
1236
+ lensFrustum[2] = w - lensFrustum[2];
1237
+ w = noLensFrustum[2] - noLensFrustum[0];
1238
+ noLensFrustum[0] = -(w + noLensFrustum[0]);
1239
+ noLensFrustum[2] = w - noLensFrustum[2];
1240
+ viewport.x = 1 - (viewport.x + viewport.width);
1241
+ }
1242
+ return vertices;
1243
+ };
1244
+ CardboardDistorter.prototype.computeMeshIndices_ = function (width, height) {
1245
+ var indices = new Uint16Array(2 * (width - 1) * (height - 1) * 6);
1246
+ var halfwidth = width / 2;
1247
+ var halfheight = height / 2;
1248
+ var vidx = 0;
1249
+ var iidx = 0;
1250
+ for (var e = 0; e < 2; e++) {
1251
+ for (var j = 0; j < height; j++) {
1252
+ for (var i = 0; i < width; i++, vidx++) {
1253
+ if (i == 0 || j == 0) continue;
1254
+ if (i <= halfwidth == j <= halfheight) {
1255
+ indices[iidx++] = vidx;
1256
+ indices[iidx++] = vidx - width - 1;
1257
+ indices[iidx++] = vidx - width;
1258
+ indices[iidx++] = vidx - width - 1;
1259
+ indices[iidx++] = vidx;
1260
+ indices[iidx++] = vidx - 1;
1261
+ } else {
1262
+ indices[iidx++] = vidx - 1;
1263
+ indices[iidx++] = vidx - width;
1264
+ indices[iidx++] = vidx;
1265
+ indices[iidx++] = vidx - width;
1266
+ indices[iidx++] = vidx - 1;
1267
+ indices[iidx++] = vidx - width - 1;
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ return indices;
1273
+ };
1274
+ CardboardDistorter.prototype.getOwnPropertyDescriptor_ = function (proto, attrName) {
1275
+ var descriptor = Object.getOwnPropertyDescriptor(proto, attrName);
1276
+ if (descriptor.get === undefined || descriptor.set === undefined) {
1277
+ descriptor.configurable = true;
1278
+ descriptor.enumerable = true;
1279
+ descriptor.get = function () {
1280
+ return this.getAttribute(attrName);
1281
+ };
1282
+ descriptor.set = function (val) {
1283
+ this.setAttribute(attrName, val);
1284
+ };
1285
+ }
1286
+ return descriptor;
1287
+ };
1288
+ var uiVS = ['attribute vec2 position;', 'uniform mat4 projectionMat;', 'void main() {', ' gl_Position = projectionMat * vec4( position, -1.0, 1.0 );', '}'].join('\n');
1289
+ var uiFS = ['precision mediump float;', 'uniform vec4 color;', 'void main() {', ' gl_FragColor = color;', '}'].join('\n');
1290
+ var DEG2RAD = Math.PI / 180.0;
1291
+ var kAnglePerGearSection = 60;
1292
+ var kOuterRimEndAngle = 12;
1293
+ var kInnerRimBeginAngle = 20;
1294
+ var kOuterRadius = 1;
1295
+ var kMiddleRadius = 0.75;
1296
+ var kInnerRadius = 0.3125;
1297
+ var kCenterLineThicknessDp = 4;
1298
+ var kButtonWidthDp = 28;
1299
+ var kTouchSlopFactor = 1.5;
1300
+ function CardboardUI(gl) {
1301
+ this.gl = gl;
1302
+ this.attribs = {
1303
+ position: 0
1304
+ };
1305
+ this.program = linkProgram(gl, uiVS, uiFS, this.attribs);
1306
+ this.uniforms = getProgramUniforms(gl, this.program);
1307
+ this.vertexBuffer = gl.createBuffer();
1308
+ this.gearOffset = 0;
1309
+ this.gearVertexCount = 0;
1310
+ this.arrowOffset = 0;
1311
+ this.arrowVertexCount = 0;
1312
+ this.projMat = new Float32Array(16);
1313
+ this.listener = null;
1314
+ this.onResize();
1315
+ }
1316
+ CardboardUI.prototype.destroy = function () {
1317
+ var gl = this.gl;
1318
+ if (this.listener) {
1319
+ gl.canvas.removeEventListener('click', this.listener, false);
1320
+ }
1321
+ gl.deleteProgram(this.program);
1322
+ gl.deleteBuffer(this.vertexBuffer);
1323
+ };
1324
+ CardboardUI.prototype.listen = function (optionsCallback, backCallback) {
1325
+ var canvas = this.gl.canvas;
1326
+ this.listener = function (event) {
1327
+ var midline = canvas.clientWidth / 2;
1328
+ var buttonSize = kButtonWidthDp * kTouchSlopFactor;
1329
+ if (event.clientX > midline - buttonSize && event.clientX < midline + buttonSize && event.clientY > canvas.clientHeight - buttonSize) {
1330
+ optionsCallback(event);
1331
+ }
1332
+ else if (event.clientX < buttonSize && event.clientY < buttonSize) {
1333
+ backCallback(event);
1334
+ }
1335
+ };
1336
+ canvas.addEventListener('click', this.listener, false);
1337
+ };
1338
+ CardboardUI.prototype.onResize = function () {
1339
+ var gl = this.gl;
1340
+ var self = this;
1341
+ var glState = [gl.ARRAY_BUFFER_BINDING];
1342
+ glPreserveState(gl, glState, function (gl) {
1343
+ var vertices = [];
1344
+ var midline = gl.drawingBufferWidth / 2;
1345
+ var physicalPixels = Math.max(screen.width, screen.height) * window.devicePixelRatio;
1346
+ var scalingRatio = gl.drawingBufferWidth / physicalPixels;
1347
+ var dps = scalingRatio * window.devicePixelRatio;
1348
+ var lineWidth = kCenterLineThicknessDp * dps / 2;
1349
+ var buttonSize = kButtonWidthDp * kTouchSlopFactor * dps;
1350
+ var buttonScale = kButtonWidthDp * dps / 2;
1351
+ var buttonBorder = (kButtonWidthDp * kTouchSlopFactor - kButtonWidthDp) * dps;
1352
+ vertices.push(midline - lineWidth, buttonSize);
1353
+ vertices.push(midline - lineWidth, gl.drawingBufferHeight);
1354
+ vertices.push(midline + lineWidth, buttonSize);
1355
+ vertices.push(midline + lineWidth, gl.drawingBufferHeight);
1356
+ self.gearOffset = vertices.length / 2;
1357
+ function addGearSegment(theta, r) {
1358
+ var angle = (90 - theta) * DEG2RAD;
1359
+ var x = Math.cos(angle);
1360
+ var y = Math.sin(angle);
1361
+ vertices.push(kInnerRadius * x * buttonScale + midline, kInnerRadius * y * buttonScale + buttonScale);
1362
+ vertices.push(r * x * buttonScale + midline, r * y * buttonScale + buttonScale);
1363
+ }
1364
+ for (var i = 0; i <= 6; i++) {
1365
+ var segmentTheta = i * kAnglePerGearSection;
1366
+ addGearSegment(segmentTheta, kOuterRadius);
1367
+ addGearSegment(segmentTheta + kOuterRimEndAngle, kOuterRadius);
1368
+ addGearSegment(segmentTheta + kInnerRimBeginAngle, kMiddleRadius);
1369
+ addGearSegment(segmentTheta + (kAnglePerGearSection - kInnerRimBeginAngle), kMiddleRadius);
1370
+ addGearSegment(segmentTheta + (kAnglePerGearSection - kOuterRimEndAngle), kOuterRadius);
1371
+ }
1372
+ self.gearVertexCount = vertices.length / 2 - self.gearOffset;
1373
+ self.arrowOffset = vertices.length / 2;
1374
+ function addArrowVertex(x, y) {
1375
+ vertices.push(buttonBorder + x, gl.drawingBufferHeight - buttonBorder - y);
1376
+ }
1377
+ var angledLineWidth = lineWidth / Math.sin(45 * DEG2RAD);
1378
+ addArrowVertex(0, buttonScale);
1379
+ addArrowVertex(buttonScale, 0);
1380
+ addArrowVertex(buttonScale + angledLineWidth, angledLineWidth);
1381
+ addArrowVertex(angledLineWidth, buttonScale + angledLineWidth);
1382
+ addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);
1383
+ addArrowVertex(0, buttonScale);
1384
+ addArrowVertex(buttonScale, buttonScale * 2);
1385
+ addArrowVertex(buttonScale + angledLineWidth, buttonScale * 2 - angledLineWidth);
1386
+ addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);
1387
+ addArrowVertex(0, buttonScale);
1388
+ addArrowVertex(angledLineWidth, buttonScale - lineWidth);
1389
+ addArrowVertex(kButtonWidthDp * dps, buttonScale - lineWidth);
1390
+ addArrowVertex(angledLineWidth, buttonScale + lineWidth);
1391
+ addArrowVertex(kButtonWidthDp * dps, buttonScale + lineWidth);
1392
+ self.arrowVertexCount = vertices.length / 2 - self.arrowOffset;
1393
+ gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);
1394
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
1395
+ });
1396
+ };
1397
+ CardboardUI.prototype.render = function () {
1398
+ var gl = this.gl;
1399
+ var self = this;
1400
+ var glState = [gl.CULL_FACE, gl.DEPTH_TEST, gl.BLEND, gl.SCISSOR_TEST, gl.STENCIL_TEST, gl.COLOR_WRITEMASK, gl.VIEWPORT, gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING];
1401
+ glPreserveState(gl, glState, function (gl) {
1402
+ gl.disable(gl.CULL_FACE);
1403
+ gl.disable(gl.DEPTH_TEST);
1404
+ gl.disable(gl.BLEND);
1405
+ gl.disable(gl.SCISSOR_TEST);
1406
+ gl.disable(gl.STENCIL_TEST);
1407
+ gl.colorMask(true, true, true, true);
1408
+ gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
1409
+ self.renderNoState();
1410
+ });
1411
+ };
1412
+ CardboardUI.prototype.renderNoState = function () {
1413
+ var gl = this.gl;
1414
+ gl.useProgram(this.program);
1415
+ gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
1416
+ gl.enableVertexAttribArray(this.attribs.position);
1417
+ gl.vertexAttribPointer(this.attribs.position, 2, gl.FLOAT, false, 8, 0);
1418
+ gl.uniform4f(this.uniforms.color, 1.0, 1.0, 1.0, 1.0);
1419
+ orthoMatrix(this.projMat, 0, gl.drawingBufferWidth, 0, gl.drawingBufferHeight, 0.1, 1024.0);
1420
+ gl.uniformMatrix4fv(this.uniforms.projectionMat, false, this.projMat);
1421
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
1422
+ gl.drawArrays(gl.TRIANGLE_STRIP, this.gearOffset, this.gearVertexCount);
1423
+ gl.drawArrays(gl.TRIANGLE_STRIP, this.arrowOffset, this.arrowVertexCount);
1424
+ };
1425
+ function Distortion(coefficients) {
1426
+ this.coefficients = coefficients;
1427
+ }
1428
+ Distortion.prototype.distortInverse = function (radius) {
1429
+ var r0 = 0;
1430
+ var r1 = 1;
1431
+ var dr0 = radius - this.distort(r0);
1432
+ while (Math.abs(r1 - r0) > 0.0001) {
1433
+ var dr1 = radius - this.distort(r1);
1434
+ var r2 = r1 - dr1 * ((r1 - r0) / (dr1 - dr0));
1435
+ r0 = r1;
1436
+ r1 = r2;
1437
+ dr0 = dr1;
1438
+ }
1439
+ return r1;
1440
+ };
1441
+ Distortion.prototype.distort = function (radius) {
1442
+ var r2 = radius * radius;
1443
+ var ret = 0;
1444
+ for (var i = 0; i < this.coefficients.length; i++) {
1445
+ ret = r2 * (ret + this.coefficients[i]);
1446
+ }
1447
+ return (ret + 1) * radius;
1448
+ };
1449
+ var degToRad = Math.PI / 180;
1450
+ var radToDeg = 180 / Math.PI;
1451
+ var Vector3 = function Vector3(x, y, z) {
1452
+ this.x = x || 0;
1453
+ this.y = y || 0;
1454
+ this.z = z || 0;
1455
+ };
1456
+ Vector3.prototype = {
1457
+ constructor: Vector3,
1458
+ set: function set(x, y, z) {
1459
+ this.x = x;
1460
+ this.y = y;
1461
+ this.z = z;
1462
+ return this;
1463
+ },
1464
+ copy: function copy(v) {
1465
+ this.x = v.x;
1466
+ this.y = v.y;
1467
+ this.z = v.z;
1468
+ return this;
1469
+ },
1470
+ length: function length() {
1471
+ return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
1472
+ },
1473
+ normalize: function normalize() {
1474
+ var scalar = this.length();
1475
+ if (scalar !== 0) {
1476
+ var invScalar = 1 / scalar;
1477
+ this.multiplyScalar(invScalar);
1478
+ } else {
1479
+ this.x = 0;
1480
+ this.y = 0;
1481
+ this.z = 0;
1482
+ }
1483
+ return this;
1484
+ },
1485
+ multiplyScalar: function multiplyScalar(scalar) {
1486
+ this.x *= scalar;
1487
+ this.y *= scalar;
1488
+ this.z *= scalar;
1489
+ },
1490
+ applyQuaternion: function applyQuaternion(q) {
1491
+ var x = this.x;
1492
+ var y = this.y;
1493
+ var z = this.z;
1494
+ var qx = q.x;
1495
+ var qy = q.y;
1496
+ var qz = q.z;
1497
+ var qw = q.w;
1498
+ var ix = qw * x + qy * z - qz * y;
1499
+ var iy = qw * y + qz * x - qx * z;
1500
+ var iz = qw * z + qx * y - qy * x;
1501
+ var iw = -qx * x - qy * y - qz * z;
1502
+ this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;
1503
+ this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;
1504
+ this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;
1505
+ return this;
1506
+ },
1507
+ dot: function dot(v) {
1508
+ return this.x * v.x + this.y * v.y + this.z * v.z;
1509
+ },
1510
+ crossVectors: function crossVectors(a, b) {
1511
+ var ax = a.x,
1512
+ ay = a.y,
1513
+ az = a.z;
1514
+ var bx = b.x,
1515
+ by = b.y,
1516
+ bz = b.z;
1517
+ this.x = ay * bz - az * by;
1518
+ this.y = az * bx - ax * bz;
1519
+ this.z = ax * by - ay * bx;
1520
+ return this;
1521
+ }
1522
+ };
1523
+ var Quaternion = function Quaternion(x, y, z, w) {
1524
+ this.x = x || 0;
1525
+ this.y = y || 0;
1526
+ this.z = z || 0;
1527
+ this.w = w !== undefined ? w : 1;
1528
+ };
1529
+ Quaternion.prototype = {
1530
+ constructor: Quaternion,
1531
+ set: function set(x, y, z, w) {
1532
+ this.x = x;
1533
+ this.y = y;
1534
+ this.z = z;
1535
+ this.w = w;
1536
+ return this;
1537
+ },
1538
+ copy: function copy(quaternion) {
1539
+ this.x = quaternion.x;
1540
+ this.y = quaternion.y;
1541
+ this.z = quaternion.z;
1542
+ this.w = quaternion.w;
1543
+ return this;
1544
+ },
1545
+ setFromEulerXYZ: function setFromEulerXYZ(x, y, z) {
1546
+ var c1 = Math.cos(x / 2);
1547
+ var c2 = Math.cos(y / 2);
1548
+ var c3 = Math.cos(z / 2);
1549
+ var s1 = Math.sin(x / 2);
1550
+ var s2 = Math.sin(y / 2);
1551
+ var s3 = Math.sin(z / 2);
1552
+ this.x = s1 * c2 * c3 + c1 * s2 * s3;
1553
+ this.y = c1 * s2 * c3 - s1 * c2 * s3;
1554
+ this.z = c1 * c2 * s3 + s1 * s2 * c3;
1555
+ this.w = c1 * c2 * c3 - s1 * s2 * s3;
1556
+ return this;
1557
+ },
1558
+ setFromEulerYXZ: function setFromEulerYXZ(x, y, z) {
1559
+ var c1 = Math.cos(x / 2);
1560
+ var c2 = Math.cos(y / 2);
1561
+ var c3 = Math.cos(z / 2);
1562
+ var s1 = Math.sin(x / 2);
1563
+ var s2 = Math.sin(y / 2);
1564
+ var s3 = Math.sin(z / 2);
1565
+ this.x = s1 * c2 * c3 + c1 * s2 * s3;
1566
+ this.y = c1 * s2 * c3 - s1 * c2 * s3;
1567
+ this.z = c1 * c2 * s3 - s1 * s2 * c3;
1568
+ this.w = c1 * c2 * c3 + s1 * s2 * s3;
1569
+ return this;
1570
+ },
1571
+ setFromAxisAngle: function setFromAxisAngle(axis, angle) {
1572
+ var halfAngle = angle / 2,
1573
+ s = Math.sin(halfAngle);
1574
+ this.x = axis.x * s;
1575
+ this.y = axis.y * s;
1576
+ this.z = axis.z * s;
1577
+ this.w = Math.cos(halfAngle);
1578
+ return this;
1579
+ },
1580
+ multiply: function multiply(q) {
1581
+ return this.multiplyQuaternions(this, q);
1582
+ },
1583
+ multiplyQuaternions: function multiplyQuaternions(a, b) {
1584
+ var qax = a.x,
1585
+ qay = a.y,
1586
+ qaz = a.z,
1587
+ qaw = a.w;
1588
+ var qbx = b.x,
1589
+ qby = b.y,
1590
+ qbz = b.z,
1591
+ qbw = b.w;
1592
+ this.x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;
1593
+ this.y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;
1594
+ this.z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;
1595
+ this.w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;
1596
+ return this;
1597
+ },
1598
+ inverse: function inverse() {
1599
+ this.x *= -1;
1600
+ this.y *= -1;
1601
+ this.z *= -1;
1602
+ this.normalize();
1603
+ return this;
1604
+ },
1605
+ normalize: function normalize() {
1606
+ var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);
1607
+ if (l === 0) {
1608
+ this.x = 0;
1609
+ this.y = 0;
1610
+ this.z = 0;
1611
+ this.w = 1;
1612
+ } else {
1613
+ l = 1 / l;
1614
+ this.x = this.x * l;
1615
+ this.y = this.y * l;
1616
+ this.z = this.z * l;
1617
+ this.w = this.w * l;
1618
+ }
1619
+ return this;
1620
+ },
1621
+ slerp: function slerp(qb, t) {
1622
+ if (t === 0) return this;
1623
+ if (t === 1) return this.copy(qb);
1624
+ var x = this.x,
1625
+ y = this.y,
1626
+ z = this.z,
1627
+ w = this.w;
1628
+ var cosHalfTheta = w * qb.w + x * qb.x + y * qb.y + z * qb.z;
1629
+ if (cosHalfTheta < 0) {
1630
+ this.w = -qb.w;
1631
+ this.x = -qb.x;
1632
+ this.y = -qb.y;
1633
+ this.z = -qb.z;
1634
+ cosHalfTheta = -cosHalfTheta;
1635
+ } else {
1636
+ this.copy(qb);
1637
+ }
1638
+ if (cosHalfTheta >= 1.0) {
1639
+ this.w = w;
1640
+ this.x = x;
1641
+ this.y = y;
1642
+ this.z = z;
1643
+ return this;
1644
+ }
1645
+ var halfTheta = Math.acos(cosHalfTheta);
1646
+ var sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta);
1647
+ if (Math.abs(sinHalfTheta) < 0.001) {
1648
+ this.w = 0.5 * (w + this.w);
1649
+ this.x = 0.5 * (x + this.x);
1650
+ this.y = 0.5 * (y + this.y);
1651
+ this.z = 0.5 * (z + this.z);
1652
+ return this;
1653
+ }
1654
+ var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,
1655
+ ratioB = Math.sin(t * halfTheta) / sinHalfTheta;
1656
+ this.w = w * ratioA + this.w * ratioB;
1657
+ this.x = x * ratioA + this.x * ratioB;
1658
+ this.y = y * ratioA + this.y * ratioB;
1659
+ this.z = z * ratioA + this.z * ratioB;
1660
+ return this;
1661
+ },
1662
+ setFromUnitVectors: function () {
1663
+ var v1, r;
1664
+ var EPS = 0.000001;
1665
+ return function (vFrom, vTo) {
1666
+ if (v1 === undefined) v1 = new Vector3();
1667
+ r = vFrom.dot(vTo) + 1;
1668
+ if (r < EPS) {
1669
+ r = 0;
1670
+ if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {
1671
+ v1.set(-vFrom.y, vFrom.x, 0);
1672
+ } else {
1673
+ v1.set(0, -vFrom.z, vFrom.y);
1674
+ }
1675
+ } else {
1676
+ v1.crossVectors(vFrom, vTo);
1677
+ }
1678
+ this.x = v1.x;
1679
+ this.y = v1.y;
1680
+ this.z = v1.z;
1681
+ this.w = r;
1682
+ this.normalize();
1683
+ return this;
1684
+ };
1685
+ }()
1686
+ };
1687
+ function Device(params) {
1688
+ this.width = params.width || getScreenWidth();
1689
+ this.height = params.height || getScreenHeight();
1690
+ this.widthMeters = params.widthMeters;
1691
+ this.heightMeters = params.heightMeters;
1692
+ this.bevelMeters = params.bevelMeters;
1693
+ }
1694
+ var DEFAULT_ANDROID = new Device({
1695
+ widthMeters: 0.110,
1696
+ heightMeters: 0.062,
1697
+ bevelMeters: 0.004
1698
+ });
1699
+ var DEFAULT_IOS = new Device({
1700
+ widthMeters: 0.1038,
1701
+ heightMeters: 0.0584,
1702
+ bevelMeters: 0.004
1703
+ });
1704
+ var Viewers = {
1705
+ CardboardV1: new CardboardViewer({
1706
+ id: 'CardboardV1',
1707
+ label: 'Cardboard I/O 2014',
1708
+ fov: 40,
1709
+ interLensDistance: 0.060,
1710
+ baselineLensDistance: 0.035,
1711
+ screenLensDistance: 0.042,
1712
+ distortionCoefficients: [0.441, 0.156],
1713
+ inverseCoefficients: [-0.4410035, 0.42756155, -0.4804439, 0.5460139, -0.58821183, 0.5733938, -0.48303202, 0.33299083, -0.17573841, 0.0651772, -0.01488963, 0.001559834]
1714
+ }),
1715
+ CardboardV2: new CardboardViewer({
1716
+ id: 'CardboardV2',
1717
+ label: 'Cardboard I/O 2015',
1718
+ fov: 60,
1719
+ interLensDistance: 0.064,
1720
+ baselineLensDistance: 0.035,
1721
+ screenLensDistance: 0.039,
1722
+ distortionCoefficients: [0.34, 0.55],
1723
+ inverseCoefficients: [-0.33836704, -0.18162185, 0.862655, -1.2462051, 1.0560602, -0.58208317, 0.21609078, -0.05444823, 0.009177956, -9.904169E-4, 6.183535E-5, -1.6981803E-6]
1724
+ })
1725
+ };
1726
+ function DeviceInfo(deviceParams, additionalViewers) {
1727
+ this.viewer = Viewers.CardboardV2;
1728
+ this.updateDeviceParams(deviceParams);
1729
+ this.distortion = new Distortion(this.viewer.distortionCoefficients);
1730
+ for (var i = 0; i < additionalViewers.length; i++) {
1731
+ var viewer = additionalViewers[i];
1732
+ Viewers[viewer.id] = new CardboardViewer(viewer);
1733
+ }
1734
+ }
1735
+ DeviceInfo.prototype.updateDeviceParams = function (deviceParams) {
1736
+ this.device = this.determineDevice_(deviceParams) || this.device;
1737
+ };
1738
+ DeviceInfo.prototype.getDevice = function () {
1739
+ return this.device;
1740
+ };
1741
+ DeviceInfo.prototype.setViewer = function (viewer) {
1742
+ this.viewer = viewer;
1743
+ this.distortion = new Distortion(this.viewer.distortionCoefficients);
1744
+ };
1745
+ DeviceInfo.prototype.determineDevice_ = function (deviceParams) {
1746
+ if (!deviceParams) {
1747
+ if (isIOS()) {
1748
+ console.warn('Using fallback iOS device measurements.');
1749
+ return DEFAULT_IOS;
1750
+ } else {
1751
+ console.warn('Using fallback Android device measurements.');
1752
+ return DEFAULT_ANDROID;
1753
+ }
1754
+ }
1755
+ var METERS_PER_INCH = 0.0254;
1756
+ var metersPerPixelX = METERS_PER_INCH / deviceParams.xdpi;
1757
+ var metersPerPixelY = METERS_PER_INCH / deviceParams.ydpi;
1758
+ var width = getScreenWidth();
1759
+ var height = getScreenHeight();
1760
+ return new Device({
1761
+ widthMeters: metersPerPixelX * width,
1762
+ heightMeters: metersPerPixelY * height,
1763
+ bevelMeters: deviceParams.bevelMm * 0.001
1764
+ });
1765
+ };
1766
+ DeviceInfo.prototype.getDistortedFieldOfViewLeftEye = function () {
1767
+ var viewer = this.viewer;
1768
+ var device = this.device;
1769
+ var distortion = this.distortion;
1770
+ var eyeToScreenDistance = viewer.screenLensDistance;
1771
+ var outerDist = (device.widthMeters - viewer.interLensDistance) / 2;
1772
+ var innerDist = viewer.interLensDistance / 2;
1773
+ var bottomDist = viewer.baselineLensDistance - device.bevelMeters;
1774
+ var topDist = device.heightMeters - bottomDist;
1775
+ var outerAngle = radToDeg * Math.atan(distortion.distort(outerDist / eyeToScreenDistance));
1776
+ var innerAngle = radToDeg * Math.atan(distortion.distort(innerDist / eyeToScreenDistance));
1777
+ var bottomAngle = radToDeg * Math.atan(distortion.distort(bottomDist / eyeToScreenDistance));
1778
+ var topAngle = radToDeg * Math.atan(distortion.distort(topDist / eyeToScreenDistance));
1779
+ return {
1780
+ leftDegrees: Math.min(outerAngle, viewer.fov),
1781
+ rightDegrees: Math.min(innerAngle, viewer.fov),
1782
+ downDegrees: Math.min(bottomAngle, viewer.fov),
1783
+ upDegrees: Math.min(topAngle, viewer.fov)
1784
+ };
1785
+ };
1786
+ DeviceInfo.prototype.getLeftEyeVisibleTanAngles = function () {
1787
+ var viewer = this.viewer;
1788
+ var device = this.device;
1789
+ var distortion = this.distortion;
1790
+ var fovLeft = Math.tan(-degToRad * viewer.fov);
1791
+ var fovTop = Math.tan(degToRad * viewer.fov);
1792
+ var fovRight = Math.tan(degToRad * viewer.fov);
1793
+ var fovBottom = Math.tan(-degToRad * viewer.fov);
1794
+ var halfWidth = device.widthMeters / 4;
1795
+ var halfHeight = device.heightMeters / 2;
1796
+ var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;
1797
+ var centerX = viewer.interLensDistance / 2 - halfWidth;
1798
+ var centerY = -verticalLensOffset;
1799
+ var centerZ = viewer.screenLensDistance;
1800
+ var screenLeft = distortion.distort((centerX - halfWidth) / centerZ);
1801
+ var screenTop = distortion.distort((centerY + halfHeight) / centerZ);
1802
+ var screenRight = distortion.distort((centerX + halfWidth) / centerZ);
1803
+ var screenBottom = distortion.distort((centerY - halfHeight) / centerZ);
1804
+ var result = new Float32Array(4);
1805
+ result[0] = Math.max(fovLeft, screenLeft);
1806
+ result[1] = Math.min(fovTop, screenTop);
1807
+ result[2] = Math.min(fovRight, screenRight);
1808
+ result[3] = Math.max(fovBottom, screenBottom);
1809
+ return result;
1810
+ };
1811
+ DeviceInfo.prototype.getLeftEyeNoLensTanAngles = function () {
1812
+ var viewer = this.viewer;
1813
+ var device = this.device;
1814
+ var distortion = this.distortion;
1815
+ var result = new Float32Array(4);
1816
+ var fovLeft = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));
1817
+ var fovTop = distortion.distortInverse(Math.tan(degToRad * viewer.fov));
1818
+ var fovRight = distortion.distortInverse(Math.tan(degToRad * viewer.fov));
1819
+ var fovBottom = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));
1820
+ var halfWidth = device.widthMeters / 4;
1821
+ var halfHeight = device.heightMeters / 2;
1822
+ var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;
1823
+ var centerX = viewer.interLensDistance / 2 - halfWidth;
1824
+ var centerY = -verticalLensOffset;
1825
+ var centerZ = viewer.screenLensDistance;
1826
+ var screenLeft = (centerX - halfWidth) / centerZ;
1827
+ var screenTop = (centerY + halfHeight) / centerZ;
1828
+ var screenRight = (centerX + halfWidth) / centerZ;
1829
+ var screenBottom = (centerY - halfHeight) / centerZ;
1830
+ result[0] = Math.max(fovLeft, screenLeft);
1831
+ result[1] = Math.min(fovTop, screenTop);
1832
+ result[2] = Math.min(fovRight, screenRight);
1833
+ result[3] = Math.max(fovBottom, screenBottom);
1834
+ return result;
1835
+ };
1836
+ DeviceInfo.prototype.getLeftEyeVisibleScreenRect = function (undistortedFrustum) {
1837
+ var viewer = this.viewer;
1838
+ var device = this.device;
1839
+ var dist = viewer.screenLensDistance;
1840
+ var eyeX = (device.widthMeters - viewer.interLensDistance) / 2;
1841
+ var eyeY = viewer.baselineLensDistance - device.bevelMeters;
1842
+ var left = (undistortedFrustum[0] * dist + eyeX) / device.widthMeters;
1843
+ var top = (undistortedFrustum[1] * dist + eyeY) / device.heightMeters;
1844
+ var right = (undistortedFrustum[2] * dist + eyeX) / device.widthMeters;
1845
+ var bottom = (undistortedFrustum[3] * dist + eyeY) / device.heightMeters;
1846
+ return {
1847
+ x: left,
1848
+ y: bottom,
1849
+ width: right - left,
1850
+ height: top - bottom
1851
+ };
1852
+ };
1853
+ DeviceInfo.prototype.getFieldOfViewLeftEye = function (opt_isUndistorted) {
1854
+ return opt_isUndistorted ? this.getUndistortedFieldOfViewLeftEye() : this.getDistortedFieldOfViewLeftEye();
1855
+ };
1856
+ DeviceInfo.prototype.getFieldOfViewRightEye = function (opt_isUndistorted) {
1857
+ var fov = this.getFieldOfViewLeftEye(opt_isUndistorted);
1858
+ return {
1859
+ leftDegrees: fov.rightDegrees,
1860
+ rightDegrees: fov.leftDegrees,
1861
+ upDegrees: fov.upDegrees,
1862
+ downDegrees: fov.downDegrees
1863
+ };
1864
+ };
1865
+ DeviceInfo.prototype.getUndistortedFieldOfViewLeftEye = function () {
1866
+ var p = this.getUndistortedParams_();
1867
+ return {
1868
+ leftDegrees: radToDeg * Math.atan(p.outerDist),
1869
+ rightDegrees: radToDeg * Math.atan(p.innerDist),
1870
+ downDegrees: radToDeg * Math.atan(p.bottomDist),
1871
+ upDegrees: radToDeg * Math.atan(p.topDist)
1872
+ };
1873
+ };
1874
+ DeviceInfo.prototype.getUndistortedViewportLeftEye = function () {
1875
+ var p = this.getUndistortedParams_();
1876
+ var viewer = this.viewer;
1877
+ var device = this.device;
1878
+ var eyeToScreenDistance = viewer.screenLensDistance;
1879
+ var screenWidth = device.widthMeters / eyeToScreenDistance;
1880
+ var screenHeight = device.heightMeters / eyeToScreenDistance;
1881
+ var xPxPerTanAngle = device.width / screenWidth;
1882
+ var yPxPerTanAngle = device.height / screenHeight;
1883
+ var x = Math.round((p.eyePosX - p.outerDist) * xPxPerTanAngle);
1884
+ var y = Math.round((p.eyePosY - p.bottomDist) * yPxPerTanAngle);
1885
+ return {
1886
+ x: x,
1887
+ y: y,
1888
+ width: Math.round((p.eyePosX + p.innerDist) * xPxPerTanAngle) - x,
1889
+ height: Math.round((p.eyePosY + p.topDist) * yPxPerTanAngle) - y
1890
+ };
1891
+ };
1892
+ DeviceInfo.prototype.getUndistortedParams_ = function () {
1893
+ var viewer = this.viewer;
1894
+ var device = this.device;
1895
+ var distortion = this.distortion;
1896
+ var eyeToScreenDistance = viewer.screenLensDistance;
1897
+ var halfLensDistance = viewer.interLensDistance / 2 / eyeToScreenDistance;
1898
+ var screenWidth = device.widthMeters / eyeToScreenDistance;
1899
+ var screenHeight = device.heightMeters / eyeToScreenDistance;
1900
+ var eyePosX = screenWidth / 2 - halfLensDistance;
1901
+ var eyePosY = (viewer.baselineLensDistance - device.bevelMeters) / eyeToScreenDistance;
1902
+ var maxFov = viewer.fov;
1903
+ var viewerMax = distortion.distortInverse(Math.tan(degToRad * maxFov));
1904
+ var outerDist = Math.min(eyePosX, viewerMax);
1905
+ var innerDist = Math.min(halfLensDistance, viewerMax);
1906
+ var bottomDist = Math.min(eyePosY, viewerMax);
1907
+ var topDist = Math.min(screenHeight - eyePosY, viewerMax);
1908
+ return {
1909
+ outerDist: outerDist,
1910
+ innerDist: innerDist,
1911
+ topDist: topDist,
1912
+ bottomDist: bottomDist,
1913
+ eyePosX: eyePosX,
1914
+ eyePosY: eyePosY
1915
+ };
1916
+ };
1917
+ function CardboardViewer(params) {
1918
+ this.id = params.id;
1919
+ this.label = params.label;
1920
+ this.fov = params.fov;
1921
+ this.interLensDistance = params.interLensDistance;
1922
+ this.baselineLensDistance = params.baselineLensDistance;
1923
+ this.screenLensDistance = params.screenLensDistance;
1924
+ this.distortionCoefficients = params.distortionCoefficients;
1925
+ this.inverseCoefficients = params.inverseCoefficients;
1926
+ }
1927
+ DeviceInfo.Viewers = Viewers;
1928
+ var format = 1;
1929
+ var last_updated = "2018-02-20T22:55:10Z";
1930
+ var devices = [{ "type": "android", "rules": [{ "mdmh": "asus/*/Nexus 7/*" }, { "ua": "Nexus 7" }], "dpi": [320.8, 323], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "asus/*/ASUS_Z00AD/*" }, { "ua": "ASUS_Z00AD" }], "dpi": [403, 404.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Google/*/Pixel XL/*" }, { "ua": "Pixel XL" }], "dpi": [537.9, 533], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Google/*/Pixel/*" }, { "ua": "Pixel" }], "dpi": [432.6, 436.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "HTC/*/HTC6435LVW/*" }, { "ua": "HTC6435LVW" }], "dpi": [449.7, 443.3], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "HTC/*/HTC One XL/*" }, { "ua": "HTC One XL" }], "dpi": [315.3, 314.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "htc/*/Nexus 9/*" }, { "ua": "Nexus 9" }], "dpi": 289, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "HTC/*/HTC One M9/*" }, { "ua": "HTC One M9" }], "dpi": [442.5, 443.3], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "HTC/*/HTC One_M8/*" }, { "ua": "HTC One_M8" }], "dpi": [449.7, 447.4], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "HTC/*/HTC One/*" }, { "ua": "HTC One" }], "dpi": 472.8, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Huawei/*/Nexus 6P/*" }, { "ua": "Nexus 6P" }], "dpi": [515.1, 518], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LENOVO/*/Lenovo PB2-690Y/*" }, { "ua": "Lenovo PB2-690Y" }], "dpi": [457.2, 454.713], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/Nexus 5X/*" }, { "ua": "Nexus 5X" }], "dpi": [422, 419.9], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LGMS345/*" }, { "ua": "LGMS345" }], "dpi": [221.7, 219.1], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LG-D800/*" }, { "ua": "LG-D800" }], "dpi": [422, 424.1], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LG-D850/*" }, { "ua": "LG-D850" }], "dpi": [537.9, 541.9], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/VS985 4G/*" }, { "ua": "VS985 4G" }], "dpi": [537.9, 535.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/Nexus 5/*" }, { "ua": "Nexus 5 B" }], "dpi": [442.4, 444.8], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/Nexus 4/*" }, { "ua": "Nexus 4" }], "dpi": [319.8, 318.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LG-P769/*" }, { "ua": "LG-P769" }], "dpi": [240.6, 247.5], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LGMS323/*" }, { "ua": "LGMS323" }], "dpi": [206.6, 204.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "LGE/*/LGLS996/*" }, { "ua": "LGLS996" }], "dpi": [403.4, 401.5], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Micromax/*/4560MMX/*" }, { "ua": "4560MMX" }], "dpi": [240, 219.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Micromax/*/A250/*" }, { "ua": "Micromax A250" }], "dpi": [480, 446.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Micromax/*/Micromax AQ4501/*" }, { "ua": "Micromax AQ4501" }], "dpi": 240, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/G5/*" }, { "ua": "Moto G (5) Plus" }], "dpi": [403.4, 403], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/DROID RAZR/*" }, { "ua": "DROID RAZR" }], "dpi": [368.1, 256.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT830C/*" }, { "ua": "XT830C" }], "dpi": [254, 255.9], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1021/*" }, { "ua": "XT1021" }], "dpi": [254, 256.7], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1023/*" }, { "ua": "XT1023" }], "dpi": [254, 256.7], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1028/*" }, { "ua": "XT1028" }], "dpi": [326.6, 327.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1034/*" }, { "ua": "XT1034" }], "dpi": [326.6, 328.4], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1053/*" }, { "ua": "XT1053" }], "dpi": [315.3, 316.1], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1562/*" }, { "ua": "XT1562" }], "dpi": [403.4, 402.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/Nexus 6/*" }, { "ua": "Nexus 6 B" }], "dpi": [494.3, 489.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1063/*" }, { "ua": "XT1063" }], "dpi": [295, 296.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1064/*" }, { "ua": "XT1064" }], "dpi": [295, 295.6], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1092/*" }, { "ua": "XT1092" }], "dpi": [422, 424.1], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/XT1095/*" }, { "ua": "XT1095" }], "dpi": [422, 423.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "motorola/*/G4/*" }, { "ua": "Moto G (4)" }], "dpi": 401, "bw": 4, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OnePlus/*/A0001/*" }, { "ua": "A0001" }], "dpi": [403.4, 401], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OnePlus/*/ONE E1005/*" }, { "ua": "ONE E1005" }], "dpi": [442.4, 441.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OnePlus/*/ONE A2005/*" }, { "ua": "ONE A2005" }], "dpi": [391.9, 405.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OnePlus/*/ONEPLUS A5000/*" }, { "ua": "ONEPLUS A5000 " }], "dpi": [403.411, 399.737], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OnePlus/*/ONE A5010/*" }, { "ua": "ONEPLUS A5010" }], "dpi": [403, 400], "bw": 2, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "OPPO/*/X909/*" }, { "ua": "X909" }], "dpi": [442.4, 444.1], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9082/*" }, { "ua": "GT-I9082" }], "dpi": [184.7, 185.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G360P/*" }, { "ua": "SM-G360P" }], "dpi": [196.7, 205.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/Nexus S/*" }, { "ua": "Nexus S" }], "dpi": [234.5, 229.8], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9300/*" }, { "ua": "GT-I9300" }], "dpi": [304.8, 303.9], "bw": 5, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-T230NU/*" }, { "ua": "SM-T230NU" }], "dpi": 216, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SGH-T399/*" }, { "ua": "SGH-T399" }], "dpi": [217.7, 231.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SGH-M919/*" }, { "ua": "SGH-M919" }], "dpi": [440.8, 437.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N9005/*" }, { "ua": "SM-N9005" }], "dpi": [386.4, 387], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SAMSUNG-SM-N900A/*" }, { "ua": "SAMSUNG-SM-N900A" }], "dpi": [386.4, 387.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9500/*" }, { "ua": "GT-I9500" }], "dpi": [442.5, 443.3], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9505/*" }, { "ua": "GT-I9505" }], "dpi": 439.4, "bw": 4, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G900F/*" }, { "ua": "SM-G900F" }], "dpi": [415.6, 431.6], "bw": 5, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G900M/*" }, { "ua": "SM-G900M" }], "dpi": [415.6, 431.6], "bw": 5, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G800F/*" }, { "ua": "SM-G800F" }], "dpi": 326.8, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G906S/*" }, { "ua": "SM-G906S" }], "dpi": [562.7, 572.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9300/*" }, { "ua": "GT-I9300" }], "dpi": [306.7, 304.8], "bw": 5, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-T535/*" }, { "ua": "SM-T535" }], "dpi": [142.6, 136.4], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N920C/*" }, { "ua": "SM-N920C" }], "dpi": [515.1, 518.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N920P/*" }, { "ua": "SM-N920P" }], "dpi": [386.3655, 390.144], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N920W8/*" }, { "ua": "SM-N920W8" }], "dpi": [515.1, 518.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9300I/*" }, { "ua": "GT-I9300I" }], "dpi": [304.8, 305.8], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-I9195/*" }, { "ua": "GT-I9195" }], "dpi": [249.4, 256.7], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SPH-L520/*" }, { "ua": "SPH-L520" }], "dpi": [249.4, 255.9], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SAMSUNG-SGH-I717/*" }, { "ua": "SAMSUNG-SGH-I717" }], "dpi": 285.8, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SPH-D710/*" }, { "ua": "SPH-D710" }], "dpi": [217.7, 204.2], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/GT-N7100/*" }, { "ua": "GT-N7100" }], "dpi": 265.1, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SCH-I605/*" }, { "ua": "SCH-I605" }], "dpi": 265.1, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/Galaxy Nexus/*" }, { "ua": "Galaxy Nexus" }], "dpi": [315.3, 314.2], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N910H/*" }, { "ua": "SM-N910H" }], "dpi": [515.1, 518], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-N910C/*" }, { "ua": "SM-N910C" }], "dpi": [515.2, 520.2], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G130M/*" }, { "ua": "SM-G130M" }], "dpi": [165.9, 164.8], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G928I/*" }, { "ua": "SM-G928I" }], "dpi": [515.1, 518.4], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G920F/*" }, { "ua": "SM-G920F" }], "dpi": 580.6, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G920P/*" }, { "ua": "SM-G920P" }], "dpi": [522.5, 577], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G925F/*" }, { "ua": "SM-G925F" }], "dpi": 580.6, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G925V/*" }, { "ua": "SM-G925V" }], "dpi": [522.5, 576.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G930F/*" }, { "ua": "SM-G930F" }], "dpi": 576.6, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G935F/*" }, { "ua": "SM-G935F" }], "dpi": 533, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G950F/*" }, { "ua": "SM-G950F" }], "dpi": [562.707, 565.293], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "samsung/*/SM-G955U/*" }, { "ua": "SM-G955U" }], "dpi": [522.514, 525.762], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "Sony/*/C6903/*" }, { "ua": "C6903" }], "dpi": [442.5, 443.3], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "Sony/*/D6653/*" }, { "ua": "D6653" }], "dpi": [428.6, 427.6], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Sony/*/E6653/*" }, { "ua": "E6653" }], "dpi": [428.6, 425.7], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Sony/*/E6853/*" }, { "ua": "E6853" }], "dpi": [403.4, 401.9], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Sony/*/SGP321/*" }, { "ua": "SGP321" }], "dpi": [224.7, 224.1], "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "TCT/*/ALCATEL ONE TOUCH Fierce/*" }, { "ua": "ALCATEL ONE TOUCH Fierce" }], "dpi": [240, 247.5], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "THL/*/thl 5000/*" }, { "ua": "thl 5000" }], "dpi": [480, 443.3], "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "Fly/*/IQ4412/*" }, { "ua": "IQ4412" }], "dpi": 307.9, "bw": 3, "ac": 1000 }, { "type": "android", "rules": [{ "mdmh": "ZTE/*/ZTE Blade L2/*" }, { "ua": "ZTE Blade L2" }], "dpi": 240, "bw": 3, "ac": 500 }, { "type": "android", "rules": [{ "mdmh": "BENEVE/*/VR518/*" }, { "ua": "VR518" }], "dpi": 480, "bw": 3, "ac": 500 }, { "type": "ios", "rules": [{ "res": [640, 960] }], "dpi": [325.1, 328.4], "bw": 4, "ac": 1000 }, { "type": "ios", "rules": [{ "res": [640, 1136] }], "dpi": [317.1, 320.2], "bw": 3, "ac": 1000 }, { "type": "ios", "rules": [{ "res": [750, 1334] }], "dpi": 326.4, "bw": 4, "ac": 1000 }, { "type": "ios", "rules": [{ "res": [1242, 2208] }], "dpi": [453.6, 458.4], "bw": 4, "ac": 1000 }, { "type": "ios", "rules": [{ "res": [1125, 2001] }], "dpi": [410.9, 415.4], "bw": 4, "ac": 1000 }, { "type": "ios", "rules": [{ "res": [1125, 2436] }], "dpi": 458, "bw": 4, "ac": 1000 }];
1931
+ var DPDB_CACHE = {
1932
+ format: format,
1933
+ last_updated: last_updated,
1934
+ devices: devices
1935
+ };
1936
+ function Dpdb(url, onDeviceParamsUpdated) {
1937
+ this.dpdb = DPDB_CACHE;
1938
+ this.recalculateDeviceParams_();
1939
+ if (url) {
1940
+ this.onDeviceParamsUpdated = onDeviceParamsUpdated;
1941
+ var xhr = new XMLHttpRequest();
1942
+ var obj = this;
1943
+ xhr.open('GET', url, true);
1944
+ xhr.addEventListener('load', function () {
1945
+ obj.loading = false;
1946
+ if (xhr.status >= 200 && xhr.status <= 299) {
1947
+ obj.dpdb = JSON.parse(xhr.response);
1948
+ obj.recalculateDeviceParams_();
1949
+ } else {
1950
+ console.error('Error loading online DPDB!');
1951
+ }
1952
+ });
1953
+ xhr.send();
1954
+ }
1955
+ }
1956
+ Dpdb.prototype.getDeviceParams = function () {
1957
+ return this.deviceParams;
1958
+ };
1959
+ Dpdb.prototype.recalculateDeviceParams_ = function () {
1960
+ var newDeviceParams = this.calcDeviceParams_();
1961
+ if (newDeviceParams) {
1962
+ this.deviceParams = newDeviceParams;
1963
+ if (this.onDeviceParamsUpdated) {
1964
+ this.onDeviceParamsUpdated(this.deviceParams);
1965
+ }
1966
+ } else {
1967
+ console.error('Failed to recalculate device parameters.');
1968
+ }
1969
+ };
1970
+ Dpdb.prototype.calcDeviceParams_ = function () {
1971
+ var db = this.dpdb;
1972
+ if (!db) {
1973
+ console.error('DPDB not available.');
1974
+ return null;
1975
+ }
1976
+ if (db.format != 1) {
1977
+ console.error('DPDB has unexpected format version.');
1978
+ return null;
1979
+ }
1980
+ if (!db.devices || !db.devices.length) {
1981
+ console.error('DPDB does not have a devices section.');
1982
+ return null;
1983
+ }
1984
+ var userAgent = navigator.userAgent || navigator.vendor || window.opera;
1985
+ var width = getScreenWidth();
1986
+ var height = getScreenHeight();
1987
+ if (!db.devices) {
1988
+ console.error('DPDB has no devices section.');
1989
+ return null;
1990
+ }
1991
+ for (var i = 0; i < db.devices.length; i++) {
1992
+ var device = db.devices[i];
1993
+ if (!device.rules) {
1994
+ console.warn('Device[' + i + '] has no rules section.');
1995
+ continue;
1996
+ }
1997
+ if (device.type != 'ios' && device.type != 'android') {
1998
+ console.warn('Device[' + i + '] has invalid type.');
1999
+ continue;
2000
+ }
2001
+ if (isIOS() != (device.type == 'ios')) continue;
2002
+ var matched = false;
2003
+ for (var j = 0; j < device.rules.length; j++) {
2004
+ var rule = device.rules[j];
2005
+ if (this.matchRule_(rule, userAgent, width, height)) {
2006
+ matched = true;
2007
+ break;
2008
+ }
2009
+ }
2010
+ if (!matched) continue;
2011
+ var xdpi = device.dpi[0] || device.dpi;
2012
+ var ydpi = device.dpi[1] || device.dpi;
2013
+ return new DeviceParams({ xdpi: xdpi, ydpi: ydpi, bevelMm: device.bw });
2014
+ }
2015
+ console.warn('No DPDB device match.');
2016
+ return null;
2017
+ };
2018
+ Dpdb.prototype.matchRule_ = function (rule, ua, screenWidth, screenHeight) {
2019
+ if (!rule.ua && !rule.res) return false;
2020
+ if (rule.ua && ua.indexOf(rule.ua) < 0) return false;
2021
+ if (rule.res) {
2022
+ if (!rule.res[0] || !rule.res[1]) return false;
2023
+ var resX = rule.res[0];
2024
+ var resY = rule.res[1];
2025
+ if (Math.min(screenWidth, screenHeight) != Math.min(resX, resY) || Math.max(screenWidth, screenHeight) != Math.max(resX, resY)) {
2026
+ return false;
2027
+ }
2028
+ }
2029
+ return true;
2030
+ };
2031
+ function DeviceParams(params) {
2032
+ this.xdpi = params.xdpi;
2033
+ this.ydpi = params.ydpi;
2034
+ this.bevelMm = params.bevelMm;
2035
+ }
2036
+ function SensorSample(sample, timestampS) {
2037
+ this.set(sample, timestampS);
2038
+ }
2039
+ SensorSample.prototype.set = function (sample, timestampS) {
2040
+ this.sample = sample;
2041
+ this.timestampS = timestampS;
2042
+ };
2043
+ SensorSample.prototype.copy = function (sensorSample) {
2044
+ this.set(sensorSample.sample, sensorSample.timestampS);
2045
+ };
2046
+ function ComplementaryFilter(kFilter, isDebug) {
2047
+ this.kFilter = kFilter;
2048
+ this.isDebug = isDebug;
2049
+ this.currentAccelMeasurement = new SensorSample();
2050
+ this.currentGyroMeasurement = new SensorSample();
2051
+ this.previousGyroMeasurement = new SensorSample();
2052
+ if (isIOS()) {
2053
+ this.filterQ = new Quaternion(-1, 0, 0, 1);
2054
+ } else {
2055
+ this.filterQ = new Quaternion(1, 0, 0, 1);
2056
+ }
2057
+ this.previousFilterQ = new Quaternion();
2058
+ this.previousFilterQ.copy(this.filterQ);
2059
+ this.accelQ = new Quaternion();
2060
+ this.isOrientationInitialized = false;
2061
+ this.estimatedGravity = new Vector3();
2062
+ this.measuredGravity = new Vector3();
2063
+ this.gyroIntegralQ = new Quaternion();
2064
+ }
2065
+ ComplementaryFilter.prototype.addAccelMeasurement = function (vector, timestampS) {
2066
+ this.currentAccelMeasurement.set(vector, timestampS);
2067
+ };
2068
+ ComplementaryFilter.prototype.addGyroMeasurement = function (vector, timestampS) {
2069
+ this.currentGyroMeasurement.set(vector, timestampS);
2070
+ var deltaT = timestampS - this.previousGyroMeasurement.timestampS;
2071
+ if (isTimestampDeltaValid(deltaT)) {
2072
+ this.run_();
2073
+ }
2074
+ this.previousGyroMeasurement.copy(this.currentGyroMeasurement);
2075
+ };
2076
+ ComplementaryFilter.prototype.run_ = function () {
2077
+ if (!this.isOrientationInitialized) {
2078
+ this.accelQ = this.accelToQuaternion_(this.currentAccelMeasurement.sample);
2079
+ this.previousFilterQ.copy(this.accelQ);
2080
+ this.isOrientationInitialized = true;
2081
+ return;
2082
+ }
2083
+ var deltaT = this.currentGyroMeasurement.timestampS - this.previousGyroMeasurement.timestampS;
2084
+ var gyroDeltaQ = this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample, deltaT);
2085
+ this.gyroIntegralQ.multiply(gyroDeltaQ);
2086
+ this.filterQ.copy(this.previousFilterQ);
2087
+ this.filterQ.multiply(gyroDeltaQ);
2088
+ var invFilterQ = new Quaternion();
2089
+ invFilterQ.copy(this.filterQ);
2090
+ invFilterQ.inverse();
2091
+ this.estimatedGravity.set(0, 0, -1);
2092
+ this.estimatedGravity.applyQuaternion(invFilterQ);
2093
+ this.estimatedGravity.normalize();
2094
+ this.measuredGravity.copy(this.currentAccelMeasurement.sample);
2095
+ this.measuredGravity.normalize();
2096
+ var deltaQ = new Quaternion();
2097
+ deltaQ.setFromUnitVectors(this.estimatedGravity, this.measuredGravity);
2098
+ deltaQ.inverse();
2099
+ if (this.isDebug) {
2100
+ console.log('Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)', radToDeg * getQuaternionAngle(deltaQ), this.estimatedGravity.x.toFixed(1), this.estimatedGravity.y.toFixed(1), this.estimatedGravity.z.toFixed(1), this.measuredGravity.x.toFixed(1), this.measuredGravity.y.toFixed(1), this.measuredGravity.z.toFixed(1));
2101
+ }
2102
+ var targetQ = new Quaternion();
2103
+ targetQ.copy(this.filterQ);
2104
+ targetQ.multiply(deltaQ);
2105
+ this.filterQ.slerp(targetQ, 1 - this.kFilter);
2106
+ this.previousFilterQ.copy(this.filterQ);
2107
+ };
2108
+ ComplementaryFilter.prototype.getOrientation = function () {
2109
+ return this.filterQ;
2110
+ };
2111
+ ComplementaryFilter.prototype.accelToQuaternion_ = function (accel) {
2112
+ var normAccel = new Vector3();
2113
+ normAccel.copy(accel);
2114
+ normAccel.normalize();
2115
+ var quat = new Quaternion();
2116
+ quat.setFromUnitVectors(new Vector3(0, 0, -1), normAccel);
2117
+ quat.inverse();
2118
+ return quat;
2119
+ };
2120
+ ComplementaryFilter.prototype.gyroToQuaternionDelta_ = function (gyro, dt) {
2121
+ var quat = new Quaternion();
2122
+ var axis = new Vector3();
2123
+ axis.copy(gyro);
2124
+ axis.normalize();
2125
+ quat.setFromAxisAngle(axis, gyro.length() * dt);
2126
+ return quat;
2127
+ };
2128
+ function PosePredictor(predictionTimeS, isDebug) {
2129
+ this.predictionTimeS = predictionTimeS;
2130
+ this.isDebug = isDebug;
2131
+ this.previousQ = new Quaternion();
2132
+ this.previousTimestampS = null;
2133
+ this.deltaQ = new Quaternion();
2134
+ this.outQ = new Quaternion();
2135
+ }
2136
+ PosePredictor.prototype.getPrediction = function (currentQ, gyro, timestampS) {
2137
+ if (!this.previousTimestampS) {
2138
+ this.previousQ.copy(currentQ);
2139
+ this.previousTimestampS = timestampS;
2140
+ return currentQ;
2141
+ }
2142
+ var axis = new Vector3();
2143
+ axis.copy(gyro);
2144
+ axis.normalize();
2145
+ var angularSpeed = gyro.length();
2146
+ if (angularSpeed < degToRad * 20) {
2147
+ if (this.isDebug) {
2148
+ console.log('Moving slowly, at %s deg/s: no prediction', (radToDeg * angularSpeed).toFixed(1));
2149
+ }
2150
+ this.outQ.copy(currentQ);
2151
+ this.previousQ.copy(currentQ);
2152
+ return this.outQ;
2153
+ }
2154
+ var predictAngle = angularSpeed * this.predictionTimeS;
2155
+ this.deltaQ.setFromAxisAngle(axis, predictAngle);
2156
+ this.outQ.copy(this.previousQ);
2157
+ this.outQ.multiply(this.deltaQ);
2158
+ this.previousQ.copy(currentQ);
2159
+ this.previousTimestampS = timestampS;
2160
+ return this.outQ;
2161
+ };
2162
+ function FusionPoseSensor(kFilter, predictionTime, yawOnly, isDebug) {
2163
+ this.yawOnly = yawOnly;
2164
+ this.accelerometer = new Vector3();
2165
+ this.gyroscope = new Vector3();
2166
+ this.filter = new ComplementaryFilter(kFilter, isDebug);
2167
+ this.posePredictor = new PosePredictor(predictionTime, isDebug);
2168
+ this.isFirefoxAndroid = isFirefoxAndroid();
2169
+ this.isIOS = isIOS();
2170
+ var chromeVersion = getChromeVersion();
2171
+ this.isDeviceMotionInRadians = !this.isIOS && chromeVersion && chromeVersion < 66;
2172
+ this.isWithoutDeviceMotion = isChromeWithoutDeviceMotion();
2173
+ this.filterToWorldQ = new Quaternion();
2174
+ if (isIOS()) {
2175
+ this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), Math.PI / 2);
2176
+ } else {
2177
+ this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);
2178
+ }
2179
+ this.inverseWorldToScreenQ = new Quaternion();
2180
+ this.worldToScreenQ = new Quaternion();
2181
+ this.originalPoseAdjustQ = new Quaternion();
2182
+ this.originalPoseAdjustQ.setFromAxisAngle(new Vector3(0, 0, 1), -window.orientation * Math.PI / 180);
2183
+ this.setScreenTransform_();
2184
+ if (isLandscapeMode()) {
2185
+ this.filterToWorldQ.multiply(this.inverseWorldToScreenQ);
2186
+ }
2187
+ this.resetQ = new Quaternion();
2188
+ this.orientationOut_ = new Float32Array(4);
2189
+ this.start();
2190
+ }
2191
+ FusionPoseSensor.prototype.getPosition = function () {
2192
+ return null;
2193
+ };
2194
+ FusionPoseSensor.prototype.getOrientation = function () {
2195
+ var orientation = void 0;
2196
+ if (this.isWithoutDeviceMotion && this._deviceOrientationQ) {
2197
+ this.deviceOrientationFixQ = this.deviceOrientationFixQ || function () {
2198
+ var z = new Quaternion().setFromAxisAngle(new Vector3(0, 0, -1), 0);
2199
+ var y = new Quaternion();
2200
+ if (window.orientation === -90) {
2201
+ y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / -2);
2202
+ } else {
2203
+ y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / 2);
2204
+ }
2205
+ return z.multiply(y);
2206
+ }();
2207
+ this.deviceOrientationFilterToWorldQ = this.deviceOrientationFilterToWorldQ || function () {
2208
+ var q = new Quaternion();
2209
+ q.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);
2210
+ return q;
2211
+ }();
2212
+ orientation = this._deviceOrientationQ;
2213
+ var out = new Quaternion();
2214
+ out.copy(orientation);
2215
+ out.multiply(this.deviceOrientationFilterToWorldQ);
2216
+ out.multiply(this.resetQ);
2217
+ out.multiply(this.worldToScreenQ);
2218
+ out.multiplyQuaternions(this.deviceOrientationFixQ, out);
2219
+ if (this.yawOnly) {
2220
+ out.x = 0;
2221
+ out.z = 0;
2222
+ out.normalize();
2223
+ }
2224
+ this.orientationOut_[0] = out.x;
2225
+ this.orientationOut_[1] = out.y;
2226
+ this.orientationOut_[2] = out.z;
2227
+ this.orientationOut_[3] = out.w;
2228
+ return this.orientationOut_;
2229
+ } else {
2230
+ var filterOrientation = this.filter.getOrientation();
2231
+ orientation = this.posePredictor.getPrediction(filterOrientation, this.gyroscope, this.previousTimestampS);
2232
+ }
2233
+ var out = new Quaternion();
2234
+ out.copy(this.filterToWorldQ);
2235
+ out.multiply(this.resetQ);
2236
+ out.multiply(orientation);
2237
+ out.multiply(this.worldToScreenQ);
2238
+ if (this.yawOnly) {
2239
+ out.x = 0;
2240
+ out.z = 0;
2241
+ out.normalize();
2242
+ }
2243
+ this.orientationOut_[0] = out.x;
2244
+ this.orientationOut_[1] = out.y;
2245
+ this.orientationOut_[2] = out.z;
2246
+ this.orientationOut_[3] = out.w;
2247
+ return this.orientationOut_;
2248
+ };
2249
+ FusionPoseSensor.prototype.resetPose = function () {
2250
+ this.resetQ.copy(this.filter.getOrientation());
2251
+ this.resetQ.x = 0;
2252
+ this.resetQ.y = 0;
2253
+ this.resetQ.z *= -1;
2254
+ this.resetQ.normalize();
2255
+ if (isLandscapeMode()) {
2256
+ this.resetQ.multiply(this.inverseWorldToScreenQ);
2257
+ }
2258
+ this.resetQ.multiply(this.originalPoseAdjustQ);
2259
+ };
2260
+ FusionPoseSensor.prototype.onDeviceOrientation_ = function (e) {
2261
+ this._deviceOrientationQ = this._deviceOrientationQ || new Quaternion();
2262
+ var alpha = e.alpha,
2263
+ beta = e.beta,
2264
+ gamma = e.gamma;
2265
+ alpha = (alpha || 0) * Math.PI / 180;
2266
+ beta = (beta || 0) * Math.PI / 180;
2267
+ gamma = (gamma || 0) * Math.PI / 180;
2268
+ this._deviceOrientationQ.setFromEulerYXZ(beta, alpha, -gamma);
2269
+ };
2270
+ FusionPoseSensor.prototype.onDeviceMotion_ = function (deviceMotion) {
2271
+ this.updateDeviceMotion_(deviceMotion);
2272
+ };
2273
+ FusionPoseSensor.prototype.updateDeviceMotion_ = function (deviceMotion) {
2274
+ var accGravity = deviceMotion.accelerationIncludingGravity;
2275
+ var rotRate = deviceMotion.rotationRate;
2276
+ var timestampS = deviceMotion.timeStamp / 1000;
2277
+ var deltaS = timestampS - this.previousTimestampS;
2278
+ if (deltaS < 0) {
2279
+ warnOnce('fusion-pose-sensor:invalid:non-monotonic', 'Invalid timestamps detected: non-monotonic timestamp from devicemotion');
2280
+ this.previousTimestampS = timestampS;
2281
+ return;
2282
+ } else if (deltaS <= MIN_TIMESTEP || deltaS > MAX_TIMESTEP) {
2283
+ warnOnce('fusion-pose-sensor:invalid:outside-threshold', 'Invalid timestamps detected: Timestamp from devicemotion outside expected range.');
2284
+ this.previousTimestampS = timestampS;
2285
+ return;
2286
+ }
2287
+ this.accelerometer.set(-accGravity.x, -accGravity.y, -accGravity.z);
2288
+ if (isR7()) {
2289
+ this.gyroscope.set(-rotRate.beta, rotRate.alpha, rotRate.gamma);
2290
+ } else {
2291
+ this.gyroscope.set(rotRate.alpha, rotRate.beta, rotRate.gamma);
2292
+ }
2293
+ if (!this.isDeviceMotionInRadians) {
2294
+ this.gyroscope.multiplyScalar(Math.PI / 180);
2295
+ }
2296
+ this.filter.addAccelMeasurement(this.accelerometer, timestampS);
2297
+ this.filter.addGyroMeasurement(this.gyroscope, timestampS);
2298
+ this.previousTimestampS = timestampS;
2299
+ };
2300
+ FusionPoseSensor.prototype.onOrientationChange_ = function (screenOrientation) {
2301
+ this.setScreenTransform_();
2302
+ };
2303
+ FusionPoseSensor.prototype.onMessage_ = function (event) {
2304
+ var message = event.data;
2305
+ if (!message || !message.type) {
2306
+ return;
2307
+ }
2308
+ var type = message.type.toLowerCase();
2309
+ if (type !== 'devicemotion') {
2310
+ return;
2311
+ }
2312
+ this.updateDeviceMotion_(message.deviceMotionEvent);
2313
+ };
2314
+ FusionPoseSensor.prototype.setScreenTransform_ = function () {
2315
+ this.worldToScreenQ.set(0, 0, 0, 1);
2316
+ switch (window.orientation) {
2317
+ case 0:
2318
+ break;
2319
+ case 90:
2320
+ this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), -Math.PI / 2);
2321
+ break;
2322
+ case -90:
2323
+ this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), Math.PI / 2);
2324
+ break;
2325
+ }
2326
+ this.inverseWorldToScreenQ.copy(this.worldToScreenQ);
2327
+ this.inverseWorldToScreenQ.inverse();
2328
+ };
2329
+ FusionPoseSensor.prototype.start = function () {
2330
+ this.onDeviceMotionCallback_ = this.onDeviceMotion_.bind(this);
2331
+ this.onOrientationChangeCallback_ = this.onOrientationChange_.bind(this);
2332
+ this.onMessageCallback_ = this.onMessage_.bind(this);
2333
+ this.onDeviceOrientationCallback_ = this.onDeviceOrientation_.bind(this);
2334
+ if (isIOS() && isInsideCrossOriginIFrame()) {
2335
+ window.addEventListener('message', this.onMessageCallback_);
2336
+ }
2337
+ window.addEventListener('orientationchange', this.onOrientationChangeCallback_);
2338
+ if (this.isWithoutDeviceMotion) {
2339
+ window.addEventListener('deviceorientation', this.onDeviceOrientationCallback_);
2340
+ } else {
2341
+ window.addEventListener('devicemotion', this.onDeviceMotionCallback_);
2342
+ }
2343
+ };
2344
+ FusionPoseSensor.prototype.stop = function () {
2345
+ window.removeEventListener('devicemotion', this.onDeviceMotionCallback_);
2346
+ window.removeEventListener('deviceorientation', this.onDeviceOrientationCallback_);
2347
+ window.removeEventListener('orientationchange', this.onOrientationChangeCallback_);
2348
+ window.removeEventListener('message', this.onMessageCallback_);
2349
+ };
2350
+ var SENSOR_FREQUENCY = 60;
2351
+ var X_AXIS = new Vector3(1, 0, 0);
2352
+ var Z_AXIS = new Vector3(0, 0, 1);
2353
+ var orientation = {};
2354
+ if (screen.orientation) {
2355
+ orientation = screen.orientation;
2356
+ } else if (screen.msOrientation) {
2357
+ orientation = screen.msOrientation;
2358
+ } else {
2359
+ Object.defineProperty(orientation, 'angle', {
2360
+ get: function get$$1() {
2361
+ return window.orientation || 0;
2362
+ }
2363
+ });
2364
+ }
2365
+ var SENSOR_TO_VR = new Quaternion();
2366
+ SENSOR_TO_VR.setFromAxisAngle(X_AXIS, -Math.PI / 2);
2367
+ SENSOR_TO_VR.multiply(new Quaternion().setFromAxisAngle(Z_AXIS, Math.PI / 2));
2368
+ var PoseSensor = function () {
2369
+ function PoseSensor(config) {
2370
+ classCallCheck(this, PoseSensor);
2371
+ this.config = config;
2372
+ this.sensor = null;
2373
+ this.fusionSensor = null;
2374
+ this._out = new Float32Array(4);
2375
+ this.api = null;
2376
+ this.errors = [];
2377
+ this._sensorQ = new Quaternion();
2378
+ this._worldToScreenQ = new Quaternion();
2379
+ this._outQ = new Quaternion();
2380
+ this._onSensorRead = this._onSensorRead.bind(this);
2381
+ this._onSensorError = this._onSensorError.bind(this);
2382
+ this._onOrientationChange = this._onOrientationChange.bind(this);
2383
+ this._onOrientationChange();
2384
+ this.init();
2385
+ }
2386
+ createClass(PoseSensor, [{
2387
+ key: 'init',
2388
+ value: function init() {
2389
+ var sensor = null;
2390
+ try {
2391
+ sensor = new RelativeOrientationSensor({ frequency: SENSOR_FREQUENCY });
2392
+ sensor.addEventListener('error', this._onSensorError);
2393
+ } catch (error) {
2394
+ this.errors.push(error);
2395
+ if (error.name === 'SecurityError') {
2396
+ console.error('Cannot construct sensors due to the Feature Policy');
2397
+ console.warn('Attempting to fall back using "devicemotion"; however this will ' + 'fail in the future without correct permissions.');
2398
+ this.useDeviceMotion();
2399
+ } else if (error.name === 'ReferenceError') {
2400
+ this.useDeviceMotion();
2401
+ } else {
2402
+ console.error(error);
2403
+ }
2404
+ }
2405
+ if (sensor) {
2406
+ this.api = 'sensor';
2407
+ this.sensor = sensor;
2408
+ this.sensor.addEventListener('reading', this._onSensorRead);
2409
+ this.sensor.start();
2410
+ }
2411
+ window.addEventListener('orientationchange', this._onOrientationChange);
2412
+ }
2413
+ }, {
2414
+ key: 'useDeviceMotion',
2415
+ value: function useDeviceMotion() {
2416
+ this.api = 'devicemotion';
2417
+ this.fusionSensor = new FusionPoseSensor(this.config.K_FILTER, this.config.PREDICTION_TIME_S, this.config.YAW_ONLY, this.config.DEBUG);
2418
+ if (this.sensor) {
2419
+ this.sensor.removeEventListener('reading', this._onSensorRead);
2420
+ this.sensor.removeEventListener('error', this._onSensorError);
2421
+ this.sensor = null;
2422
+ }
2423
+ }
2424
+ }, {
2425
+ key: 'getOrientation',
2426
+ value: function getOrientation() {
2427
+ if (this.fusionSensor) {
2428
+ return this.fusionSensor.getOrientation();
2429
+ }
2430
+ if (!this.sensor || !this.sensor.quaternion) {
2431
+ this._out[0] = this._out[1] = this._out[2] = 0;
2432
+ this._out[3] = 1;
2433
+ return this._out;
2434
+ }
2435
+ var q = this.sensor.quaternion;
2436
+ this._sensorQ.set(q[0], q[1], q[2], q[3]);
2437
+ var out = this._outQ;
2438
+ out.copy(SENSOR_TO_VR);
2439
+ out.multiply(this._sensorQ);
2440
+ out.multiply(this._worldToScreenQ);
2441
+ if (this.config.YAW_ONLY) {
2442
+ out.x = out.z = 0;
2443
+ out.normalize();
2444
+ }
2445
+ this._out[0] = out.x;
2446
+ this._out[1] = out.y;
2447
+ this._out[2] = out.z;
2448
+ this._out[3] = out.w;
2449
+ return this._out;
2450
+ }
2451
+ }, {
2452
+ key: '_onSensorError',
2453
+ value: function _onSensorError(event) {
2454
+ this.errors.push(event.error);
2455
+ if (event.error.name === 'NotAllowedError') {
2456
+ console.error('Permission to access sensor was denied');
2457
+ } else if (event.error.name === 'NotReadableError') {
2458
+ console.error('Sensor could not be read');
2459
+ } else {
2460
+ console.error(event.error);
2461
+ }
2462
+ this.useDeviceMotion();
2463
+ }
2464
+ }, {
2465
+ key: '_onSensorRead',
2466
+ value: function _onSensorRead() { }
2467
+ }, {
2468
+ key: '_onOrientationChange',
2469
+ value: function _onOrientationChange() {
2470
+ var angle = -orientation.angle * Math.PI / 180;
2471
+ this._worldToScreenQ.setFromAxisAngle(Z_AXIS, angle);
2472
+ }
2473
+ }]);
2474
+ return PoseSensor;
2475
+ }();
2476
+ var rotateInstructionsAsset = 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE5OHB4IiBoZWlnaHQ9IjI0MHB4IiB2aWV3Qm94PSIwIDAgMTk4IDI0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuMy4zICgxMjA4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGV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w0Ni4zODUgTDc3LjQwMyw3LjU1NCBMNzcuNDAzLDUxLjUwOCBMNzcuMzQxLDUxLjU0NCBMMTAuMDgzLDkwLjM3NSBMMTAuMDgzLDkwLjM3NSBaIE0xMC4zMzMsNDYuNTY0IEwxMC4zMzMsODkuOTQ0IEw3Ny4xNTQsNTEuMzY1IEw3Ny4xNTQsNy45ODUgTDEwLjMzMyw0Ni41NjQgTDEwLjMzMyw0Ni41NjQgWiIgaWQ9IkZpbGwtMjAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMjUuNzM3LDg4LjY0NyBMMTE4LjA5OCw5MS45ODEgTDExOC4wOTgsODQgTDEwNi42MzksODguNzEzIEwxMDYuNjM5LDk2Ljk4MiBMOTksMTAwLjMxNSBMMTEyLjM2OSwxMDMuOTYxIEwxMjUuNzM3LDg4LjY0NyIgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTIiIGZpbGw9IiM0NTVBNjQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+';
2477
+ function RotateInstructions() {
2478
+ this.loadIcon_();
2479
+ var overlay = document.createElement('div');
2480
+ var s = overlay.style;
2481
+ s.position = 'fixed';
2482
+ s.top = 0;
2483
+ s.right = 0;
2484
+ s.bottom = 0;
2485
+ s.left = 0;
2486
+ s.backgroundColor = 'gray';
2487
+ s.fontFamily = 'sans-serif';
2488
+ s.zIndex = 1000000;
2489
+ var img = document.createElement('img');
2490
+ img.src = this.icon;
2491
+ var s = img.style;
2492
+ s.marginLeft = '25%';
2493
+ s.marginTop = '25%';
2494
+ s.width = '50%';
2495
+ overlay.appendChild(img);
2496
+ var text = document.createElement('div');
2497
+ var s = text.style;
2498
+ s.textAlign = 'center';
2499
+ s.fontSize = '16px';
2500
+ s.lineHeight = '24px';
2501
+ s.margin = '24px 25%';
2502
+ s.width = '50%';
2503
+ text.innerHTML = 'Place your phone into your Cardboard viewer.';
2504
+ overlay.appendChild(text);
2505
+ var snackbar = document.createElement('div');
2506
+ var s = snackbar.style;
2507
+ s.backgroundColor = '#CFD8DC';
2508
+ s.position = 'fixed';
2509
+ s.bottom = 0;
2510
+ s.width = '100%';
2511
+ s.height = '48px';
2512
+ s.padding = '14px 24px';
2513
+ s.boxSizing = 'border-box';
2514
+ s.color = '#656A6B';
2515
+ overlay.appendChild(snackbar);
2516
+ var snackbarText = document.createElement('div');
2517
+ snackbarText.style.float = 'left';
2518
+ snackbarText.innerHTML = 'No Cardboard viewer?';
2519
+ var snackbarButton = document.createElement('a');
2520
+ snackbarButton.href = 'https://www.google.com/get/cardboard/get-cardboard/';
2521
+ snackbarButton.innerHTML = 'get one';
2522
+ snackbarButton.target = '_blank';
2523
+ var s = snackbarButton.style;
2524
+ s.float = 'right';
2525
+ s.fontWeight = 600;
2526
+ s.textTransform = 'uppercase';
2527
+ s.borderLeft = '1px solid gray';
2528
+ s.paddingLeft = '24px';
2529
+ s.textDecoration = 'none';
2530
+ s.color = '#656A6B';
2531
+ snackbar.appendChild(snackbarText);
2532
+ snackbar.appendChild(snackbarButton);
2533
+ this.overlay = overlay;
2534
+ this.text = text;
2535
+ this.hide();
2536
+ }
2537
+ RotateInstructions.prototype.show = function (parent) {
2538
+ if (!parent && !this.overlay.parentElement) {
2539
+ document.body.appendChild(this.overlay);
2540
+ } else if (parent) {
2541
+ if (this.overlay.parentElement && this.overlay.parentElement != parent) this.overlay.parentElement.removeChild(this.overlay);
2542
+ parent.appendChild(this.overlay);
2543
+ }
2544
+ this.overlay.style.display = 'block';
2545
+ var img = this.overlay.querySelector('img');
2546
+ var s = img.style;
2547
+ if (isLandscapeMode()) {
2548
+ s.width = '20%';
2549
+ s.marginLeft = '40%';
2550
+ s.marginTop = '3%';
2551
+ } else {
2552
+ s.width = '50%';
2553
+ s.marginLeft = '25%';
2554
+ s.marginTop = '25%';
2555
+ }
2556
+ };
2557
+ RotateInstructions.prototype.hide = function () {
2558
+ this.overlay.style.display = 'none';
2559
+ };
2560
+ RotateInstructions.prototype.showTemporarily = function (ms, parent) {
2561
+ this.show(parent);
2562
+ this.timer = setTimeout(this.hide.bind(this), ms);
2563
+ };
2564
+ RotateInstructions.prototype.disableShowTemporarily = function () {
2565
+ clearTimeout(this.timer);
2566
+ };
2567
+ RotateInstructions.prototype.update = function () {
2568
+ this.disableShowTemporarily();
2569
+ if (!isLandscapeMode() && isMobile()) {
2570
+ this.show();
2571
+ } else {
2572
+ this.hide();
2573
+ }
2574
+ };
2575
+ RotateInstructions.prototype.loadIcon_ = function () {
2576
+ this.icon = base64('image/svg+xml', rotateInstructionsAsset);
2577
+ };
2578
+ var DEFAULT_VIEWER = 'CardboardV1';
2579
+ var VIEWER_KEY = 'WEBVR_CARDBOARD_VIEWER';
2580
+ var CLASS_NAME = 'webvr-polyfill-viewer-selector';
2581
+ function ViewerSelector(defaultViewer) {
2582
+ try {
2583
+ this.selectedKey = localStorage.getItem(VIEWER_KEY);
2584
+ } catch (error) {
2585
+ console.error('Failed to load viewer profile: %s', error);
2586
+ }
2587
+ if (!this.selectedKey) {
2588
+ this.selectedKey = defaultViewer || DEFAULT_VIEWER;
2589
+ }
2590
+ this.dialog = this.createDialog_(DeviceInfo.Viewers);
2591
+ this.root = null;
2592
+ this.onChangeCallbacks_ = [];
2593
+ }
2594
+ ViewerSelector.prototype.show = function (root) {
2595
+ this.root = root;
2596
+ root.appendChild(this.dialog);
2597
+ var selected = this.dialog.querySelector('#' + this.selectedKey);
2598
+ selected.checked = true;
2599
+ this.dialog.style.display = 'block';
2600
+ };
2601
+ ViewerSelector.prototype.hide = function () {
2602
+ if (this.root && this.root.contains(this.dialog)) {
2603
+ this.root.removeChild(this.dialog);
2604
+ }
2605
+ this.dialog.style.display = 'none';
2606
+ };
2607
+ ViewerSelector.prototype.getCurrentViewer = function () {
2608
+ return DeviceInfo.Viewers[this.selectedKey];
2609
+ };
2610
+ ViewerSelector.prototype.getSelectedKey_ = function () {
2611
+ var input = this.dialog.querySelector('input[name=field]:checked');
2612
+ if (input) {
2613
+ return input.id;
2614
+ }
2615
+ return null;
2616
+ };
2617
+ ViewerSelector.prototype.onChange = function (cb) {
2618
+ this.onChangeCallbacks_.push(cb);
2619
+ };
2620
+ ViewerSelector.prototype.fireOnChange_ = function (viewer) {
2621
+ for (var i = 0; i < this.onChangeCallbacks_.length; i++) {
2622
+ this.onChangeCallbacks_[i](viewer);
2623
+ }
2624
+ };
2625
+ ViewerSelector.prototype.onSave_ = function () {
2626
+ this.selectedKey = this.getSelectedKey_();
2627
+ if (!this.selectedKey || !DeviceInfo.Viewers[this.selectedKey]) {
2628
+ console.error('ViewerSelector.onSave_: this should never happen!');
2629
+ return;
2630
+ }
2631
+ this.fireOnChange_(DeviceInfo.Viewers[this.selectedKey]);
2632
+ try {
2633
+ localStorage.setItem(VIEWER_KEY, this.selectedKey);
2634
+ } catch (error) {
2635
+ console.error('Failed to save viewer profile: %s', error);
2636
+ }
2637
+ this.hide();
2638
+ };
2639
+ ViewerSelector.prototype.createDialog_ = function (options) {
2640
+ var container = document.createElement('div');
2641
+ container.classList.add(CLASS_NAME);
2642
+ container.style.display = 'none';
2643
+ var overlay = document.createElement('div');
2644
+ var s = overlay.style;
2645
+ s.position = 'fixed';
2646
+ s.left = 0;
2647
+ s.top = 0;
2648
+ s.width = '100%';
2649
+ s.height = '100%';
2650
+ s.background = 'rgba(0, 0, 0, 0.3)';
2651
+ overlay.addEventListener('click', this.hide.bind(this));
2652
+ var width = 280;
2653
+ var dialog = document.createElement('div');
2654
+ var s = dialog.style;
2655
+ s.boxSizing = 'border-box';
2656
+ s.position = 'fixed';
2657
+ s.top = '24px';
2658
+ s.left = '50%';
2659
+ s.marginLeft = -width / 2 + 'px';
2660
+ s.width = width + 'px';
2661
+ s.padding = '24px';
2662
+ s.overflow = 'hidden';
2663
+ s.background = '#fafafa';
2664
+ s.fontFamily = "'Roboto', sans-serif";
2665
+ s.boxShadow = '0px 5px 20px #666';
2666
+ dialog.appendChild(this.createH1_('Select your viewer'));
2667
+ for (var id in options) {
2668
+ dialog.appendChild(this.createChoice_(id, options[id].label));
2669
+ }
2670
+ dialog.appendChild(this.createButton_('Save', this.onSave_.bind(this)));
2671
+ container.appendChild(overlay);
2672
+ container.appendChild(dialog);
2673
+ return container;
2674
+ };
2675
+ ViewerSelector.prototype.createH1_ = function (name) {
2676
+ var h1 = document.createElement('h1');
2677
+ var s = h1.style;
2678
+ s.color = 'black';
2679
+ s.fontSize = '20px';
2680
+ s.fontWeight = 'bold';
2681
+ s.marginTop = 0;
2682
+ s.marginBottom = '24px';
2683
+ h1.innerHTML = name;
2684
+ return h1;
2685
+ };
2686
+ ViewerSelector.prototype.createChoice_ = function (id, name) {
2687
+ var div = document.createElement('div');
2688
+ div.style.marginTop = '8px';
2689
+ div.style.color = 'black';
2690
+ var input = document.createElement('input');
2691
+ input.style.fontSize = '30px';
2692
+ input.setAttribute('id', id);
2693
+ input.setAttribute('type', 'radio');
2694
+ input.setAttribute('value', id);
2695
+ input.setAttribute('name', 'field');
2696
+ var label = document.createElement('label');
2697
+ label.style.marginLeft = '4px';
2698
+ label.setAttribute('for', id);
2699
+ label.innerHTML = name;
2700
+ div.appendChild(input);
2701
+ div.appendChild(label);
2702
+ return div;
2703
+ };
2704
+ ViewerSelector.prototype.createButton_ = function (label, onclick) {
2705
+ var button = document.createElement('button');
2706
+ button.innerHTML = label;
2707
+ var s = button.style;
2708
+ s.float = 'right';
2709
+ s.textTransform = 'uppercase';
2710
+ s.color = '#1094f7';
2711
+ s.fontSize = '14px';
2712
+ s.letterSpacing = 0;
2713
+ s.border = 0;
2714
+ s.background = 'none';
2715
+ s.marginTop = '16px';
2716
+ button.addEventListener('click', onclick);
2717
+ return button;
2718
+ };
2719
+ var commonjsGlobal$$1 = typeof window !== 'undefined' ? window : typeof commonjsGlobal$1 !== 'undefined' ? commonjsGlobal$1 : typeof self !== 'undefined' ? self : {};
2720
+ function unwrapExports$$1(x) {
2721
+ return x && x.__esModule ? x['default'] : x;
2722
+ }
2723
+ function createCommonjsModule$$1(fn, module) {
2724
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
2725
+ }
2726
+ var NoSleep = createCommonjsModule$$1(function (module, exports) {
2727
+ (function webpackUniversalModuleDefinition(root, factory) {
2728
+ module.exports = factory();
2729
+ })(commonjsGlobal$$1, function () {
2730
+ return (function (modules) {
2731
+ var installedModules = {};
2732
+ function __webpack_require__(moduleId) {
2733
+ if (installedModules[moduleId]) {
2734
+ return installedModules[moduleId].exports;
2735
+ }
2736
+ var module = installedModules[moduleId] = {
2737
+ i: moduleId,
2738
+ l: false,
2739
+ exports: {}
2740
+ };
2741
+ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2742
+ module.l = true;
2743
+ return module.exports;
2744
+ }
2745
+ __webpack_require__.m = modules;
2746
+ __webpack_require__.c = installedModules;
2747
+ __webpack_require__.d = function (exports, name, getter) {
2748
+ if (!__webpack_require__.o(exports, name)) {
2749
+ Object.defineProperty(exports, name, {
2750
+ configurable: false,
2751
+ enumerable: true,
2752
+ get: getter
2753
+ });
2754
+ }
2755
+ };
2756
+ __webpack_require__.n = function (module) {
2757
+ var getter = module && module.__esModule ?
2758
+ function getDefault() { return module['default']; } :
2759
+ function getModuleExports() { return module; };
2760
+ __webpack_require__.d(getter, 'a', getter);
2761
+ return getter;
2762
+ };
2763
+ __webpack_require__.o = function (object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
2764
+ __webpack_require__.p = "";
2765
+ return __webpack_require__(__webpack_require__.s = 0);
2766
+ })
2767
+ ([
2768
+ (function (module, exports, __webpack_require__) {
2769
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2770
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2771
+ var mediaFile = __webpack_require__(1);
2772
+ var oldIOS = typeof navigator !== 'undefined' && parseFloat(('' + (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ''])[1]).replace('undefined', '3_2').replace('_', '.').replace('_', '')) < 10 && !window.MSStream;
2773
+ var NoSleep = function () {
2774
+ function NoSleep() {
2775
+ _classCallCheck(this, NoSleep);
2776
+ if (oldIOS) {
2777
+ this.noSleepTimer = null;
2778
+ } else {
2779
+ this.noSleepVideo = document.createElement('video');
2780
+ this.noSleepVideo.setAttribute('playsinline', '');
2781
+ this.noSleepVideo.setAttribute('src', mediaFile);
2782
+ this.noSleepVideo.addEventListener('timeupdate', function (e) {
2783
+ if (this.noSleepVideo.currentTime > 0.5) {
2784
+ this.noSleepVideo.currentTime = Math.random();
2785
+ }
2786
+ }.bind(this));
2787
+ }
2788
+ }
2789
+ _createClass(NoSleep, [{
2790
+ key: 'enable',
2791
+ value: function enable() {
2792
+ if (oldIOS) {
2793
+ this.disable();
2794
+ this.noSleepTimer = window.setInterval(function () {
2795
+ window.location.href = '/';
2796
+ window.setTimeout(window.stop, 0);
2797
+ }, 15000);
2798
+ } else {
2799
+ this.noSleepVideo.play();
2800
+ }
2801
+ }
2802
+ }, {
2803
+ key: 'disable',
2804
+ value: function disable() {
2805
+ if (oldIOS) {
2806
+ if (this.noSleepTimer) {
2807
+ window.clearInterval(this.noSleepTimer);
2808
+ this.noSleepTimer = null;
2809
+ }
2810
+ } else {
2811
+ this.noSleepVideo.pause();
2812
+ }
2813
+ }
2814
+ }]);
2815
+ return NoSleep;
2816
+ }();
2817
+ module.exports = NoSleep;
2818
+ }),
2819
+ (function (module, exports, __webpack_require__) {
2820
+ module.exports = 'data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYX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AAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=';
2821
+ })
2822
+ ]);
2823
+ });
2824
+ });
2825
+ var NoSleep$1 = unwrapExports$$1(NoSleep);
2826
+ var nextDisplayId = 1000;
2827
+ var defaultLeftBounds = [0, 0, 0.5, 1];
2828
+ var defaultRightBounds = [0.5, 0, 0.5, 1];
2829
+ var raf = window.requestAnimationFrame;
2830
+ var caf = window.cancelAnimationFrame;
2831
+ function VRFrameData() {
2832
+ this.leftProjectionMatrix = new Float32Array(16);
2833
+ this.leftViewMatrix = new Float32Array(16);
2834
+ this.rightProjectionMatrix = new Float32Array(16);
2835
+ this.rightViewMatrix = new Float32Array(16);
2836
+ this.pose = null;
2837
+ }
2838
+ function VRDisplayCapabilities(config) {
2839
+ Object.defineProperties(this, {
2840
+ hasPosition: {
2841
+ writable: false, enumerable: true, value: config.hasPosition
2842
+ },
2843
+ hasExternalDisplay: {
2844
+ writable: false, enumerable: true, value: config.hasExternalDisplay
2845
+ },
2846
+ canPresent: {
2847
+ writable: false, enumerable: true, value: config.canPresent
2848
+ },
2849
+ maxLayers: {
2850
+ writable: false, enumerable: true, value: config.maxLayers
2851
+ },
2852
+ hasOrientation: {
2853
+ enumerable: true, get: function get() {
2854
+ deprecateWarning('VRDisplayCapabilities.prototype.hasOrientation', 'VRDisplay.prototype.getFrameData');
2855
+ return config.hasOrientation;
2856
+ }
2857
+ }
2858
+ });
2859
+ }
2860
+ function VRDisplay(config) {
2861
+ config = config || {};
2862
+ var USE_WAKELOCK = 'wakelock' in config ? config.wakelock : true;
2863
+ this.isPolyfilled = true;
2864
+ this.displayId = nextDisplayId++;
2865
+ this.displayName = '';
2866
+ this.depthNear = 0.01;
2867
+ this.depthFar = 10000.0;
2868
+ this.isPresenting = false;
2869
+ Object.defineProperty(this, 'isConnected', {
2870
+ get: function get() {
2871
+ deprecateWarning('VRDisplay.prototype.isConnected', 'VRDisplayCapabilities.prototype.hasExternalDisplay');
2872
+ return false;
2873
+ }
2874
+ });
2875
+ this.capabilities = new VRDisplayCapabilities({
2876
+ hasPosition: false,
2877
+ hasOrientation: false,
2878
+ hasExternalDisplay: false,
2879
+ canPresent: false,
2880
+ maxLayers: 1
2881
+ });
2882
+ this.stageParameters = null;
2883
+ this.waitingForPresent_ = false;
2884
+ this.layer_ = null;
2885
+ this.originalParent_ = null;
2886
+ this.fullscreenElement_ = null;
2887
+ this.fullscreenWrapper_ = null;
2888
+ this.fullscreenElementCachedStyle_ = null;
2889
+ this.fullscreenEventTarget_ = null;
2890
+ this.fullscreenChangeHandler_ = null;
2891
+ this.fullscreenErrorHandler_ = null;
2892
+ if (USE_WAKELOCK && isMobile()) {
2893
+ this.wakelock_ = new NoSleep$1();
2894
+ }
2895
+ }
2896
+ VRDisplay.prototype.getFrameData = function (frameData) {
2897
+ return frameDataFromPose(frameData, this._getPose(), this);
2898
+ };
2899
+ VRDisplay.prototype.getPose = function () {
2900
+ deprecateWarning('VRDisplay.prototype.getPose', 'VRDisplay.prototype.getFrameData');
2901
+ return this._getPose();
2902
+ };
2903
+ VRDisplay.prototype.resetPose = function () {
2904
+ deprecateWarning('VRDisplay.prototype.resetPose');
2905
+ return this._resetPose();
2906
+ };
2907
+ VRDisplay.prototype.getImmediatePose = function () {
2908
+ deprecateWarning('VRDisplay.prototype.getImmediatePose', 'VRDisplay.prototype.getFrameData');
2909
+ return this._getPose();
2910
+ };
2911
+ VRDisplay.prototype.requestAnimationFrame = function (callback) {
2912
+ return raf(callback);
2913
+ };
2914
+ VRDisplay.prototype.cancelAnimationFrame = function (id) {
2915
+ return caf(id);
2916
+ };
2917
+ VRDisplay.prototype.wrapForFullscreen = function (element) {
2918
+ if (isIOS()) {
2919
+ return element;
2920
+ }
2921
+ if (!this.fullscreenWrapper_) {
2922
+ this.fullscreenWrapper_ = document.createElement('div');
2923
+ var cssProperties = ['height: ' + Math.min(screen.height, screen.width) + 'px !important', 'top: 0 !important', 'left: 0 !important', 'right: 0 !important', 'border: 0', 'margin: 0', 'padding: 0', 'z-index: 999999 !important', 'position: fixed'];
2924
+ this.fullscreenWrapper_.setAttribute('style', cssProperties.join('; ') + ';');
2925
+ this.fullscreenWrapper_.classList.add('webvr-polyfill-fullscreen-wrapper');
2926
+ }
2927
+ if (this.fullscreenElement_ == element) {
2928
+ return this.fullscreenWrapper_;
2929
+ }
2930
+ if (this.fullscreenElement_) {
2931
+ if (this.originalParent_) {
2932
+ this.originalParent_.appendChild(this.fullscreenElement_);
2933
+ } else {
2934
+ this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_);
2935
+ }
2936
+ }
2937
+ this.fullscreenElement_ = element;
2938
+ this.originalParent_ = element.parentElement;
2939
+ if (!this.originalParent_) {
2940
+ document.body.appendChild(element);
2941
+ }
2942
+ if (!this.fullscreenWrapper_.parentElement) {
2943
+ var parent = this.fullscreenElement_.parentElement;
2944
+ parent.insertBefore(this.fullscreenWrapper_, this.fullscreenElement_);
2945
+ parent.removeChild(this.fullscreenElement_);
2946
+ }
2947
+ this.fullscreenWrapper_.insertBefore(this.fullscreenElement_, this.fullscreenWrapper_.firstChild);
2948
+ this.fullscreenElementCachedStyle_ = this.fullscreenElement_.getAttribute('style');
2949
+ var self = this;
2950
+ function applyFullscreenElementStyle() {
2951
+ if (!self.fullscreenElement_) {
2952
+ return;
2953
+ }
2954
+ var cssProperties = ['position: absolute', 'top: 0', 'left: 0', 'width: ' + Math.max(screen.width, screen.height) + 'px', 'height: ' + Math.min(screen.height, screen.width) + 'px', 'border: 0', 'margin: 0', 'padding: 0'];
2955
+ self.fullscreenElement_.setAttribute('style', cssProperties.join('; ') + ';');
2956
+ }
2957
+ applyFullscreenElementStyle();
2958
+ return this.fullscreenWrapper_;
2959
+ };
2960
+ VRDisplay.prototype.removeFullscreenWrapper = function () {
2961
+ if (!this.fullscreenElement_) {
2962
+ return;
2963
+ }
2964
+ var element = this.fullscreenElement_;
2965
+ if (this.fullscreenElementCachedStyle_) {
2966
+ element.setAttribute('style', this.fullscreenElementCachedStyle_);
2967
+ } else {
2968
+ element.removeAttribute('style');
2969
+ }
2970
+ this.fullscreenElement_ = null;
2971
+ this.fullscreenElementCachedStyle_ = null;
2972
+ var parent = this.fullscreenWrapper_.parentElement;
2973
+ this.fullscreenWrapper_.removeChild(element);
2974
+ if (this.originalParent_ === parent) {
2975
+ parent.insertBefore(element, this.fullscreenWrapper_);
2976
+ }
2977
+ else if (this.originalParent_) {
2978
+ this.originalParent_.appendChild(element);
2979
+ }
2980
+ parent.removeChild(this.fullscreenWrapper_);
2981
+ return element;
2982
+ };
2983
+ VRDisplay.prototype.requestPresent = function (layers) {
2984
+ var wasPresenting = this.isPresenting;
2985
+ var self = this;
2986
+ if (!(layers instanceof Array)) {
2987
+ deprecateWarning('VRDisplay.prototype.requestPresent with non-array argument', 'an array of VRLayers as the first argument');
2988
+ layers = [layers];
2989
+ }
2990
+ return new Promise(function (resolve, reject) {
2991
+ if (!self.capabilities.canPresent) {
2992
+ reject(new Error('VRDisplay is not capable of presenting.'));
2993
+ return;
2994
+ }
2995
+ if (layers.length == 0 || layers.length > self.capabilities.maxLayers) {
2996
+ reject(new Error('Invalid number of layers.'));
2997
+ return;
2998
+ }
2999
+ var incomingLayer = layers[0];
3000
+ if (!incomingLayer.source) {
3001
+ resolve();
3002
+ return;
3003
+ }
3004
+ var leftBounds = incomingLayer.leftBounds || defaultLeftBounds;
3005
+ var rightBounds = incomingLayer.rightBounds || defaultRightBounds;
3006
+ if (wasPresenting) {
3007
+ var layer = self.layer_;
3008
+ if (layer.source !== incomingLayer.source) {
3009
+ layer.source = incomingLayer.source;
3010
+ }
3011
+ for (var i = 0; i < 4; i++) {
3012
+ layer.leftBounds[i] = leftBounds[i];
3013
+ layer.rightBounds[i] = rightBounds[i];
3014
+ }
3015
+ self.wrapForFullscreen(self.layer_.source);
3016
+ self.updatePresent_();
3017
+ resolve();
3018
+ return;
3019
+ }
3020
+ self.layer_ = {
3021
+ predistorted: incomingLayer.predistorted,
3022
+ source: incomingLayer.source,
3023
+ leftBounds: leftBounds.slice(0),
3024
+ rightBounds: rightBounds.slice(0)
3025
+ };
3026
+ self.waitingForPresent_ = false;
3027
+ if (self.layer_ && self.layer_.source) {
3028
+ var fullscreenElement = self.wrapForFullscreen(self.layer_.source);
3029
+ var onFullscreenChange = function onFullscreenChange() {
3030
+ var actualFullscreenElement = getFullscreenElement();
3031
+ self.isPresenting = fullscreenElement === actualFullscreenElement;
3032
+ if (self.isPresenting) {
3033
+ if (screen.orientation && screen.orientation.lock) {
3034
+ screen.orientation.lock('landscape-primary').catch(function (error) {
3035
+ console.error('screen.orientation.lock() failed due to', error.message);
3036
+ });
3037
+ }
3038
+ self.waitingForPresent_ = false;
3039
+ self.beginPresent_();
3040
+ resolve();
3041
+ } else {
3042
+ if (screen.orientation && screen.orientation.unlock) {
3043
+ screen.orientation.unlock();
3044
+ }
3045
+ self.removeFullscreenWrapper();
3046
+ self.disableWakeLock();
3047
+ self.endPresent_();
3048
+ self.removeFullscreenListeners_();
3049
+ }
3050
+ self.fireVRDisplayPresentChange_();
3051
+ };
3052
+ var onFullscreenError = function onFullscreenError() {
3053
+ if (!self.waitingForPresent_) {
3054
+ return;
3055
+ }
3056
+ self.removeFullscreenWrapper();
3057
+ self.removeFullscreenListeners_();
3058
+ self.disableWakeLock();
3059
+ self.waitingForPresent_ = false;
3060
+ self.isPresenting = false;
3061
+ reject(new Error('Unable to present.'));
3062
+ };
3063
+ self.addFullscreenListeners_(fullscreenElement, onFullscreenChange, onFullscreenError);
3064
+ if (requestFullscreen(fullscreenElement)) {
3065
+ self.enableWakeLock();
3066
+ self.waitingForPresent_ = true;
3067
+ } else if (isIOS() || isWebViewAndroid()) {
3068
+ self.enableWakeLock();
3069
+ self.isPresenting = true;
3070
+ self.beginPresent_();
3071
+ self.fireVRDisplayPresentChange_();
3072
+ resolve();
3073
+ }
3074
+ }
3075
+ if (!self.waitingForPresent_ && !isIOS()) {
3076
+ exitFullscreen();
3077
+ reject(new Error('Unable to present.'));
3078
+ }
3079
+ });
3080
+ };
3081
+ VRDisplay.prototype.exitPresent = function () {
3082
+ var wasPresenting = this.isPresenting;
3083
+ var self = this;
3084
+ this.isPresenting = false;
3085
+ this.layer_ = null;
3086
+ this.disableWakeLock();
3087
+ return new Promise(function (resolve, reject) {
3088
+ if (wasPresenting) {
3089
+ if (!exitFullscreen() && isIOS()) {
3090
+ self.endPresent_();
3091
+ self.fireVRDisplayPresentChange_();
3092
+ }
3093
+ if (isWebViewAndroid()) {
3094
+ self.removeFullscreenWrapper();
3095
+ self.removeFullscreenListeners_();
3096
+ self.endPresent_();
3097
+ self.fireVRDisplayPresentChange_();
3098
+ }
3099
+ resolve();
3100
+ } else {
3101
+ reject(new Error('Was not presenting to VRDisplay.'));
3102
+ }
3103
+ });
3104
+ };
3105
+ VRDisplay.prototype.getLayers = function () {
3106
+ if (this.layer_) {
3107
+ return [this.layer_];
3108
+ }
3109
+ return [];
3110
+ };
3111
+ VRDisplay.prototype.fireVRDisplayPresentChange_ = function () {
3112
+ var event = new CustomEvent('vrdisplaypresentchange', { detail: { display: this } });
3113
+ window.dispatchEvent(event);
3114
+ };
3115
+ VRDisplay.prototype.fireVRDisplayConnect_ = function () {
3116
+ var event = new CustomEvent('vrdisplayconnect', { detail: { display: this } });
3117
+ window.dispatchEvent(event);
3118
+ };
3119
+ VRDisplay.prototype.addFullscreenListeners_ = function (element, changeHandler, errorHandler) {
3120
+ this.removeFullscreenListeners_();
3121
+ this.fullscreenEventTarget_ = element;
3122
+ this.fullscreenChangeHandler_ = changeHandler;
3123
+ this.fullscreenErrorHandler_ = errorHandler;
3124
+ if (changeHandler) {
3125
+ if (document.fullscreenEnabled) {
3126
+ element.addEventListener('fullscreenchange', changeHandler, false);
3127
+ } else if (document.webkitFullscreenEnabled) {
3128
+ element.addEventListener('webkitfullscreenchange', changeHandler, false);
3129
+ } else if (document.mozFullScreenEnabled) {
3130
+ document.addEventListener('mozfullscreenchange', changeHandler, false);
3131
+ } else if (document.msFullscreenEnabled) {
3132
+ element.addEventListener('msfullscreenchange', changeHandler, false);
3133
+ }
3134
+ }
3135
+ if (errorHandler) {
3136
+ if (document.fullscreenEnabled) {
3137
+ element.addEventListener('fullscreenerror', errorHandler, false);
3138
+ } else if (document.webkitFullscreenEnabled) {
3139
+ element.addEventListener('webkitfullscreenerror', errorHandler, false);
3140
+ } else if (document.mozFullScreenEnabled) {
3141
+ document.addEventListener('mozfullscreenerror', errorHandler, false);
3142
+ } else if (document.msFullscreenEnabled) {
3143
+ element.addEventListener('msfullscreenerror', errorHandler, false);
3144
+ }
3145
+ }
3146
+ };
3147
+ VRDisplay.prototype.removeFullscreenListeners_ = function () {
3148
+ if (!this.fullscreenEventTarget_) return;
3149
+ var element = this.fullscreenEventTarget_;
3150
+ if (this.fullscreenChangeHandler_) {
3151
+ var changeHandler = this.fullscreenChangeHandler_;
3152
+ element.removeEventListener('fullscreenchange', changeHandler, false);
3153
+ element.removeEventListener('webkitfullscreenchange', changeHandler, false);
3154
+ document.removeEventListener('mozfullscreenchange', changeHandler, false);
3155
+ element.removeEventListener('msfullscreenchange', changeHandler, false);
3156
+ }
3157
+ if (this.fullscreenErrorHandler_) {
3158
+ var errorHandler = this.fullscreenErrorHandler_;
3159
+ element.removeEventListener('fullscreenerror', errorHandler, false);
3160
+ element.removeEventListener('webkitfullscreenerror', errorHandler, false);
3161
+ document.removeEventListener('mozfullscreenerror', errorHandler, false);
3162
+ element.removeEventListener('msfullscreenerror', errorHandler, false);
3163
+ }
3164
+ this.fullscreenEventTarget_ = null;
3165
+ this.fullscreenChangeHandler_ = null;
3166
+ this.fullscreenErrorHandler_ = null;
3167
+ };
3168
+ VRDisplay.prototype.enableWakeLock = function () {
3169
+ if (this.wakelock_) {
3170
+ this.wakelock_.enable();
3171
+ }
3172
+ };
3173
+ VRDisplay.prototype.disableWakeLock = function () {
3174
+ if (this.wakelock_) {
3175
+ this.wakelock_.disable();
3176
+ }
3177
+ };
3178
+ VRDisplay.prototype.beginPresent_ = function () {
3179
+ };
3180
+ VRDisplay.prototype.endPresent_ = function () {
3181
+ };
3182
+ VRDisplay.prototype.submitFrame = function (pose) {
3183
+ };
3184
+ VRDisplay.prototype.getEyeParameters = function (whichEye) {
3185
+ return null;
3186
+ };
3187
+ var config = {
3188
+ ADDITIONAL_VIEWERS: [],
3189
+ DEFAULT_VIEWER: '',
3190
+ MOBILE_WAKE_LOCK: true,
3191
+ DEBUG: false,
3192
+ DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',
3193
+ K_FILTER: 0.98,
3194
+ PREDICTION_TIME_S: 0.040,
3195
+ CARDBOARD_UI_DISABLED: false,
3196
+ ROTATE_INSTRUCTIONS_DISABLED: false,
3197
+ YAW_ONLY: false,
3198
+ BUFFER_SCALE: 0.5,
3199
+ DIRTY_SUBMIT_FRAME_BINDINGS: false
3200
+ };
3201
+ var Eye = {
3202
+ LEFT: 'left',
3203
+ RIGHT: 'right'
3204
+ };
3205
+ function CardboardVRDisplay(config$$1) {
3206
+ var defaults = extend({}, config);
3207
+ config$$1 = extend(defaults, config$$1 || {});
3208
+ VRDisplay.call(this, {
3209
+ wakelock: config$$1.MOBILE_WAKE_LOCK
3210
+ });
3211
+ this.config = config$$1;
3212
+ this.displayName = 'Cardboard VRDisplay';
3213
+ this.capabilities = new VRDisplayCapabilities({
3214
+ hasPosition: false,
3215
+ hasOrientation: true,
3216
+ hasExternalDisplay: false,
3217
+ canPresent: true,
3218
+ maxLayers: 1
3219
+ });
3220
+ this.stageParameters = null;
3221
+ this.bufferScale_ = this.config.BUFFER_SCALE;
3222
+ this.poseSensor_ = new PoseSensor(this.config);
3223
+ this.distorter_ = null;
3224
+ this.cardboardUI_ = null;
3225
+ this.dpdb_ = new Dpdb(this.config.DPDB_URL, this.onDeviceParamsUpdated_.bind(this));
3226
+ this.deviceInfo_ = new DeviceInfo(this.dpdb_.getDeviceParams(), config$$1.ADDITIONAL_VIEWERS);
3227
+ this.viewerSelector_ = new ViewerSelector(config$$1.DEFAULT_VIEWER);
3228
+ this.viewerSelector_.onChange(this.onViewerChanged_.bind(this));
3229
+ this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer());
3230
+ if (!this.config.ROTATE_INSTRUCTIONS_DISABLED) {
3231
+ this.rotateInstructions_ = new RotateInstructions();
3232
+ }
3233
+ if (isIOS()) {
3234
+ window.addEventListener('resize', this.onResize_.bind(this));
3235
+ }
3236
+ }
3237
+ CardboardVRDisplay.prototype = Object.create(VRDisplay.prototype);
3238
+ CardboardVRDisplay.prototype._getPose = function () {
3239
+ return {
3240
+ position: null,
3241
+ orientation: this.poseSensor_.getOrientation(),
3242
+ linearVelocity: null,
3243
+ linearAcceleration: null,
3244
+ angularVelocity: null,
3245
+ angularAcceleration: null
3246
+ };
3247
+ };
3248
+ CardboardVRDisplay.prototype._resetPose = function () {
3249
+ if (this.poseSensor_.resetPose) {
3250
+ this.poseSensor_.resetPose();
3251
+ }
3252
+ };
3253
+ CardboardVRDisplay.prototype._getFieldOfView = function (whichEye) {
3254
+ var fieldOfView;
3255
+ if (whichEye == Eye.LEFT) {
3256
+ fieldOfView = this.deviceInfo_.getFieldOfViewLeftEye();
3257
+ } else if (whichEye == Eye.RIGHT) {
3258
+ fieldOfView = this.deviceInfo_.getFieldOfViewRightEye();
3259
+ } else {
3260
+ console.error('Invalid eye provided: %s', whichEye);
3261
+ return null;
3262
+ }
3263
+ return fieldOfView;
3264
+ };
3265
+ CardboardVRDisplay.prototype._getEyeOffset = function (whichEye) {
3266
+ var offset;
3267
+ if (whichEye == Eye.LEFT) {
3268
+ offset = [-this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];
3269
+ } else if (whichEye == Eye.RIGHT) {
3270
+ offset = [this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];
3271
+ } else {
3272
+ console.error('Invalid eye provided: %s', whichEye);
3273
+ return null;
3274
+ }
3275
+ return offset;
3276
+ };
3277
+ CardboardVRDisplay.prototype.getEyeParameters = function (whichEye) {
3278
+ var offset = this._getEyeOffset(whichEye);
3279
+ var fieldOfView = this._getFieldOfView(whichEye);
3280
+ var eyeParams = {
3281
+ offset: offset,
3282
+ renderWidth: this.deviceInfo_.device.width * 0.5 * this.bufferScale_,
3283
+ renderHeight: this.deviceInfo_.device.height * this.bufferScale_
3284
+ };
3285
+ Object.defineProperty(eyeParams, 'fieldOfView', {
3286
+ enumerable: true,
3287
+ get: function get() {
3288
+ deprecateWarning('VRFieldOfView', 'VRFrameData\'s projection matrices');
3289
+ return fieldOfView;
3290
+ }
3291
+ });
3292
+ return eyeParams;
3293
+ };
3294
+ CardboardVRDisplay.prototype.onDeviceParamsUpdated_ = function (newParams) {
3295
+ if (this.config.DEBUG) {
3296
+ console.log('DPDB reported that device params were updated.');
3297
+ }
3298
+ this.deviceInfo_.updateDeviceParams(newParams);
3299
+ if (this.distorter_) {
3300
+ this.distorter_.updateDeviceInfo(this.deviceInfo_);
3301
+ }
3302
+ };
3303
+ CardboardVRDisplay.prototype.updateBounds_ = function () {
3304
+ if (this.layer_ && this.distorter_ && (this.layer_.leftBounds || this.layer_.rightBounds)) {
3305
+ this.distorter_.setTextureBounds(this.layer_.leftBounds, this.layer_.rightBounds);
3306
+ }
3307
+ };
3308
+ CardboardVRDisplay.prototype.beginPresent_ = function () {
3309
+ var gl = this.layer_.source.getContext('webgl');
3310
+ if (!gl) gl = this.layer_.source.getContext('experimental-webgl');
3311
+ if (!gl) gl = this.layer_.source.getContext('webgl2');
3312
+ if (!gl) return;
3313
+ if (this.layer_.predistorted) {
3314
+ if (!this.config.CARDBOARD_UI_DISABLED) {
3315
+ gl.canvas.width = getScreenWidth() * this.bufferScale_;
3316
+ gl.canvas.height = getScreenHeight() * this.bufferScale_;
3317
+ this.cardboardUI_ = new CardboardUI(gl);
3318
+ }
3319
+ } else {
3320
+ if (!this.config.CARDBOARD_UI_DISABLED) {
3321
+ this.cardboardUI_ = new CardboardUI(gl);
3322
+ }
3323
+ this.distorter_ = new CardboardDistorter(gl, this.cardboardUI_, this.config.BUFFER_SCALE, this.config.DIRTY_SUBMIT_FRAME_BINDINGS);
3324
+ this.distorter_.updateDeviceInfo(this.deviceInfo_);
3325
+ }
3326
+ if (this.cardboardUI_) {
3327
+ this.cardboardUI_.listen(function (e) {
3328
+ this.viewerSelector_.show(this.layer_.source.parentElement);
3329
+ e.stopPropagation();
3330
+ e.preventDefault();
3331
+ }.bind(this), function (e) {
3332
+ this.exitPresent();
3333
+ e.stopPropagation();
3334
+ e.preventDefault();
3335
+ }.bind(this));
3336
+ }
3337
+ if (this.rotateInstructions_) {
3338
+ if (isLandscapeMode() && isMobile()) {
3339
+ this.rotateInstructions_.showTemporarily(3000, this.layer_.source.parentElement);
3340
+ } else {
3341
+ this.rotateInstructions_.update();
3342
+ }
3343
+ }
3344
+ this.orientationHandler = this.onOrientationChange_.bind(this);
3345
+ window.addEventListener('orientationchange', this.orientationHandler);
3346
+ this.vrdisplaypresentchangeHandler = this.updateBounds_.bind(this);
3347
+ window.addEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);
3348
+ this.fireVRDisplayDeviceParamsChange_();
3349
+ };
3350
+ CardboardVRDisplay.prototype.endPresent_ = function () {
3351
+ if (this.distorter_) {
3352
+ this.distorter_.destroy();
3353
+ this.distorter_ = null;
3354
+ }
3355
+ if (this.cardboardUI_) {
3356
+ this.cardboardUI_.destroy();
3357
+ this.cardboardUI_ = null;
3358
+ }
3359
+ if (this.rotateInstructions_) {
3360
+ this.rotateInstructions_.hide();
3361
+ }
3362
+ this.viewerSelector_.hide();
3363
+ window.removeEventListener('orientationchange', this.orientationHandler);
3364
+ window.removeEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);
3365
+ };
3366
+ CardboardVRDisplay.prototype.updatePresent_ = function () {
3367
+ this.endPresent_();
3368
+ this.beginPresent_();
3369
+ };
3370
+ CardboardVRDisplay.prototype.submitFrame = function (pose) {
3371
+ if (this.distorter_) {
3372
+ this.updateBounds_();
3373
+ this.distorter_.submitFrame();
3374
+ } else if (this.cardboardUI_ && this.layer_) {
3375
+ var canvas = this.layer_.source.getContext('webgl').canvas;
3376
+ if (canvas.width != this.lastWidth || canvas.height != this.lastHeight) {
3377
+ this.cardboardUI_.onResize();
3378
+ }
3379
+ this.lastWidth = canvas.width;
3380
+ this.lastHeight = canvas.height;
3381
+ this.cardboardUI_.render();
3382
+ }
3383
+ };
3384
+ CardboardVRDisplay.prototype.onOrientationChange_ = function (e) {
3385
+ this.viewerSelector_.hide();
3386
+ if (this.rotateInstructions_) {
3387
+ this.rotateInstructions_.update();
3388
+ }
3389
+ this.onResize_();
3390
+ };
3391
+ CardboardVRDisplay.prototype.onResize_ = function (e) {
3392
+ if (this.layer_) {
3393
+ var gl = this.layer_.source.getContext('webgl');
3394
+ var cssProperties = ['position: absolute', 'top: 0', 'left: 0',
3395
+ 'width: 100vw', 'height: 100vh', 'border: 0', 'margin: 0',
3396
+ 'padding: 0px', 'box-sizing: content-box'];
3397
+ gl.canvas.setAttribute('style', cssProperties.join('; ') + ';');
3398
+ safariCssSizeWorkaround(gl.canvas);
3399
+ }
3400
+ };
3401
+ CardboardVRDisplay.prototype.onViewerChanged_ = function (viewer) {
3402
+ this.deviceInfo_.setViewer(viewer);
3403
+ if (this.distorter_) {
3404
+ this.distorter_.updateDeviceInfo(this.deviceInfo_);
3405
+ }
3406
+ this.fireVRDisplayDeviceParamsChange_();
3407
+ };
3408
+ CardboardVRDisplay.prototype.fireVRDisplayDeviceParamsChange_ = function () {
3409
+ var event = new CustomEvent('vrdisplaydeviceparamschange', {
3410
+ detail: {
3411
+ vrdisplay: this,
3412
+ deviceInfo: this.deviceInfo_
3413
+ }
3414
+ });
3415
+ window.dispatchEvent(event);
3416
+ };
3417
+ CardboardVRDisplay.VRFrameData = VRFrameData;
3418
+ CardboardVRDisplay.VRDisplay = VRDisplay;
3419
+ return CardboardVRDisplay;
3420
+ })));
3421
+ });
3422
+ var CardboardVRDisplay = unwrapExports(cardboardVrDisplay);
3423
+
3424
+ var version = "0.10.6";
3425
+
3426
+ var DefaultConfig = {
3427
+ ADDITIONAL_VIEWERS: [],
3428
+ DEFAULT_VIEWER: '',
3429
+ PROVIDE_MOBILE_VRDISPLAY: true,
3430
+ GET_VR_DISPLAYS_TIMEOUT: 1000,
3431
+ MOBILE_WAKE_LOCK: true,
3432
+ DEBUG: false,
3433
+ DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',
3434
+ K_FILTER: 0.98,
3435
+ PREDICTION_TIME_S: 0.040,
3436
+ TOUCH_PANNER_DISABLED: true,
3437
+ CARDBOARD_UI_DISABLED: false,
3438
+ ROTATE_INSTRUCTIONS_DISABLED: false,
3439
+ YAW_ONLY: false,
3440
+ BUFFER_SCALE: 0.5,
3441
+ DIRTY_SUBMIT_FRAME_BINDINGS: false
3442
+ };
3443
+
3444
+ function WebVRPolyfill(config) {
3445
+ this.config = extend(extend({}, DefaultConfig), config);
3446
+ this.polyfillDisplays = [];
3447
+ this.enabled = false;
3448
+ this.hasNative = 'getVRDisplays' in navigator;
3449
+ this.native = {};
3450
+ this.native.getVRDisplays = navigator.getVRDisplays;
3451
+ this.native.VRFrameData = window.VRFrameData;
3452
+ this.native.VRDisplay = window.VRDisplay;
3453
+ if (!this.hasNative || this.config.PROVIDE_MOBILE_VRDISPLAY && isMobile()) {
3454
+ this.enable();
3455
+ this.getVRDisplays().then(function (displays) {
3456
+ if (displays && displays[0] && displays[0].fireVRDisplayConnect_) {
3457
+ displays[0].fireVRDisplayConnect_();
3458
+ }
3459
+ });
3460
+ }
3461
+ }
3462
+ WebVRPolyfill.prototype.getPolyfillDisplays = function () {
3463
+ if (this._polyfillDisplaysPopulated) {
3464
+ return this.polyfillDisplays;
3465
+ }
3466
+ if (isMobile()) {
3467
+ var vrDisplay = new CardboardVRDisplay({
3468
+ ADDITIONAL_VIEWERS: this.config.ADDITIONAL_VIEWERS,
3469
+ DEFAULT_VIEWER: this.config.DEFAULT_VIEWER,
3470
+ MOBILE_WAKE_LOCK: this.config.MOBILE_WAKE_LOCK,
3471
+ DEBUG: this.config.DEBUG,
3472
+ DPDB_URL: this.config.DPDB_URL,
3473
+ CARDBOARD_UI_DISABLED: this.config.CARDBOARD_UI_DISABLED,
3474
+ K_FILTER: this.config.K_FILTER,
3475
+ PREDICTION_TIME_S: this.config.PREDICTION_TIME_S,
3476
+ TOUCH_PANNER_DISABLED: this.config.TOUCH_PANNER_DISABLED,
3477
+ ROTATE_INSTRUCTIONS_DISABLED: this.config.ROTATE_INSTRUCTIONS_DISABLED,
3478
+ YAW_ONLY: this.config.YAW_ONLY,
3479
+ BUFFER_SCALE: this.config.BUFFER_SCALE,
3480
+ DIRTY_SUBMIT_FRAME_BINDINGS: this.config.DIRTY_SUBMIT_FRAME_BINDINGS
3481
+ });
3482
+ this.polyfillDisplays.push(vrDisplay);
3483
+ }
3484
+ this._polyfillDisplaysPopulated = true;
3485
+ return this.polyfillDisplays;
3486
+ };
3487
+ WebVRPolyfill.prototype.enable = function () {
3488
+ this.enabled = true;
3489
+ if (this.hasNative && this.native.VRFrameData) {
3490
+ var NativeVRFrameData = this.native.VRFrameData;
3491
+ var nativeFrameData = new this.native.VRFrameData();
3492
+ var nativeGetFrameData = this.native.VRDisplay.prototype.getFrameData;
3493
+ window.VRDisplay.prototype.getFrameData = function (frameData) {
3494
+ if (frameData instanceof NativeVRFrameData) {
3495
+ nativeGetFrameData.call(this, frameData);
3496
+ return;
3497
+ }
3498
+ nativeGetFrameData.call(this, nativeFrameData);
3499
+ frameData.pose = nativeFrameData.pose;
3500
+ copyArray(nativeFrameData.leftProjectionMatrix, frameData.leftProjectionMatrix);
3501
+ copyArray(nativeFrameData.rightProjectionMatrix, frameData.rightProjectionMatrix);
3502
+ copyArray(nativeFrameData.leftViewMatrix, frameData.leftViewMatrix);
3503
+ copyArray(nativeFrameData.rightViewMatrix, frameData.rightViewMatrix);
3504
+ };
3505
+ }
3506
+ navigator.getVRDisplays = this.getVRDisplays.bind(this);
3507
+ window.VRDisplay = CardboardVRDisplay.VRDisplay;
3508
+ window.VRFrameData = CardboardVRDisplay.VRFrameData;
3509
+ };
3510
+ WebVRPolyfill.prototype.getVRDisplays = function () {
3511
+ var _this = this;
3512
+ var config = this.config;
3513
+ if (!this.hasNative) {
3514
+ return Promise.resolve(this.getPolyfillDisplays());
3515
+ }
3516
+ var timeoutId;
3517
+ var vrDisplaysNative = this.native.getVRDisplays.call(navigator);
3518
+ var timeoutPromise = new Promise(function (resolve) {
3519
+ timeoutId = setTimeout(function () {
3520
+ console.warn('Native WebVR implementation detected, but `getVRDisplays()` failed to resolve. Falling back to polyfill.');
3521
+ resolve([]);
3522
+ }, config.GET_VR_DISPLAYS_TIMEOUT);
3523
+ });
3524
+ return race([vrDisplaysNative, timeoutPromise]).then(function (nativeDisplays) {
3525
+ clearTimeout(timeoutId);
3526
+ return nativeDisplays.length > 0 ? nativeDisplays : _this.getPolyfillDisplays();
3527
+ });
3528
+ };
3529
+ WebVRPolyfill.version = version;
3530
+ WebVRPolyfill.VRFrameData = CardboardVRDisplay.VRFrameData;
3531
+ WebVRPolyfill.VRDisplay = CardboardVRDisplay.VRDisplay;
3532
+
3533
+
3534
+ var webvrPolyfill = Object.freeze({
3535
+ default: WebVRPolyfill
3536
+ });
3537
+
3538
+ var require$$0 = (webvrPolyfill && WebVRPolyfill) || webvrPolyfill;
3539
+
3540
+ if (typeof commonjsGlobal$1 !== 'undefined' && commonjsGlobal$1.window) {
3541
+ if (!commonjsGlobal$1.document) {
3542
+ commonjsGlobal$1.document = commonjsGlobal$1.window.document;
3543
+ }
3544
+ if (!commonjsGlobal$1.navigator) {
3545
+ commonjsGlobal$1.navigator = commonjsGlobal$1.window.navigator;
3546
+ }
3547
+ }
3548
+ var src = require$$0;
3549
+
3550
+ return src;
3551
+
3552
+ })));
3553
+ });
3554
+
3555
+ var WebVRPolyfill = unwrapExports(webvrPolyfill);
3556
+
3557
+ // Polyfills
3558
+
3559
+ if (Number.EPSILON === undefined) {
3560
+
3561
+ Number.EPSILON = Math.pow(2, - 52);
3562
+
3563
+ }
3564
+
3565
+ if (Number.isInteger === undefined) {
3566
+
3567
+ // Missing in IE
3568
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
3569
+
3570
+ Number.isInteger = function (value) {
3571
+
3572
+ return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
3573
+
3574
+ };
3575
+
3576
+ }
3577
+
3578
+ //
3579
+
3580
+ if (Math.sign === undefined) {
3581
+
3582
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign
3583
+
3584
+ Math.sign = function (x) {
3585
+
3586
+ return (x < 0) ? - 1 : (x > 0) ? 1 : + x;
3587
+
3588
+ };
3589
+
3590
+ }
3591
+
3592
+ if ('name' in Function.prototype === false) {
3593
+
3594
+ // Missing in IE
3595
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name
3596
+
3597
+ Object.defineProperty(Function.prototype, 'name', {
3598
+
3599
+ get: function () {
3600
+
3601
+ return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1];
3602
+
3603
+ }
3604
+
3605
+ });
3606
+
3607
+ }
3608
+
3609
+ if (Object.assign === undefined) {
3610
+
3611
+ // Missing in IE
3612
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3613
+
3614
+ (function () {
3615
+
3616
+ Object.assign = function (target) {
3617
+
3618
+ if (target === undefined || target === null) {
3619
+
3620
+ throw new TypeError('Cannot convert undefined or null to object');
3621
+
3622
+ }
3623
+
3624
+ var output = Object(target);
3625
+
3626
+ for (var index = 1; index < arguments.length; index++) {
3627
+
3628
+ var source = arguments[index];
3629
+
3630
+ if (source !== undefined && source !== null) {
3631
+
3632
+ for (var nextKey in source) {
3633
+
3634
+ if (Object.prototype.hasOwnProperty.call(source, nextKey)) {
3635
+
3636
+ output[nextKey] = source[nextKey];
3637
+
3638
+ }
3639
+
3640
+ }
3641
+
3642
+ }
3643
+
3644
+ }
3645
+
3646
+ return output;
3647
+
3648
+ };
3649
+
3650
+ })();
3651
+
3652
+ }
3653
+
3654
+ /**
3655
+ * https://github.com/mrdoob/eventdispatcher.js/
3656
+ */
3657
+
3658
+ function EventDispatcher() { }
3659
+
3660
+ Object.assign(EventDispatcher.prototype, {
3661
+
3662
+ addEventListener: function (type, listener) {
3663
+
3664
+ if (this._listeners === undefined) this._listeners = {};
3665
+
3666
+ var listeners = this._listeners;
3667
+
3668
+ if (listeners[type] === undefined) {
3669
+
3670
+ listeners[type] = [];
3671
+
3672
+ }
3673
+
3674
+ if (listeners[type].indexOf(listener) === - 1) {
3675
+
3676
+ listeners[type].push(listener);
3677
+
3678
+ }
3679
+
3680
+ },
3681
+
3682
+ hasEventListener: function (type, listener) {
3683
+
3684
+ if (this._listeners === undefined) return false;
3685
+
3686
+ var listeners = this._listeners;
3687
+
3688
+ return listeners[type] !== undefined && listeners[type].indexOf(listener) !== - 1;
3689
+
3690
+ },
3691
+
3692
+ removeEventListener: function (type, listener) {
3693
+
3694
+ if (this._listeners === undefined) return;
3695
+
3696
+ var listeners = this._listeners;
3697
+ var listenerArray = listeners[type];
3698
+
3699
+ if (listenerArray !== undefined) {
3700
+
3701
+ var index = listenerArray.indexOf(listener);
3702
+
3703
+ if (index !== - 1) {
3704
+
3705
+ listenerArray.splice(index, 1);
3706
+
3707
+ }
3708
+
3709
+ }
3710
+
3711
+ },
3712
+
3713
+ dispatchEvent: function (event) {
3714
+
3715
+ if (this._listeners === undefined) return;
3716
+
3717
+ var listeners = this._listeners;
3718
+ var listenerArray = listeners[event.type];
3719
+
3720
+ if (listenerArray !== undefined) {
3721
+
3722
+ event.target = this;
3723
+
3724
+ var array = listenerArray.slice(0);
3725
+
3726
+ for (var i = 0, l = array.length; i < l; i++) {
3727
+
3728
+ array[i].call(this, event);
3729
+
3730
+ }
3731
+
3732
+ }
3733
+
3734
+ }
3735
+
3736
+ });
3737
+
3738
+ var REVISION = '93';
3739
+ var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
3740
+ var CullFaceNone = 0;
3741
+ var CullFaceBack = 1;
3742
+ var CullFaceFront = 2;
3743
+ var PCFShadowMap = 1;
3744
+ var PCFSoftShadowMap = 2;
3745
+ var FrontSide = 0;
3746
+ var BackSide = 1;
3747
+ var DoubleSide = 2;
3748
+ var FlatShading = 1;
3749
+ var NoColors = 0;
3750
+ var FaceColors = 1;
3751
+ var VertexColors = 2;
3752
+ var NoBlending = 0;
3753
+ var NormalBlending = 1;
3754
+ var AdditiveBlending = 2;
3755
+ var SubtractiveBlending = 3;
3756
+ var MultiplyBlending = 4;
3757
+ var CustomBlending = 5;
3758
+ var AddEquation = 100;
3759
+ var SubtractEquation = 101;
3760
+ var ReverseSubtractEquation = 102;
3761
+ var MinEquation = 103;
3762
+ var MaxEquation = 104;
3763
+ var ZeroFactor = 200;
3764
+ var OneFactor = 201;
3765
+ var SrcColorFactor = 202;
3766
+ var OneMinusSrcColorFactor = 203;
3767
+ var SrcAlphaFactor = 204;
3768
+ var OneMinusSrcAlphaFactor = 205;
3769
+ var DstAlphaFactor = 206;
3770
+ var OneMinusDstAlphaFactor = 207;
3771
+ var DstColorFactor = 208;
3772
+ var OneMinusDstColorFactor = 209;
3773
+ var SrcAlphaSaturateFactor = 210;
3774
+ var NeverDepth = 0;
3775
+ var AlwaysDepth = 1;
3776
+ var LessDepth = 2;
3777
+ var LessEqualDepth = 3;
3778
+ var EqualDepth = 4;
3779
+ var GreaterEqualDepth = 5;
3780
+ var GreaterDepth = 6;
3781
+ var NotEqualDepth = 7;
3782
+ var MultiplyOperation = 0;
3783
+ var MixOperation = 1;
3784
+ var AddOperation = 2;
3785
+ var NoToneMapping = 0;
3786
+ var LinearToneMapping = 1;
3787
+ var ReinhardToneMapping = 2;
3788
+ var Uncharted2ToneMapping = 3;
3789
+ var CineonToneMapping = 4;
3790
+ var UVMapping = 300;
3791
+ var CubeReflectionMapping = 301;
3792
+ var CubeRefractionMapping = 302;
3793
+ var EquirectangularReflectionMapping = 303;
3794
+ var EquirectangularRefractionMapping = 304;
3795
+ var SphericalReflectionMapping = 305;
3796
+ var CubeUVReflectionMapping = 306;
3797
+ var CubeUVRefractionMapping = 307;
3798
+ var RepeatWrapping = 1000;
3799
+ var ClampToEdgeWrapping = 1001;
3800
+ var MirroredRepeatWrapping = 1002;
3801
+ var NearestFilter = 1003;
3802
+ var NearestMipMapNearestFilter = 1004;
3803
+ var NearestMipMapLinearFilter = 1005;
3804
+ var LinearFilter = 1006;
3805
+ var LinearMipMapNearestFilter = 1007;
3806
+ var LinearMipMapLinearFilter = 1008;
3807
+ var UnsignedByteType = 1009;
3808
+ var ByteType = 1010;
3809
+ var ShortType = 1011;
3810
+ var UnsignedShortType = 1012;
3811
+ var IntType = 1013;
3812
+ var UnsignedIntType = 1014;
3813
+ var FloatType = 1015;
3814
+ var HalfFloatType = 1016;
3815
+ var UnsignedShort4444Type = 1017;
3816
+ var UnsignedShort5551Type = 1018;
3817
+ var UnsignedShort565Type = 1019;
3818
+ var UnsignedInt248Type = 1020;
3819
+ var AlphaFormat = 1021;
3820
+ var RGBFormat = 1022;
3821
+ var RGBAFormat = 1023;
3822
+ var LuminanceFormat = 1024;
3823
+ var LuminanceAlphaFormat = 1025;
3824
+ var DepthFormat = 1026;
3825
+ var DepthStencilFormat = 1027;
3826
+ var RGB_S3TC_DXT1_Format = 33776;
3827
+ var RGBA_S3TC_DXT1_Format = 33777;
3828
+ var RGBA_S3TC_DXT3_Format = 33778;
3829
+ var RGBA_S3TC_DXT5_Format = 33779;
3830
+ var RGB_PVRTC_4BPPV1_Format = 35840;
3831
+ var RGB_PVRTC_2BPPV1_Format = 35841;
3832
+ var RGBA_PVRTC_4BPPV1_Format = 35842;
3833
+ var RGBA_PVRTC_2BPPV1_Format = 35843;
3834
+ var RGB_ETC1_Format = 36196;
3835
+ var RGBA_ASTC_4x4_Format = 37808;
3836
+ var RGBA_ASTC_5x4_Format = 37809;
3837
+ var RGBA_ASTC_5x5_Format = 37810;
3838
+ var RGBA_ASTC_6x5_Format = 37811;
3839
+ var RGBA_ASTC_6x6_Format = 37812;
3840
+ var RGBA_ASTC_8x5_Format = 37813;
3841
+ var RGBA_ASTC_8x6_Format = 37814;
3842
+ var RGBA_ASTC_8x8_Format = 37815;
3843
+ var RGBA_ASTC_10x5_Format = 37816;
3844
+ var RGBA_ASTC_10x6_Format = 37817;
3845
+ var RGBA_ASTC_10x8_Format = 37818;
3846
+ var RGBA_ASTC_10x10_Format = 37819;
3847
+ var RGBA_ASTC_12x10_Format = 37820;
3848
+ var RGBA_ASTC_12x12_Format = 37821;
3849
+ var LoopOnce = 2200;
3850
+ var LoopRepeat = 2201;
3851
+ var LoopPingPong = 2202;
3852
+ var InterpolateDiscrete = 2300;
3853
+ var InterpolateLinear = 2301;
3854
+ var InterpolateSmooth = 2302;
3855
+ var ZeroCurvatureEnding = 2400;
3856
+ var ZeroSlopeEnding = 2401;
3857
+ var WrapAroundEnding = 2402;
3858
+ var TrianglesDrawMode = 0;
3859
+ var TriangleStripDrawMode = 1;
3860
+ var TriangleFanDrawMode = 2;
3861
+ var LinearEncoding = 3000;
3862
+ var sRGBEncoding = 3001;
3863
+ var GammaEncoding = 3007;
3864
+ var RGBEEncoding = 3002;
3865
+ var RGBM7Encoding = 3004;
3866
+ var RGBM16Encoding = 3005;
3867
+ var RGBDEncoding = 3006;
3868
+ var BasicDepthPacking = 3200;
3869
+ var RGBADepthPacking = 3201;
3870
+
3871
+ /**
3872
+ * @author alteredq / http://alteredqualia.com/
3873
+ * @author mrdoob / http://mrdoob.com/
3874
+ */
3875
+
3876
+ var _Math = {
3877
+
3878
+ DEG2RAD: Math.PI / 180,
3879
+ RAD2DEG: 180 / Math.PI,
3880
+
3881
+ generateUUID: (function () {
3882
+
3883
+ // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
3884
+
3885
+ var lut = [];
3886
+
3887
+ for (var i = 0; i < 256; i++) {
3888
+
3889
+ lut[i] = (i < 16 ? '0' : '') + (i).toString(16);
3890
+
3891
+ }
3892
+
3893
+ return function generateUUID() {
3894
+
3895
+ var d0 = Math.random() * 0xffffffff | 0;
3896
+ var d1 = Math.random() * 0xffffffff | 0;
3897
+ var d2 = Math.random() * 0xffffffff | 0;
3898
+ var d3 = Math.random() * 0xffffffff | 0;
3899
+ var uuid = lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff] + '-' +
3900
+ lut[d1 & 0xff] + lut[d1 >> 8 & 0xff] + '-' + lut[d1 >> 16 & 0x0f | 0x40] + lut[d1 >> 24 & 0xff] + '-' +
3901
+ lut[d2 & 0x3f | 0x80] + lut[d2 >> 8 & 0xff] + '-' + lut[d2 >> 16 & 0xff] + lut[d2 >> 24 & 0xff] +
3902
+ lut[d3 & 0xff] + lut[d3 >> 8 & 0xff] + lut[d3 >> 16 & 0xff] + lut[d3 >> 24 & 0xff];
3903
+
3904
+ // .toUpperCase() here flattens concatenated strings to save heap memory space.
3905
+ return uuid.toUpperCase();
3906
+
3907
+ };
3908
+
3909
+ })(),
3910
+
3911
+ clamp: function (value, min, max) {
3912
+
3913
+ return Math.max(min, Math.min(max, value));
3914
+
3915
+ },
3916
+
3917
+ // compute euclidian modulo of m % n
3918
+ // https://en.wikipedia.org/wiki/Modulo_operation
3919
+
3920
+ euclideanModulo: function (n, m) {
3921
+
3922
+ return ((n % m) + m) % m;
3923
+
3924
+ },
3925
+
3926
+ // Linear mapping from range <a1, a2> to range <b1, b2>
3927
+
3928
+ mapLinear: function (x, a1, a2, b1, b2) {
3929
+
3930
+ return b1 + (x - a1) * (b2 - b1) / (a2 - a1);
3931
+
3932
+ },
3933
+
3934
+ // https://en.wikipedia.org/wiki/Linear_interpolation
3935
+
3936
+ lerp: function (x, y, t) {
3937
+
3938
+ return (1 - t) * x + t * y;
3939
+
3940
+ },
3941
+
3942
+ // http://en.wikipedia.org/wiki/Smoothstep
3943
+
3944
+ smoothstep: function (x, min, max) {
3945
+
3946
+ if (x <= min) return 0;
3947
+ if (x >= max) return 1;
3948
+
3949
+ x = (x - min) / (max - min);
3950
+
3951
+ return x * x * (3 - 2 * x);
3952
+
3953
+ },
3954
+
3955
+ smootherstep: function (x, min, max) {
3956
+
3957
+ if (x <= min) return 0;
3958
+ if (x >= max) return 1;
3959
+
3960
+ x = (x - min) / (max - min);
3961
+
3962
+ return x * x * x * (x * (x * 6 - 15) + 10);
3963
+
3964
+ },
3965
+
3966
+ // Random integer from <low, high> interval
3967
+
3968
+ randInt: function (low, high) {
3969
+
3970
+ return low + Math.floor(Math.random() * (high - low + 1));
3971
+
3972
+ },
3973
+
3974
+ // Random float from <low, high> interval
3975
+
3976
+ randFloat: function (low, high) {
3977
+
3978
+ return low + Math.random() * (high - low);
3979
+
3980
+ },
3981
+
3982
+ // Random float from <-range/2, range/2> interval
3983
+
3984
+ randFloatSpread: function (range) {
3985
+
3986
+ return range * (0.5 - Math.random());
3987
+
3988
+ },
3989
+
3990
+ degToRad: function (degrees) {
3991
+
3992
+ return degrees * _Math.DEG2RAD;
3993
+
3994
+ },
3995
+
3996
+ radToDeg: function (radians) {
3997
+
3998
+ return radians * _Math.RAD2DEG;
3999
+
4000
+ },
4001
+
4002
+ isPowerOfTwo: function (value) {
4003
+
4004
+ return (value & (value - 1)) === 0 && value !== 0;
4005
+
4006
+ },
4007
+
4008
+ ceilPowerOfTwo: function (value) {
4009
+
4010
+ return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));
4011
+
4012
+ },
4013
+
4014
+ floorPowerOfTwo: function (value) {
4015
+
4016
+ return Math.pow(2, Math.floor(Math.log(value) / Math.LN2));
4017
+
4018
+ }
4019
+
4020
+ };
4021
+
4022
+ /**
4023
+ * @author mrdoob / http://mrdoob.com/
4024
+ * @author philogb / http://blog.thejit.org/
4025
+ * @author egraether / http://egraether.com/
4026
+ * @author zz85 / http://www.lab4games.net/zz85/blog
4027
+ */
4028
+
4029
+ function Vector2(x, y) {
4030
+
4031
+ this.x = x || 0;
4032
+ this.y = y || 0;
4033
+
4034
+ }
4035
+
4036
+ Object.defineProperties(Vector2.prototype, {
4037
+
4038
+ "width": {
4039
+
4040
+ get: function () {
4041
+
4042
+ return this.x;
4043
+
4044
+ },
4045
+
4046
+ set: function (value) {
4047
+
4048
+ this.x = value;
4049
+
4050
+ }
4051
+
4052
+ },
4053
+
4054
+ "height": {
4055
+
4056
+ get: function () {
4057
+
4058
+ return this.y;
4059
+
4060
+ },
4061
+
4062
+ set: function (value) {
4063
+
4064
+ this.y = value;
4065
+
4066
+ }
4067
+
4068
+ }
4069
+
4070
+ });
4071
+
4072
+ Object.assign(Vector2.prototype, {
4073
+
4074
+ isVector2: true,
4075
+
4076
+ set: function (x, y) {
4077
+
4078
+ this.x = x;
4079
+ this.y = y;
4080
+
4081
+ return this;
4082
+
4083
+ },
4084
+
4085
+ setScalar: function (scalar) {
4086
+
4087
+ this.x = scalar;
4088
+ this.y = scalar;
4089
+
4090
+ return this;
4091
+
4092
+ },
4093
+
4094
+ setX: function (x) {
4095
+
4096
+ this.x = x;
4097
+
4098
+ return this;
4099
+
4100
+ },
4101
+
4102
+ setY: function (y) {
4103
+
4104
+ this.y = y;
4105
+
4106
+ return this;
4107
+
4108
+ },
4109
+
4110
+ setComponent: function (index, value) {
4111
+
4112
+ switch (index) {
4113
+
4114
+ case 0: this.x = value; break;
4115
+ case 1: this.y = value; break;
4116
+ default: throw new Error('index is out of range: ' + index);
4117
+
4118
+ }
4119
+
4120
+ return this;
4121
+
4122
+ },
4123
+
4124
+ getComponent: function (index) {
4125
+
4126
+ switch (index) {
4127
+
4128
+ case 0: return this.x;
4129
+ case 1: return this.y;
4130
+ default: throw new Error('index is out of range: ' + index);
4131
+
4132
+ }
4133
+
4134
+ },
4135
+
4136
+ clone: function () {
4137
+
4138
+ return new this.constructor(this.x, this.y);
4139
+
4140
+ },
4141
+
4142
+ copy: function (v) {
4143
+
4144
+ this.x = v.x;
4145
+ this.y = v.y;
4146
+
4147
+ return this;
4148
+
4149
+ },
4150
+
4151
+ add: function (v, w) {
4152
+
4153
+ if (w !== undefined) {
4154
+
4155
+ console.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');
4156
+ return this.addVectors(v, w);
4157
+
4158
+ }
4159
+
4160
+ this.x += v.x;
4161
+ this.y += v.y;
4162
+
4163
+ return this;
4164
+
4165
+ },
4166
+
4167
+ addScalar: function (s) {
4168
+
4169
+ this.x += s;
4170
+ this.y += s;
4171
+
4172
+ return this;
4173
+
4174
+ },
4175
+
4176
+ addVectors: function (a, b) {
4177
+
4178
+ this.x = a.x + b.x;
4179
+ this.y = a.y + b.y;
4180
+
4181
+ return this;
4182
+
4183
+ },
4184
+
4185
+ addScaledVector: function (v, s) {
4186
+
4187
+ this.x += v.x * s;
4188
+ this.y += v.y * s;
4189
+
4190
+ return this;
4191
+
4192
+ },
4193
+
4194
+ sub: function (v, w) {
4195
+
4196
+ if (w !== undefined) {
4197
+
4198
+ console.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');
4199
+ return this.subVectors(v, w);
4200
+
4201
+ }
4202
+
4203
+ this.x -= v.x;
4204
+ this.y -= v.y;
4205
+
4206
+ return this;
4207
+
4208
+ },
4209
+
4210
+ subScalar: function (s) {
4211
+
4212
+ this.x -= s;
4213
+ this.y -= s;
4214
+
4215
+ return this;
4216
+
4217
+ },
4218
+
4219
+ subVectors: function (a, b) {
4220
+
4221
+ this.x = a.x - b.x;
4222
+ this.y = a.y - b.y;
4223
+
4224
+ return this;
4225
+
4226
+ },
4227
+
4228
+ multiply: function (v) {
4229
+
4230
+ this.x *= v.x;
4231
+ this.y *= v.y;
4232
+
4233
+ return this;
4234
+
4235
+ },
4236
+
4237
+ multiplyScalar: function (scalar) {
4238
+
4239
+ this.x *= scalar;
4240
+ this.y *= scalar;
4241
+
4242
+ return this;
4243
+
4244
+ },
4245
+
4246
+ divide: function (v) {
4247
+
4248
+ this.x /= v.x;
4249
+ this.y /= v.y;
4250
+
4251
+ return this;
4252
+
4253
+ },
4254
+
4255
+ divideScalar: function (scalar) {
4256
+
4257
+ return this.multiplyScalar(1 / scalar);
4258
+
4259
+ },
4260
+
4261
+ applyMatrix3: function (m) {
4262
+
4263
+ var x = this.x, y = this.y;
4264
+ var e = m.elements;
4265
+
4266
+ this.x = e[0] * x + e[3] * y + e[6];
4267
+ this.y = e[1] * x + e[4] * y + e[7];
4268
+
4269
+ return this;
4270
+
4271
+ },
4272
+
4273
+ min: function (v) {
4274
+
4275
+ this.x = Math.min(this.x, v.x);
4276
+ this.y = Math.min(this.y, v.y);
4277
+
4278
+ return this;
4279
+
4280
+ },
4281
+
4282
+ max: function (v) {
4283
+
4284
+ this.x = Math.max(this.x, v.x);
4285
+ this.y = Math.max(this.y, v.y);
4286
+
4287
+ return this;
4288
+
4289
+ },
4290
+
4291
+ clamp: function (min, max) {
4292
+
4293
+ // assumes min < max, componentwise
4294
+
4295
+ this.x = Math.max(min.x, Math.min(max.x, this.x));
4296
+ this.y = Math.max(min.y, Math.min(max.y, this.y));
4297
+
4298
+ return this;
4299
+
4300
+ },
4301
+
4302
+ clampScalar: function () {
4303
+
4304
+ var min = new Vector2();
4305
+ var max = new Vector2();
4306
+
4307
+ return function clampScalar(minVal, maxVal) {
4308
+
4309
+ min.set(minVal, minVal);
4310
+ max.set(maxVal, maxVal);
4311
+
4312
+ return this.clamp(min, max);
4313
+
4314
+ };
4315
+
4316
+ }(),
4317
+
4318
+ clampLength: function (min, max) {
4319
+
4320
+ var length = this.length();
4321
+
4322
+ return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));
4323
+
4324
+ },
4325
+
4326
+ floor: function () {
4327
+
4328
+ this.x = Math.floor(this.x);
4329
+ this.y = Math.floor(this.y);
4330
+
4331
+ return this;
4332
+
4333
+ },
4334
+
4335
+ ceil: function () {
4336
+
4337
+ this.x = Math.ceil(this.x);
4338
+ this.y = Math.ceil(this.y);
4339
+
4340
+ return this;
4341
+
4342
+ },
4343
+
4344
+ round: function () {
4345
+
4346
+ this.x = Math.round(this.x);
4347
+ this.y = Math.round(this.y);
4348
+
4349
+ return this;
4350
+
4351
+ },
4352
+
4353
+ roundToZero: function () {
4354
+
4355
+ this.x = (this.x < 0) ? Math.ceil(this.x) : Math.floor(this.x);
4356
+ this.y = (this.y < 0) ? Math.ceil(this.y) : Math.floor(this.y);
4357
+
4358
+ return this;
4359
+
4360
+ },
4361
+
4362
+ negate: function () {
4363
+
4364
+ this.x = - this.x;
4365
+ this.y = - this.y;
4366
+
4367
+ return this;
4368
+
4369
+ },
4370
+
4371
+ dot: function (v) {
4372
+
4373
+ return this.x * v.x + this.y * v.y;
4374
+
4375
+ },
4376
+
4377
+ lengthSq: function () {
4378
+
4379
+ return this.x * this.x + this.y * this.y;
4380
+
4381
+ },
4382
+
4383
+ length: function () {
4384
+
4385
+ return Math.sqrt(this.x * this.x + this.y * this.y);
4386
+
4387
+ },
4388
+
4389
+ manhattanLength: function () {
4390
+
4391
+ return Math.abs(this.x) + Math.abs(this.y);
4392
+
4393
+ },
4394
+
4395
+ normalize: function () {
4396
+
4397
+ return this.divideScalar(this.length() || 1);
4398
+
4399
+ },
4400
+
4401
+ angle: function () {
4402
+
4403
+ // computes the angle in radians with respect to the positive x-axis
4404
+
4405
+ var angle = Math.atan2(this.y, this.x);
4406
+
4407
+ if (angle < 0) angle += 2 * Math.PI;
4408
+
4409
+ return angle;
4410
+
4411
+ },
4412
+
4413
+ distanceTo: function (v) {
4414
+
4415
+ return Math.sqrt(this.distanceToSquared(v));
4416
+
4417
+ },
4418
+
4419
+ distanceToSquared: function (v) {
4420
+
4421
+ var dx = this.x - v.x, dy = this.y - v.y;
4422
+ return dx * dx + dy * dy;
4423
+
4424
+ },
4425
+
4426
+ manhattanDistanceTo: function (v) {
4427
+
4428
+ return Math.abs(this.x - v.x) + Math.abs(this.y - v.y);
4429
+
4430
+ },
4431
+
4432
+ setLength: function (length) {
4433
+
4434
+ return this.normalize().multiplyScalar(length);
4435
+
4436
+ },
4437
+
4438
+ lerp: function (v, alpha) {
4439
+
4440
+ this.x += (v.x - this.x) * alpha;
4441
+ this.y += (v.y - this.y) * alpha;
4442
+
4443
+ return this;
4444
+
4445
+ },
4446
+
4447
+ lerpVectors: function (v1, v2, alpha) {
4448
+
4449
+ return this.subVectors(v2, v1).multiplyScalar(alpha).add(v1);
4450
+
4451
+ },
4452
+
4453
+ equals: function (v) {
4454
+
4455
+ return ((v.x === this.x) && (v.y === this.y));
4456
+
4457
+ },
4458
+
4459
+ fromArray: function (array, offset) {
4460
+
4461
+ if (offset === undefined) offset = 0;
4462
+
4463
+ this.x = array[offset];
4464
+ this.y = array[offset + 1];
4465
+
4466
+ return this;
4467
+
4468
+ },
4469
+
4470
+ toArray: function (array, offset) {
4471
+
4472
+ if (array === undefined) array = [];
4473
+ if (offset === undefined) offset = 0;
4474
+
4475
+ array[offset] = this.x;
4476
+ array[offset + 1] = this.y;
4477
+
4478
+ return array;
4479
+
4480
+ },
4481
+
4482
+ fromBufferAttribute: function (attribute, index, offset) {
4483
+
4484
+ if (offset !== undefined) {
4485
+
4486
+ console.warn('THREE.Vector2: offset has been removed from .fromBufferAttribute().');
4487
+
4488
+ }
4489
+
4490
+ this.x = attribute.getX(index);
4491
+ this.y = attribute.getY(index);
4492
+
4493
+ return this;
4494
+
4495
+ },
4496
+
4497
+ rotateAround: function (center, angle) {
4498
+
4499
+ var c = Math.cos(angle), s = Math.sin(angle);
4500
+
4501
+ var x = this.x - center.x;
4502
+ var y = this.y - center.y;
4503
+
4504
+ this.x = x * c - y * s + center.x;
4505
+ this.y = x * s + y * c + center.y;
4506
+
4507
+ return this;
4508
+
4509
+ }
4510
+
4511
+ });
4512
+
4513
+ /**
4514
+ * @author mrdoob / http://mrdoob.com/
4515
+ * @author supereggbert / http://www.paulbrunt.co.uk/
4516
+ * @author philogb / http://blog.thejit.org/
4517
+ * @author jordi_ros / http://plattsoft.com
4518
+ * @author D1plo1d / http://github.com/D1plo1d
4519
+ * @author alteredq / http://alteredqualia.com/
4520
+ * @author mikael emtinger / http://gomo.se/
4521
+ * @author timknip / http://www.floorplanner.com/
4522
+ * @author bhouston / http://clara.io
4523
+ * @author WestLangley / http://github.com/WestLangley
4524
+ */
4525
+
4526
+ function Matrix4() {
4527
+
4528
+ this.elements = [
4529
+
4530
+ 1, 0, 0, 0,
4531
+ 0, 1, 0, 0,
4532
+ 0, 0, 1, 0,
4533
+ 0, 0, 0, 1
4534
+
4535
+ ];
4536
+
4537
+ if (arguments.length > 0) {
4538
+
4539
+ console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.');
4540
+
4541
+ }
4542
+
4543
+ }
4544
+
4545
+ Object.assign(Matrix4.prototype, {
4546
+
4547
+ isMatrix4: true,
4548
+
4549
+ set: function (n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {
4550
+
4551
+ var te = this.elements;
4552
+
4553
+ te[0] = n11; te[4] = n12; te[8] = n13; te[12] = n14;
4554
+ te[1] = n21; te[5] = n22; te[9] = n23; te[13] = n24;
4555
+ te[2] = n31; te[6] = n32; te[10] = n33; te[14] = n34;
4556
+ te[3] = n41; te[7] = n42; te[11] = n43; te[15] = n44;
4557
+
4558
+ return this;
4559
+
4560
+ },
4561
+
4562
+ identity: function () {
4563
+
4564
+ this.set(
4565
+
4566
+ 1, 0, 0, 0,
4567
+ 0, 1, 0, 0,
4568
+ 0, 0, 1, 0,
4569
+ 0, 0, 0, 1
4570
+
4571
+ );
4572
+
4573
+ return this;
4574
+
4575
+ },
4576
+
4577
+ clone: function () {
4578
+
4579
+ return new Matrix4().fromArray(this.elements);
4580
+
4581
+ },
4582
+
4583
+ copy: function (m) {
4584
+
4585
+ var te = this.elements;
4586
+ var me = m.elements;
4587
+
4588
+ te[0] = me[0]; te[1] = me[1]; te[2] = me[2]; te[3] = me[3];
4589
+ te[4] = me[4]; te[5] = me[5]; te[6] = me[6]; te[7] = me[7];
4590
+ te[8] = me[8]; te[9] = me[9]; te[10] = me[10]; te[11] = me[11];
4591
+ te[12] = me[12]; te[13] = me[13]; te[14] = me[14]; te[15] = me[15];
4592
+
4593
+ return this;
4594
+
4595
+ },
4596
+
4597
+ copyPosition: function (m) {
4598
+
4599
+ var te = this.elements, me = m.elements;
4600
+
4601
+ te[12] = me[12];
4602
+ te[13] = me[13];
4603
+ te[14] = me[14];
4604
+
4605
+ return this;
4606
+
4607
+ },
4608
+
4609
+ extractBasis: function (xAxis, yAxis, zAxis) {
4610
+
4611
+ xAxis.setFromMatrixColumn(this, 0);
4612
+ yAxis.setFromMatrixColumn(this, 1);
4613
+ zAxis.setFromMatrixColumn(this, 2);
4614
+
4615
+ return this;
4616
+
4617
+ },
4618
+
4619
+ makeBasis: function (xAxis, yAxis, zAxis) {
4620
+
4621
+ this.set(
4622
+ xAxis.x, yAxis.x, zAxis.x, 0,
4623
+ xAxis.y, yAxis.y, zAxis.y, 0,
4624
+ xAxis.z, yAxis.z, zAxis.z, 0,
4625
+ 0, 0, 0, 1
4626
+ );
4627
+
4628
+ return this;
4629
+
4630
+ },
4631
+
4632
+ extractRotation: function () {
4633
+
4634
+ var v1 = new Vector3();
4635
+
4636
+ return function extractRotation(m) {
4637
+
4638
+ // this method does not support reflection matrices
4639
+
4640
+ var te = this.elements;
4641
+ var me = m.elements;
4642
+
4643
+ var scaleX = 1 / v1.setFromMatrixColumn(m, 0).length();
4644
+ var scaleY = 1 / v1.setFromMatrixColumn(m, 1).length();
4645
+ var scaleZ = 1 / v1.setFromMatrixColumn(m, 2).length();
4646
+
4647
+ te[0] = me[0] * scaleX;
4648
+ te[1] = me[1] * scaleX;
4649
+ te[2] = me[2] * scaleX;
4650
+ te[3] = 0;
4651
+
4652
+ te[4] = me[4] * scaleY;
4653
+ te[5] = me[5] * scaleY;
4654
+ te[6] = me[6] * scaleY;
4655
+ te[7] = 0;
4656
+
4657
+ te[8] = me[8] * scaleZ;
4658
+ te[9] = me[9] * scaleZ;
4659
+ te[10] = me[10] * scaleZ;
4660
+ te[11] = 0;
4661
+
4662
+ te[12] = 0;
4663
+ te[13] = 0;
4664
+ te[14] = 0;
4665
+ te[15] = 1;
4666
+
4667
+ return this;
4668
+
4669
+ };
4670
+
4671
+ }(),
4672
+
4673
+ makeRotationFromEuler: function (euler) {
4674
+
4675
+ if (!(euler && euler.isEuler)) {
4676
+
4677
+ console.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.');
4678
+
4679
+ }
4680
+
4681
+ var te = this.elements;
4682
+
4683
+ var x = euler.x, y = euler.y, z = euler.z;
4684
+ var a = Math.cos(x), b = Math.sin(x);
4685
+ var c = Math.cos(y), d = Math.sin(y);
4686
+ var e = Math.cos(z), f = Math.sin(z);
4687
+
4688
+ if (euler.order === 'XYZ') {
4689
+
4690
+ var ae = a * e, af = a * f, be = b * e, bf = b * f;
4691
+
4692
+ te[0] = c * e;
4693
+ te[4] = - c * f;
4694
+ te[8] = d;
4695
+
4696
+ te[1] = af + be * d;
4697
+ te[5] = ae - bf * d;
4698
+ te[9] = - b * c;
4699
+
4700
+ te[2] = bf - ae * d;
4701
+ te[6] = be + af * d;
4702
+ te[10] = a * c;
4703
+
4704
+ } else if (euler.order === 'YXZ') {
4705
+
4706
+ var ce = c * e, cf = c * f, de = d * e, df = d * f;
4707
+
4708
+ te[0] = ce + df * b;
4709
+ te[4] = de * b - cf;
4710
+ te[8] = a * d;
4711
+
4712
+ te[1] = a * f;
4713
+ te[5] = a * e;
4714
+ te[9] = - b;
4715
+
4716
+ te[2] = cf * b - de;
4717
+ te[6] = df + ce * b;
4718
+ te[10] = a * c;
4719
+
4720
+ } else if (euler.order === 'ZXY') {
4721
+
4722
+ var ce = c * e, cf = c * f, de = d * e, df = d * f;
4723
+
4724
+ te[0] = ce - df * b;
4725
+ te[4] = - a * f;
4726
+ te[8] = de + cf * b;
4727
+
4728
+ te[1] = cf + de * b;
4729
+ te[5] = a * e;
4730
+ te[9] = df - ce * b;
4731
+
4732
+ te[2] = - a * d;
4733
+ te[6] = b;
4734
+ te[10] = a * c;
4735
+
4736
+ } else if (euler.order === 'ZYX') {
4737
+
4738
+ var ae = a * e, af = a * f, be = b * e, bf = b * f;
4739
+
4740
+ te[0] = c * e;
4741
+ te[4] = be * d - af;
4742
+ te[8] = ae * d + bf;
4743
+
4744
+ te[1] = c * f;
4745
+ te[5] = bf * d + ae;
4746
+ te[9] = af * d - be;
4747
+
4748
+ te[2] = - d;
4749
+ te[6] = b * c;
4750
+ te[10] = a * c;
4751
+
4752
+ } else if (euler.order === 'YZX') {
4753
+
4754
+ var ac = a * c, ad = a * d, bc = b * c, bd = b * d;
4755
+
4756
+ te[0] = c * e;
4757
+ te[4] = bd - ac * f;
4758
+ te[8] = bc * f + ad;
4759
+
4760
+ te[1] = f;
4761
+ te[5] = a * e;
4762
+ te[9] = - b * e;
4763
+
4764
+ te[2] = - d * e;
4765
+ te[6] = ad * f + bc;
4766
+ te[10] = ac - bd * f;
4767
+
4768
+ } else if (euler.order === 'XZY') {
4769
+
4770
+ var ac = a * c, ad = a * d, bc = b * c, bd = b * d;
4771
+
4772
+ te[0] = c * e;
4773
+ te[4] = - f;
4774
+ te[8] = d * e;
4775
+
4776
+ te[1] = ac * f + bd;
4777
+ te[5] = a * e;
4778
+ te[9] = ad * f - bc;
4779
+
4780
+ te[2] = bc * f - ad;
4781
+ te[6] = b * e;
4782
+ te[10] = bd * f + ac;
4783
+
4784
+ }
4785
+
4786
+ // bottom row
4787
+ te[3] = 0;
4788
+ te[7] = 0;
4789
+ te[11] = 0;
4790
+
4791
+ // last column
4792
+ te[12] = 0;
4793
+ te[13] = 0;
4794
+ te[14] = 0;
4795
+ te[15] = 1;
4796
+
4797
+ return this;
4798
+
4799
+ },
4800
+
4801
+ makeRotationFromQuaternion: function () {
4802
+
4803
+ var zero = new Vector3(0, 0, 0);
4804
+ var one = new Vector3(1, 1, 1);
4805
+
4806
+ return function makeRotationFromQuaternion(q) {
4807
+
4808
+ return this.compose(zero, q, one);
4809
+
4810
+ };
4811
+
4812
+ }(),
4813
+
4814
+ lookAt: function () {
4815
+
4816
+ var x = new Vector3();
4817
+ var y = new Vector3();
4818
+ var z = new Vector3();
4819
+
4820
+ return function lookAt(eye, target, up) {
4821
+
4822
+ var te = this.elements;
4823
+
4824
+ z.subVectors(eye, target);
4825
+
4826
+ if (z.lengthSq() === 0) {
4827
+
4828
+ // eye and target are in the same position
4829
+
4830
+ z.z = 1;
4831
+
4832
+ }
4833
+
4834
+ z.normalize();
4835
+ x.crossVectors(up, z);
4836
+
4837
+ if (x.lengthSq() === 0) {
4838
+
4839
+ // up and z are parallel
4840
+
4841
+ if (Math.abs(up.z) === 1) {
4842
+
4843
+ z.x += 0.0001;
4844
+
4845
+ } else {
4846
+
4847
+ z.z += 0.0001;
4848
+
4849
+ }
4850
+
4851
+ z.normalize();
4852
+ x.crossVectors(up, z);
4853
+
4854
+ }
4855
+
4856
+ x.normalize();
4857
+ y.crossVectors(z, x);
4858
+
4859
+ te[0] = x.x; te[4] = y.x; te[8] = z.x;
4860
+ te[1] = x.y; te[5] = y.y; te[9] = z.y;
4861
+ te[2] = x.z; te[6] = y.z; te[10] = z.z;
4862
+
4863
+ return this;
4864
+
4865
+ };
4866
+
4867
+ }(),
4868
+
4869
+ multiply: function (m, n) {
4870
+
4871
+ if (n !== undefined) {
4872
+
4873
+ console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.');
4874
+ return this.multiplyMatrices(m, n);
4875
+
4876
+ }
4877
+
4878
+ return this.multiplyMatrices(this, m);
4879
+
4880
+ },
4881
+
4882
+ premultiply: function (m) {
4883
+
4884
+ return this.multiplyMatrices(m, this);
4885
+
4886
+ },
4887
+
4888
+ multiplyMatrices: function (a, b) {
4889
+
4890
+ var ae = a.elements;
4891
+ var be = b.elements;
4892
+ var te = this.elements;
4893
+
4894
+ var a11 = ae[0], a12 = ae[4], a13 = ae[8], a14 = ae[12];
4895
+ var a21 = ae[1], a22 = ae[5], a23 = ae[9], a24 = ae[13];
4896
+ var a31 = ae[2], a32 = ae[6], a33 = ae[10], a34 = ae[14];
4897
+ var a41 = ae[3], a42 = ae[7], a43 = ae[11], a44 = ae[15];
4898
+
4899
+ var b11 = be[0], b12 = be[4], b13 = be[8], b14 = be[12];
4900
+ var b21 = be[1], b22 = be[5], b23 = be[9], b24 = be[13];
4901
+ var b31 = be[2], b32 = be[6], b33 = be[10], b34 = be[14];
4902
+ var b41 = be[3], b42 = be[7], b43 = be[11], b44 = be[15];
4903
+
4904
+ te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;
4905
+ te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;
4906
+ te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;
4907
+ te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;
4908
+
4909
+ te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;
4910
+ te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;
4911
+ te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;
4912
+ te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;
4913
+
4914
+ te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;
4915
+ te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;
4916
+ te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;
4917
+ te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;
4918
+
4919
+ te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;
4920
+ te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;
4921
+ te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;
4922
+ te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;
4923
+
4924
+ return this;
4925
+
4926
+ },
4927
+
4928
+ multiplyScalar: function (s) {
4929
+
4930
+ var te = this.elements;
4931
+
4932
+ te[0] *= s; te[4] *= s; te[8] *= s; te[12] *= s;
4933
+ te[1] *= s; te[5] *= s; te[9] *= s; te[13] *= s;
4934
+ te[2] *= s; te[6] *= s; te[10] *= s; te[14] *= s;
4935
+ te[3] *= s; te[7] *= s; te[11] *= s; te[15] *= s;
4936
+
4937
+ return this;
4938
+
4939
+ },
4940
+
4941
+ applyToBufferAttribute: function () {
4942
+
4943
+ var v1 = new Vector3();
4944
+
4945
+ return function applyToBufferAttribute(attribute) {
4946
+
4947
+ for (var i = 0, l = attribute.count; i < l; i++) {
4948
+
4949
+ v1.x = attribute.getX(i);
4950
+ v1.y = attribute.getY(i);
4951
+ v1.z = attribute.getZ(i);
4952
+
4953
+ v1.applyMatrix4(this);
4954
+
4955
+ attribute.setXYZ(i, v1.x, v1.y, v1.z);
4956
+
4957
+ }
4958
+
4959
+ return attribute;
4960
+
4961
+ };
4962
+
4963
+ }(),
4964
+
4965
+ determinant: function () {
4966
+
4967
+ var te = this.elements;
4968
+
4969
+ var n11 = te[0], n12 = te[4], n13 = te[8], n14 = te[12];
4970
+ var n21 = te[1], n22 = te[5], n23 = te[9], n24 = te[13];
4971
+ var n31 = te[2], n32 = te[6], n33 = te[10], n34 = te[14];
4972
+ var n41 = te[3], n42 = te[7], n43 = te[11], n44 = te[15];
4973
+
4974
+ //TODO: make this more efficient
4975
+ //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )
4976
+
4977
+ return (
4978
+ n41 * (
4979
+ + n14 * n23 * n32
4980
+ - n13 * n24 * n32
4981
+ - n14 * n22 * n33
4982
+ + n12 * n24 * n33
4983
+ + n13 * n22 * n34
4984
+ - n12 * n23 * n34
4985
+ ) +
4986
+ n42 * (
4987
+ + n11 * n23 * n34
4988
+ - n11 * n24 * n33
4989
+ + n14 * n21 * n33
4990
+ - n13 * n21 * n34
4991
+ + n13 * n24 * n31
4992
+ - n14 * n23 * n31
4993
+ ) +
4994
+ n43 * (
4995
+ + n11 * n24 * n32
4996
+ - n11 * n22 * n34
4997
+ - n14 * n21 * n32
4998
+ + n12 * n21 * n34
4999
+ + n14 * n22 * n31
5000
+ - n12 * n24 * n31
5001
+ ) +
5002
+ n44 * (
5003
+ - n13 * n22 * n31
5004
+ - n11 * n23 * n32
5005
+ + n11 * n22 * n33
5006
+ + n13 * n21 * n32
5007
+ - n12 * n21 * n33
5008
+ + n12 * n23 * n31
5009
+ )
5010
+
5011
+ );
5012
+
5013
+ },
5014
+
5015
+ transpose: function () {
5016
+
5017
+ var te = this.elements;
5018
+ var tmp;
5019
+
5020
+ tmp = te[1]; te[1] = te[4]; te[4] = tmp;
5021
+ tmp = te[2]; te[2] = te[8]; te[8] = tmp;
5022
+ tmp = te[6]; te[6] = te[9]; te[9] = tmp;
5023
+
5024
+ tmp = te[3]; te[3] = te[12]; te[12] = tmp;
5025
+ tmp = te[7]; te[7] = te[13]; te[13] = tmp;
5026
+ tmp = te[11]; te[11] = te[14]; te[14] = tmp;
5027
+
5028
+ return this;
5029
+
5030
+ },
5031
+
5032
+ setPosition: function (v) {
5033
+
5034
+ var te = this.elements;
5035
+
5036
+ te[12] = v.x;
5037
+ te[13] = v.y;
5038
+ te[14] = v.z;
5039
+
5040
+ return this;
5041
+
5042
+ },
5043
+
5044
+ getInverse: function (m, throwOnDegenerate) {
5045
+
5046
+ // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
5047
+ var te = this.elements,
5048
+ me = m.elements,
5049
+
5050
+ n11 = me[0], n21 = me[1], n31 = me[2], n41 = me[3],
5051
+ n12 = me[4], n22 = me[5], n32 = me[6], n42 = me[7],
5052
+ n13 = me[8], n23 = me[9], n33 = me[10], n43 = me[11],
5053
+ n14 = me[12], n24 = me[13], n34 = me[14], n44 = me[15],
5054
+
5055
+ t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,
5056
+ t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,
5057
+ t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,
5058
+ t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;
5059
+
5060
+ var det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;
5061
+
5062
+ if (det === 0) {
5063
+
5064
+ var msg = "THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";
5065
+
5066
+ if (throwOnDegenerate === true) {
5067
+
5068
+ throw new Error(msg);
5069
+
5070
+ } else {
5071
+
5072
+ console.warn(msg);
5073
+
5074
+ }
5075
+
5076
+ return this.identity();
5077
+
5078
+ }
5079
+
5080
+ var detInv = 1 / det;
5081
+
5082
+ te[0] = t11 * detInv;
5083
+ te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv;
5084
+ te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv;
5085
+ te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv;
5086
+
5087
+ te[4] = t12 * detInv;
5088
+ te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv;
5089
+ te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv;
5090
+ te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv;
5091
+
5092
+ te[8] = t13 * detInv;
5093
+ te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv;
5094
+ te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv;
5095
+ te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv;
5096
+
5097
+ te[12] = t14 * detInv;
5098
+ te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv;
5099
+ te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv;
5100
+ te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv;
5101
+
5102
+ return this;
5103
+
5104
+ },
5105
+
5106
+ scale: function (v) {
5107
+
5108
+ var te = this.elements;
5109
+ var x = v.x, y = v.y, z = v.z;
5110
+
5111
+ te[0] *= x; te[4] *= y; te[8] *= z;
5112
+ te[1] *= x; te[5] *= y; te[9] *= z;
5113
+ te[2] *= x; te[6] *= y; te[10] *= z;
5114
+ te[3] *= x; te[7] *= y; te[11] *= z;
5115
+
5116
+ return this;
5117
+
5118
+ },
5119
+
5120
+ getMaxScaleOnAxis: function () {
5121
+
5122
+ var te = this.elements;
5123
+
5124
+ var scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2];
5125
+ var scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6];
5126
+ var scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10];
5127
+
5128
+ return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));
5129
+
5130
+ },
5131
+
5132
+ makeTranslation: function (x, y, z) {
5133
+
5134
+ this.set(
5135
+
5136
+ 1, 0, 0, x,
5137
+ 0, 1, 0, y,
5138
+ 0, 0, 1, z,
5139
+ 0, 0, 0, 1
5140
+
5141
+ );
5142
+
5143
+ return this;
5144
+
5145
+ },
5146
+
5147
+ makeRotationX: function (theta) {
5148
+
5149
+ var c = Math.cos(theta), s = Math.sin(theta);
5150
+
5151
+ this.set(
5152
+
5153
+ 1, 0, 0, 0,
5154
+ 0, c, - s, 0,
5155
+ 0, s, c, 0,
5156
+ 0, 0, 0, 1
5157
+
5158
+ );
5159
+
5160
+ return this;
5161
+
5162
+ },
5163
+
5164
+ makeRotationY: function (theta) {
5165
+
5166
+ var c = Math.cos(theta), s = Math.sin(theta);
5167
+
5168
+ this.set(
5169
+
5170
+ c, 0, s, 0,
5171
+ 0, 1, 0, 0,
5172
+ - s, 0, c, 0,
5173
+ 0, 0, 0, 1
5174
+
5175
+ );
5176
+
5177
+ return this;
5178
+
5179
+ },
5180
+
5181
+ makeRotationZ: function (theta) {
5182
+
5183
+ var c = Math.cos(theta), s = Math.sin(theta);
5184
+
5185
+ this.set(
5186
+
5187
+ c, - s, 0, 0,
5188
+ s, c, 0, 0,
5189
+ 0, 0, 1, 0,
5190
+ 0, 0, 0, 1
5191
+
5192
+ );
5193
+
5194
+ return this;
5195
+
5196
+ },
5197
+
5198
+ makeRotationAxis: function (axis, angle) {
5199
+
5200
+ // Based on http://www.gamedev.net/reference/articles/article1199.asp
5201
+
5202
+ var c = Math.cos(angle);
5203
+ var s = Math.sin(angle);
5204
+ var t = 1 - c;
5205
+ var x = axis.x, y = axis.y, z = axis.z;
5206
+ var tx = t * x, ty = t * y;
5207
+
5208
+ this.set(
5209
+
5210
+ tx * x + c, tx * y - s * z, tx * z + s * y, 0,
5211
+ tx * y + s * z, ty * y + c, ty * z - s * x, 0,
5212
+ tx * z - s * y, ty * z + s * x, t * z * z + c, 0,
5213
+ 0, 0, 0, 1
5214
+
5215
+ );
5216
+
5217
+ return this;
5218
+
5219
+ },
5220
+
5221
+ makeScale: function (x, y, z) {
5222
+
5223
+ this.set(
5224
+
5225
+ x, 0, 0, 0,
5226
+ 0, y, 0, 0,
5227
+ 0, 0, z, 0,
5228
+ 0, 0, 0, 1
5229
+
5230
+ );
5231
+
5232
+ return this;
5233
+
5234
+ },
5235
+
5236
+ makeShear: function (x, y, z) {
5237
+
5238
+ this.set(
5239
+
5240
+ 1, y, z, 0,
5241
+ x, 1, z, 0,
5242
+ x, y, 1, 0,
5243
+ 0, 0, 0, 1
5244
+
5245
+ );
5246
+
5247
+ return this;
5248
+
5249
+ },
5250
+
5251
+ compose: function (position, quaternion, scale) {
5252
+
5253
+ var te = this.elements;
5254
+
5255
+ var x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;
5256
+ var x2 = x + x, y2 = y + y, z2 = z + z;
5257
+ var xx = x * x2, xy = x * y2, xz = x * z2;
5258
+ var yy = y * y2, yz = y * z2, zz = z * z2;
5259
+ var wx = w * x2, wy = w * y2, wz = w * z2;
5260
+
5261
+ var sx = scale.x, sy = scale.y, sz = scale.z;
5262
+
5263
+ te[0] = (1 - (yy + zz)) * sx;
5264
+ te[1] = (xy + wz) * sx;
5265
+ te[2] = (xz - wy) * sx;
5266
+ te[3] = 0;
5267
+
5268
+ te[4] = (xy - wz) * sy;
5269
+ te[5] = (1 - (xx + zz)) * sy;
5270
+ te[6] = (yz + wx) * sy;
5271
+ te[7] = 0;
5272
+
5273
+ te[8] = (xz + wy) * sz;
5274
+ te[9] = (yz - wx) * sz;
5275
+ te[10] = (1 - (xx + yy)) * sz;
5276
+ te[11] = 0;
5277
+
5278
+ te[12] = position.x;
5279
+ te[13] = position.y;
5280
+ te[14] = position.z;
5281
+ te[15] = 1;
5282
+
5283
+ return this;
5284
+
5285
+ },
5286
+
5287
+ decompose: function () {
5288
+
5289
+ var vector = new Vector3();
5290
+ var matrix = new Matrix4();
5291
+
5292
+ return function decompose(position, quaternion, scale) {
5293
+
5294
+ var te = this.elements;
5295
+
5296
+ var sx = vector.set(te[0], te[1], te[2]).length();
5297
+ var sy = vector.set(te[4], te[5], te[6]).length();
5298
+ var sz = vector.set(te[8], te[9], te[10]).length();
5299
+
5300
+ // if determine is negative, we need to invert one scale
5301
+ var det = this.determinant();
5302
+ if (det < 0) sx = - sx;
5303
+
5304
+ position.x = te[12];
5305
+ position.y = te[13];
5306
+ position.z = te[14];
5307
+
5308
+ // scale the rotation part
5309
+ matrix.copy(this);
5310
+
5311
+ var invSX = 1 / sx;
5312
+ var invSY = 1 / sy;
5313
+ var invSZ = 1 / sz;
5314
+
5315
+ matrix.elements[0] *= invSX;
5316
+ matrix.elements[1] *= invSX;
5317
+ matrix.elements[2] *= invSX;
5318
+
5319
+ matrix.elements[4] *= invSY;
5320
+ matrix.elements[5] *= invSY;
5321
+ matrix.elements[6] *= invSY;
5322
+
5323
+ matrix.elements[8] *= invSZ;
5324
+ matrix.elements[9] *= invSZ;
5325
+ matrix.elements[10] *= invSZ;
5326
+
5327
+ quaternion.setFromRotationMatrix(matrix);
5328
+
5329
+ scale.x = sx;
5330
+ scale.y = sy;
5331
+ scale.z = sz;
5332
+
5333
+ return this;
5334
+
5335
+ };
5336
+
5337
+ }(),
5338
+
5339
+ makePerspective: function (left, right, top, bottom, near, far) {
5340
+
5341
+ if (far === undefined) {
5342
+
5343
+ console.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.');
5344
+
5345
+ }
5346
+
5347
+ var te = this.elements;
5348
+ var x = 2 * near / (right - left);
5349
+ var y = 2 * near / (top - bottom);
5350
+
5351
+ var a = (right + left) / (right - left);
5352
+ var b = (top + bottom) / (top - bottom);
5353
+ var c = - (far + near) / (far - near);
5354
+ var d = - 2 * far * near / (far - near);
5355
+
5356
+ te[0] = x; te[4] = 0; te[8] = a; te[12] = 0;
5357
+ te[1] = 0; te[5] = y; te[9] = b; te[13] = 0;
5358
+ te[2] = 0; te[6] = 0; te[10] = c; te[14] = d;
5359
+ te[3] = 0; te[7] = 0; te[11] = - 1; te[15] = 0;
5360
+
5361
+ return this;
5362
+
5363
+ },
5364
+
5365
+ makeOrthographic: function (left, right, top, bottom, near, far) {
5366
+
5367
+ var te = this.elements;
5368
+ var w = 1.0 / (right - left);
5369
+ var h = 1.0 / (top - bottom);
5370
+ var p = 1.0 / (far - near);
5371
+
5372
+ var x = (right + left) * w;
5373
+ var y = (top + bottom) * h;
5374
+ var z = (far + near) * p;
5375
+
5376
+ te[0] = 2 * w; te[4] = 0; te[8] = 0; te[12] = - x;
5377
+ te[1] = 0; te[5] = 2 * h; te[9] = 0; te[13] = - y;
5378
+ te[2] = 0; te[6] = 0; te[10] = - 2 * p; te[14] = - z;
5379
+ te[3] = 0; te[7] = 0; te[11] = 0; te[15] = 1;
5380
+
5381
+ return this;
5382
+
5383
+ },
5384
+
5385
+ equals: function (matrix) {
5386
+
5387
+ var te = this.elements;
5388
+ var me = matrix.elements;
5389
+
5390
+ for (var i = 0; i < 16; i++) {
5391
+
5392
+ if (te[i] !== me[i]) return false;
5393
+
5394
+ }
5395
+
5396
+ return true;
5397
+
5398
+ },
5399
+
5400
+ fromArray: function (array, offset) {
5401
+
5402
+ if (offset === undefined) offset = 0;
5403
+
5404
+ for (var i = 0; i < 16; i++) {
5405
+
5406
+ this.elements[i] = array[i + offset];
5407
+
5408
+ }
5409
+
5410
+ return this;
5411
+
5412
+ },
5413
+
5414
+ toArray: function (array, offset) {
5415
+
5416
+ if (array === undefined) array = [];
5417
+ if (offset === undefined) offset = 0;
5418
+
5419
+ var te = this.elements;
5420
+
5421
+ array[offset] = te[0];
5422
+ array[offset + 1] = te[1];
5423
+ array[offset + 2] = te[2];
5424
+ array[offset + 3] = te[3];
5425
+
5426
+ array[offset + 4] = te[4];
5427
+ array[offset + 5] = te[5];
5428
+ array[offset + 6] = te[6];
5429
+ array[offset + 7] = te[7];
5430
+
5431
+ array[offset + 8] = te[8];
5432
+ array[offset + 9] = te[9];
5433
+ array[offset + 10] = te[10];
5434
+ array[offset + 11] = te[11];
5435
+
5436
+ array[offset + 12] = te[12];
5437
+ array[offset + 13] = te[13];
5438
+ array[offset + 14] = te[14];
5439
+ array[offset + 15] = te[15];
5440
+
5441
+ return array;
5442
+
5443
+ }
5444
+
5445
+ });
5446
+
5447
+ /**
5448
+ * @author mikael emtinger / http://gomo.se/
5449
+ * @author alteredq / http://alteredqualia.com/
5450
+ * @author WestLangley / http://github.com/WestLangley
5451
+ * @author bhouston / http://clara.io
5452
+ */
5453
+
5454
+ function Quaternion(x, y, z, w) {
5455
+
5456
+ this._x = x || 0;
5457
+ this._y = y || 0;
5458
+ this._z = z || 0;
5459
+ this._w = (w !== undefined) ? w : 1;
5460
+
5461
+ }
5462
+
5463
+ Object.assign(Quaternion, {
5464
+
5465
+ slerp: function (qa, qb, qm, t) {
5466
+
5467
+ return qm.copy(qa).slerp(qb, t);
5468
+
5469
+ },
5470
+
5471
+ slerpFlat: function (dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) {
5472
+
5473
+ // fuzz-free, array-based Quaternion SLERP operation
5474
+
5475
+ var x0 = src0[srcOffset0 + 0],
5476
+ y0 = src0[srcOffset0 + 1],
5477
+ z0 = src0[srcOffset0 + 2],
5478
+ w0 = src0[srcOffset0 + 3],
5479
+
5480
+ x1 = src1[srcOffset1 + 0],
5481
+ y1 = src1[srcOffset1 + 1],
5482
+ z1 = src1[srcOffset1 + 2],
5483
+ w1 = src1[srcOffset1 + 3];
5484
+
5485
+ if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) {
5486
+
5487
+ var s = 1 - t,
5488
+
5489
+ cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
5490
+
5491
+ dir = (cos >= 0 ? 1 : - 1),
5492
+ sqrSin = 1 - cos * cos;
5493
+
5494
+ // Skip the Slerp for tiny steps to avoid numeric problems:
5495
+ if (sqrSin > Number.EPSILON) {
5496
+
5497
+ var sin = Math.sqrt(sqrSin),
5498
+ len = Math.atan2(sin, cos * dir);
5499
+
5500
+ s = Math.sin(s * len) / sin;
5501
+ t = Math.sin(t * len) / sin;
5502
+
5503
+ }
5504
+
5505
+ var tDir = t * dir;
5506
+
5507
+ x0 = x0 * s + x1 * tDir;
5508
+ y0 = y0 * s + y1 * tDir;
5509
+ z0 = z0 * s + z1 * tDir;
5510
+ w0 = w0 * s + w1 * tDir;
5511
+
5512
+ // Normalize in case we just did a lerp:
5513
+ if (s === 1 - t) {
5514
+
5515
+ var f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0);
5516
+
5517
+ x0 *= f;
5518
+ y0 *= f;
5519
+ z0 *= f;
5520
+ w0 *= f;
5521
+
5522
+ }
5523
+
5524
+ }
5525
+
5526
+ dst[dstOffset] = x0;
5527
+ dst[dstOffset + 1] = y0;
5528
+ dst[dstOffset + 2] = z0;
5529
+ dst[dstOffset + 3] = w0;
5530
+
5531
+ }
5532
+
5533
+ });
5534
+
5535
+ Object.defineProperties(Quaternion.prototype, {
5536
+
5537
+ x: {
5538
+
5539
+ get: function () {
5540
+
5541
+ return this._x;
5542
+
5543
+ },
5544
+
5545
+ set: function (value) {
5546
+
5547
+ this._x = value;
5548
+ this.onChangeCallback();
5549
+
5550
+ }
5551
+
5552
+ },
5553
+
5554
+ y: {
5555
+
5556
+ get: function () {
5557
+
5558
+ return this._y;
5559
+
5560
+ },
5561
+
5562
+ set: function (value) {
5563
+
5564
+ this._y = value;
5565
+ this.onChangeCallback();
5566
+
5567
+ }
5568
+
5569
+ },
5570
+
5571
+ z: {
5572
+
5573
+ get: function () {
5574
+
5575
+ return this._z;
5576
+
5577
+ },
5578
+
5579
+ set: function (value) {
5580
+
5581
+ this._z = value;
5582
+ this.onChangeCallback();
5583
+
5584
+ }
5585
+
5586
+ },
5587
+
5588
+ w: {
5589
+
5590
+ get: function () {
5591
+
5592
+ return this._w;
5593
+
5594
+ },
5595
+
5596
+ set: function (value) {
5597
+
5598
+ this._w = value;
5599
+ this.onChangeCallback();
5600
+
5601
+ }
5602
+
5603
+ }
5604
+
5605
+ });
5606
+
5607
+ Object.assign(Quaternion.prototype, {
5608
+
5609
+ set: function (x, y, z, w) {
5610
+
5611
+ this._x = x;
5612
+ this._y = y;
5613
+ this._z = z;
5614
+ this._w = w;
5615
+
5616
+ this.onChangeCallback();
5617
+
5618
+ return this;
5619
+
5620
+ },
5621
+
5622
+ clone: function () {
5623
+
5624
+ return new this.constructor(this._x, this._y, this._z, this._w);
5625
+
5626
+ },
5627
+
5628
+ copy: function (quaternion) {
5629
+
5630
+ this._x = quaternion.x;
5631
+ this._y = quaternion.y;
5632
+ this._z = quaternion.z;
5633
+ this._w = quaternion.w;
5634
+
5635
+ this.onChangeCallback();
5636
+
5637
+ return this;
5638
+
5639
+ },
5640
+
5641
+ setFromEuler: function (euler, update) {
5642
+
5643
+ if (!(euler && euler.isEuler)) {
5644
+
5645
+ throw new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.');
5646
+
5647
+ }
5648
+
5649
+ var x = euler._x, y = euler._y, z = euler._z, order = euler.order;
5650
+
5651
+ // http://www.mathworks.com/matlabcentral/fileexchange/
5652
+ // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/
5653
+ // content/SpinCalc.m
5654
+
5655
+ var cos = Math.cos;
5656
+ var sin = Math.sin;
5657
+
5658
+ var c1 = cos(x / 2);
5659
+ var c2 = cos(y / 2);
5660
+ var c3 = cos(z / 2);
5661
+
5662
+ var s1 = sin(x / 2);
5663
+ var s2 = sin(y / 2);
5664
+ var s3 = sin(z / 2);
5665
+
5666
+ if (order === 'XYZ') {
5667
+
5668
+ this._x = s1 * c2 * c3 + c1 * s2 * s3;
5669
+ this._y = c1 * s2 * c3 - s1 * c2 * s3;
5670
+ this._z = c1 * c2 * s3 + s1 * s2 * c3;
5671
+ this._w = c1 * c2 * c3 - s1 * s2 * s3;
5672
+
5673
+ } else if (order === 'YXZ') {
5674
+
5675
+ this._x = s1 * c2 * c3 + c1 * s2 * s3;
5676
+ this._y = c1 * s2 * c3 - s1 * c2 * s3;
5677
+ this._z = c1 * c2 * s3 - s1 * s2 * c3;
5678
+ this._w = c1 * c2 * c3 + s1 * s2 * s3;
5679
+
5680
+ } else if (order === 'ZXY') {
5681
+
5682
+ this._x = s1 * c2 * c3 - c1 * s2 * s3;
5683
+ this._y = c1 * s2 * c3 + s1 * c2 * s3;
5684
+ this._z = c1 * c2 * s3 + s1 * s2 * c3;
5685
+ this._w = c1 * c2 * c3 - s1 * s2 * s3;
5686
+
5687
+ } else if (order === 'ZYX') {
5688
+
5689
+ this._x = s1 * c2 * c3 - c1 * s2 * s3;
5690
+ this._y = c1 * s2 * c3 + s1 * c2 * s3;
5691
+ this._z = c1 * c2 * s3 - s1 * s2 * c3;
5692
+ this._w = c1 * c2 * c3 + s1 * s2 * s3;
5693
+
5694
+ } else if (order === 'YZX') {
5695
+
5696
+ this._x = s1 * c2 * c3 + c1 * s2 * s3;
5697
+ this._y = c1 * s2 * c3 + s1 * c2 * s3;
5698
+ this._z = c1 * c2 * s3 - s1 * s2 * c3;
5699
+ this._w = c1 * c2 * c3 - s1 * s2 * s3;
5700
+
5701
+ } else if (order === 'XZY') {
5702
+
5703
+ this._x = s1 * c2 * c3 - c1 * s2 * s3;
5704
+ this._y = c1 * s2 * c3 - s1 * c2 * s3;
5705
+ this._z = c1 * c2 * s3 + s1 * s2 * c3;
5706
+ this._w = c1 * c2 * c3 + s1 * s2 * s3;
5707
+
5708
+ }
5709
+
5710
+ if (update !== false) this.onChangeCallback();
5711
+
5712
+ return this;
5713
+
5714
+ },
5715
+
5716
+ setFromAxisAngle: function (axis, angle) {
5717
+
5718
+ // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm
5719
+
5720
+ // assumes axis is normalized
5721
+
5722
+ var halfAngle = angle / 2, s = Math.sin(halfAngle);
5723
+
5724
+ this._x = axis.x * s;
5725
+ this._y = axis.y * s;
5726
+ this._z = axis.z * s;
5727
+ this._w = Math.cos(halfAngle);
5728
+
5729
+ this.onChangeCallback();
5730
+
5731
+ return this;
5732
+
5733
+ },
5734
+
5735
+ setFromRotationMatrix: function (m) {
5736
+
5737
+ // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
5738
+
5739
+ // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
5740
+
5741
+ var te = m.elements,
5742
+
5743
+ m11 = te[0], m12 = te[4], m13 = te[8],
5744
+ m21 = te[1], m22 = te[5], m23 = te[9],
5745
+ m31 = te[2], m32 = te[6], m33 = te[10],
5746
+
5747
+ trace = m11 + m22 + m33,
5748
+ s;
5749
+
5750
+ if (trace > 0) {
5751
+
5752
+ s = 0.5 / Math.sqrt(trace + 1.0);
5753
+
5754
+ this._w = 0.25 / s;
5755
+ this._x = (m32 - m23) * s;
5756
+ this._y = (m13 - m31) * s;
5757
+ this._z = (m21 - m12) * s;
5758
+
5759
+ } else if (m11 > m22 && m11 > m33) {
5760
+
5761
+ s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);
5762
+
5763
+ this._w = (m32 - m23) / s;
5764
+ this._x = 0.25 * s;
5765
+ this._y = (m12 + m21) / s;
5766
+ this._z = (m13 + m31) / s;
5767
+
5768
+ } else if (m22 > m33) {
5769
+
5770
+ s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);
5771
+
5772
+ this._w = (m13 - m31) / s;
5773
+ this._x = (m12 + m21) / s;
5774
+ this._y = 0.25 * s;
5775
+ this._z = (m23 + m32) / s;
5776
+
5777
+ } else {
5778
+
5779
+ s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);
5780
+
5781
+ this._w = (m21 - m12) / s;
5782
+ this._x = (m13 + m31) / s;
5783
+ this._y = (m23 + m32) / s;
5784
+ this._z = 0.25 * s;
5785
+
5786
+ }
5787
+
5788
+ this.onChangeCallback();
5789
+
5790
+ return this;
5791
+
5792
+ },
5793
+
5794
+ setFromUnitVectors: function () {
5795
+
5796
+ // assumes direction vectors vFrom and vTo are normalized
5797
+
5798
+ var v1 = new Vector3();
5799
+ var r;
5800
+
5801
+ var EPS = 0.000001;
5802
+
5803
+ return function setFromUnitVectors(vFrom, vTo) {
5804
+
5805
+ if (v1 === undefined) v1 = new Vector3();
5806
+
5807
+ r = vFrom.dot(vTo) + 1;
5808
+
5809
+ if (r < EPS) {
5810
+
5811
+ r = 0;
5812
+
5813
+ if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {
5814
+
5815
+ v1.set(- vFrom.y, vFrom.x, 0);
5816
+
5817
+ } else {
5818
+
5819
+ v1.set(0, - vFrom.z, vFrom.y);
5820
+
5821
+ }
5822
+
5823
+ } else {
5824
+
5825
+ v1.crossVectors(vFrom, vTo);
5826
+
5827
+ }
5828
+
5829
+ this._x = v1.x;
5830
+ this._y = v1.y;
5831
+ this._z = v1.z;
5832
+ this._w = r;
5833
+
5834
+ return this.normalize();
5835
+
5836
+ };
5837
+
5838
+ }(),
5839
+
5840
+ inverse: function () {
5841
+
5842
+ // quaternion is assumed to have unit length
5843
+
5844
+ return this.conjugate();
5845
+
5846
+ },
5847
+
5848
+ conjugate: function () {
5849
+
5850
+ this._x *= - 1;
5851
+ this._y *= - 1;
5852
+ this._z *= - 1;
5853
+
5854
+ this.onChangeCallback();
5855
+
5856
+ return this;
5857
+
5858
+ },
5859
+
5860
+ dot: function (v) {
5861
+
5862
+ return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;
5863
+
5864
+ },
5865
+
5866
+ lengthSq: function () {
5867
+
5868
+ return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;
5869
+
5870
+ },
5871
+
5872
+ length: function () {
5873
+
5874
+ return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);
5875
+
5876
+ },
5877
+
5878
+ normalize: function () {
5879
+
5880
+ var l = this.length();
5881
+
5882
+ if (l === 0) {
5883
+
5884
+ this._x = 0;
5885
+ this._y = 0;
5886
+ this._z = 0;
5887
+ this._w = 1;
5888
+
5889
+ } else {
5890
+
5891
+ l = 1 / l;
5892
+
5893
+ this._x = this._x * l;
5894
+ this._y = this._y * l;
5895
+ this._z = this._z * l;
5896
+ this._w = this._w * l;
5897
+
5898
+ }
5899
+
5900
+ this.onChangeCallback();
5901
+
5902
+ return this;
5903
+
5904
+ },
5905
+
5906
+ multiply: function (q, p) {
5907
+
5908
+ if (p !== undefined) {
5909
+
5910
+ console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.');
5911
+ return this.multiplyQuaternions(q, p);
5912
+
5913
+ }
5914
+
5915
+ return this.multiplyQuaternions(this, q);
5916
+
5917
+ },
5918
+
5919
+ premultiply: function (q) {
5920
+
5921
+ return this.multiplyQuaternions(q, this);
5922
+
5923
+ },
5924
+
5925
+ multiplyQuaternions: function (a, b) {
5926
+
5927
+ // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm
5928
+
5929
+ var qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;
5930
+ var qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;
5931
+
5932
+ this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;
5933
+ this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;
5934
+ this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;
5935
+ this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;
5936
+
5937
+ this.onChangeCallback();
5938
+
5939
+ return this;
5940
+
5941
+ },
5942
+
5943
+ slerp: function (qb, t) {
5944
+
5945
+ if (t === 0) return this;
5946
+ if (t === 1) return this.copy(qb);
5947
+
5948
+ var x = this._x, y = this._y, z = this._z, w = this._w;
5949
+
5950
+ // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/
5951
+
5952
+ var cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;
5953
+
5954
+ if (cosHalfTheta < 0) {
5955
+
5956
+ this._w = - qb._w;
5957
+ this._x = - qb._x;
5958
+ this._y = - qb._y;
5959
+ this._z = - qb._z;
5960
+
5961
+ cosHalfTheta = - cosHalfTheta;
5962
+
5963
+ } else {
5964
+
5965
+ this.copy(qb);
5966
+
5967
+ }
5968
+
5969
+ if (cosHalfTheta >= 1.0) {
5970
+
5971
+ this._w = w;
5972
+ this._x = x;
5973
+ this._y = y;
5974
+ this._z = z;
5975
+
5976
+ return this;
5977
+
5978
+ }
5979
+
5980
+ var sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta);
5981
+
5982
+ if (Math.abs(sinHalfTheta) < 0.001) {
5983
+
5984
+ this._w = 0.5 * (w + this._w);
5985
+ this._x = 0.5 * (x + this._x);
5986
+ this._y = 0.5 * (y + this._y);
5987
+ this._z = 0.5 * (z + this._z);
5988
+
5989
+ return this;
5990
+
5991
+ }
5992
+
5993
+ var halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta);
5994
+ var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,
5995
+ ratioB = Math.sin(t * halfTheta) / sinHalfTheta;
5996
+
5997
+ this._w = (w * ratioA + this._w * ratioB);
5998
+ this._x = (x * ratioA + this._x * ratioB);
5999
+ this._y = (y * ratioA + this._y * ratioB);
6000
+ this._z = (z * ratioA + this._z * ratioB);
6001
+
6002
+ this.onChangeCallback();
6003
+
6004
+ return this;
6005
+
6006
+ },
6007
+
6008
+ equals: function (quaternion) {
6009
+
6010
+ return (quaternion._x === this._x) && (quaternion._y === this._y) && (quaternion._z === this._z) && (quaternion._w === this._w);
6011
+
6012
+ },
6013
+
6014
+ fromArray: function (array, offset) {
6015
+
6016
+ if (offset === undefined) offset = 0;
6017
+
6018
+ this._x = array[offset];
6019
+ this._y = array[offset + 1];
6020
+ this._z = array[offset + 2];
6021
+ this._w = array[offset + 3];
6022
+
6023
+ this.onChangeCallback();
6024
+
6025
+ return this;
6026
+
6027
+ },
6028
+
6029
+ toArray: function (array, offset) {
6030
+
6031
+ if (array === undefined) array = [];
6032
+ if (offset === undefined) offset = 0;
6033
+
6034
+ array[offset] = this._x;
6035
+ array[offset + 1] = this._y;
6036
+ array[offset + 2] = this._z;
6037
+ array[offset + 3] = this._w;
6038
+
6039
+ return array;
6040
+
6041
+ },
6042
+
6043
+ onChange: function (callback) {
6044
+
6045
+ this.onChangeCallback = callback;
6046
+
6047
+ return this;
6048
+
6049
+ },
6050
+
6051
+ onChangeCallback: function () { }
6052
+
6053
+ });
6054
+
6055
+ /**
6056
+ * @author mrdoob / http://mrdoob.com/
6057
+ * @author kile / http://kile.stravaganza.org/
6058
+ * @author philogb / http://blog.thejit.org/
6059
+ * @author mikael emtinger / http://gomo.se/
6060
+ * @author egraether / http://egraether.com/
6061
+ * @author WestLangley / http://github.com/WestLangley
6062
+ */
6063
+
6064
+ function Vector3(x, y, z) {
6065
+
6066
+ this.x = x || 0;
6067
+ this.y = y || 0;
6068
+ this.z = z || 0;
6069
+
6070
+ }
6071
+
6072
+ Object.assign(Vector3.prototype, {
6073
+
6074
+ isVector3: true,
6075
+
6076
+ set: function (x, y, z) {
6077
+
6078
+ this.x = x;
6079
+ this.y = y;
6080
+ this.z = z;
6081
+
6082
+ return this;
6083
+
6084
+ },
6085
+
6086
+ setScalar: function (scalar) {
6087
+
6088
+ this.x = scalar;
6089
+ this.y = scalar;
6090
+ this.z = scalar;
6091
+
6092
+ return this;
6093
+
6094
+ },
6095
+
6096
+ setX: function (x) {
6097
+
6098
+ this.x = x;
6099
+
6100
+ return this;
6101
+
6102
+ },
6103
+
6104
+ setY: function (y) {
6105
+
6106
+ this.y = y;
6107
+
6108
+ return this;
6109
+
6110
+ },
6111
+
6112
+ setZ: function (z) {
6113
+
6114
+ this.z = z;
6115
+
6116
+ return this;
6117
+
6118
+ },
6119
+
6120
+ setComponent: function (index, value) {
6121
+
6122
+ switch (index) {
6123
+
6124
+ case 0: this.x = value; break;
6125
+ case 1: this.y = value; break;
6126
+ case 2: this.z = value; break;
6127
+ default: throw new Error('index is out of range: ' + index);
6128
+
6129
+ }
6130
+
6131
+ return this;
6132
+
6133
+ },
6134
+
6135
+ getComponent: function (index) {
6136
+
6137
+ switch (index) {
6138
+
6139
+ case 0: return this.x;
6140
+ case 1: return this.y;
6141
+ case 2: return this.z;
6142
+ default: throw new Error('index is out of range: ' + index);
6143
+
6144
+ }
6145
+
6146
+ },
6147
+
6148
+ clone: function () {
6149
+
6150
+ return new this.constructor(this.x, this.y, this.z);
6151
+
6152
+ },
6153
+
6154
+ copy: function (v) {
6155
+
6156
+ this.x = v.x;
6157
+ this.y = v.y;
6158
+ this.z = v.z;
6159
+
6160
+ return this;
6161
+
6162
+ },
6163
+
6164
+ add: function (v, w) {
6165
+
6166
+ if (w !== undefined) {
6167
+
6168
+ console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');
6169
+ return this.addVectors(v, w);
6170
+
6171
+ }
6172
+
6173
+ this.x += v.x;
6174
+ this.y += v.y;
6175
+ this.z += v.z;
6176
+
6177
+ return this;
6178
+
6179
+ },
6180
+
6181
+ addScalar: function (s) {
6182
+
6183
+ this.x += s;
6184
+ this.y += s;
6185
+ this.z += s;
6186
+
6187
+ return this;
6188
+
6189
+ },
6190
+
6191
+ addVectors: function (a, b) {
6192
+
6193
+ this.x = a.x + b.x;
6194
+ this.y = a.y + b.y;
6195
+ this.z = a.z + b.z;
6196
+
6197
+ return this;
6198
+
6199
+ },
6200
+
6201
+ addScaledVector: function (v, s) {
6202
+
6203
+ this.x += v.x * s;
6204
+ this.y += v.y * s;
6205
+ this.z += v.z * s;
6206
+
6207
+ return this;
6208
+
6209
+ },
6210
+
6211
+ sub: function (v, w) {
6212
+
6213
+ if (w !== undefined) {
6214
+
6215
+ console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');
6216
+ return this.subVectors(v, w);
6217
+
6218
+ }
6219
+
6220
+ this.x -= v.x;
6221
+ this.y -= v.y;
6222
+ this.z -= v.z;
6223
+
6224
+ return this;
6225
+
6226
+ },
6227
+
6228
+ subScalar: function (s) {
6229
+
6230
+ this.x -= s;
6231
+ this.y -= s;
6232
+ this.z -= s;
6233
+
6234
+ return this;
6235
+
6236
+ },
6237
+
6238
+ subVectors: function (a, b) {
6239
+
6240
+ this.x = a.x - b.x;
6241
+ this.y = a.y - b.y;
6242
+ this.z = a.z - b.z;
6243
+
6244
+ return this;
6245
+
6246
+ },
6247
+
6248
+ multiply: function (v, w) {
6249
+
6250
+ if (w !== undefined) {
6251
+
6252
+ console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.');
6253
+ return this.multiplyVectors(v, w);
6254
+
6255
+ }
6256
+
6257
+ this.x *= v.x;
6258
+ this.y *= v.y;
6259
+ this.z *= v.z;
6260
+
6261
+ return this;
6262
+
6263
+ },
6264
+
6265
+ multiplyScalar: function (scalar) {
6266
+
6267
+ this.x *= scalar;
6268
+ this.y *= scalar;
6269
+ this.z *= scalar;
6270
+
6271
+ return this;
6272
+
6273
+ },
6274
+
6275
+ multiplyVectors: function (a, b) {
6276
+
6277
+ this.x = a.x * b.x;
6278
+ this.y = a.y * b.y;
6279
+ this.z = a.z * b.z;
6280
+
6281
+ return this;
6282
+
6283
+ },
6284
+
6285
+ applyEuler: function () {
6286
+
6287
+ var quaternion = new Quaternion();
6288
+
6289
+ return function applyEuler(euler) {
6290
+
6291
+ if (!(euler && euler.isEuler)) {
6292
+
6293
+ console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.');
6294
+
6295
+ }
6296
+
6297
+ return this.applyQuaternion(quaternion.setFromEuler(euler));
6298
+
6299
+ };
6300
+
6301
+ }(),
6302
+
6303
+ applyAxisAngle: function () {
6304
+
6305
+ var quaternion = new Quaternion();
6306
+
6307
+ return function applyAxisAngle(axis, angle) {
6308
+
6309
+ return this.applyQuaternion(quaternion.setFromAxisAngle(axis, angle));
6310
+
6311
+ };
6312
+
6313
+ }(),
6314
+
6315
+ applyMatrix3: function (m) {
6316
+
6317
+ var x = this.x, y = this.y, z = this.z;
6318
+ var e = m.elements;
6319
+
6320
+ this.x = e[0] * x + e[3] * y + e[6] * z;
6321
+ this.y = e[1] * x + e[4] * y + e[7] * z;
6322
+ this.z = e[2] * x + e[5] * y + e[8] * z;
6323
+
6324
+ return this;
6325
+
6326
+ },
6327
+
6328
+ applyMatrix4: function (m) {
6329
+
6330
+ var x = this.x, y = this.y, z = this.z;
6331
+ var e = m.elements;
6332
+
6333
+ var w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);
6334
+
6335
+ this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;
6336
+ this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;
6337
+ this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;
6338
+
6339
+ return this;
6340
+
6341
+ },
6342
+
6343
+ applyQuaternion: function (q) {
6344
+
6345
+ var x = this.x, y = this.y, z = this.z;
6346
+ var qx = q.x, qy = q.y, qz = q.z, qw = q.w;
6347
+
6348
+ // calculate quat * vector
6349
+
6350
+ var ix = qw * x + qy * z - qz * y;
6351
+ var iy = qw * y + qz * x - qx * z;
6352
+ var iz = qw * z + qx * y - qy * x;
6353
+ var iw = - qx * x - qy * y - qz * z;
6354
+
6355
+ // calculate result * inverse quat
6356
+
6357
+ this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;
6358
+ this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;
6359
+ this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;
6360
+
6361
+ return this;
6362
+
6363
+ },
6364
+
6365
+ project: function () {
6366
+
6367
+ var matrix = new Matrix4();
6368
+
6369
+ return function project(camera) {
6370
+
6371
+ matrix.multiplyMatrices(camera.projectionMatrix, matrix.getInverse(camera.matrixWorld));
6372
+ return this.applyMatrix4(matrix);
6373
+
6374
+ };
6375
+
6376
+ }(),
6377
+
6378
+ unproject: function () {
6379
+
6380
+ var matrix = new Matrix4();
6381
+
6382
+ return function unproject(camera) {
6383
+
6384
+ matrix.multiplyMatrices(camera.matrixWorld, matrix.getInverse(camera.projectionMatrix));
6385
+ return this.applyMatrix4(matrix);
6386
+
6387
+ };
6388
+
6389
+ }(),
6390
+
6391
+ transformDirection: function (m) {
6392
+
6393
+ // input: THREE.Matrix4 affine matrix
6394
+ // vector interpreted as a direction
6395
+
6396
+ var x = this.x, y = this.y, z = this.z;
6397
+ var e = m.elements;
6398
+
6399
+ this.x = e[0] * x + e[4] * y + e[8] * z;
6400
+ this.y = e[1] * x + e[5] * y + e[9] * z;
6401
+ this.z = e[2] * x + e[6] * y + e[10] * z;
6402
+
6403
+ return this.normalize();
6404
+
6405
+ },
6406
+
6407
+ divide: function (v) {
6408
+
6409
+ this.x /= v.x;
6410
+ this.y /= v.y;
6411
+ this.z /= v.z;
6412
+
6413
+ return this;
6414
+
6415
+ },
6416
+
6417
+ divideScalar: function (scalar) {
6418
+
6419
+ return this.multiplyScalar(1 / scalar);
6420
+
6421
+ },
6422
+
6423
+ min: function (v) {
6424
+
6425
+ this.x = Math.min(this.x, v.x);
6426
+ this.y = Math.min(this.y, v.y);
6427
+ this.z = Math.min(this.z, v.z);
6428
+
6429
+ return this;
6430
+
6431
+ },
6432
+
6433
+ max: function (v) {
6434
+
6435
+ this.x = Math.max(this.x, v.x);
6436
+ this.y = Math.max(this.y, v.y);
6437
+ this.z = Math.max(this.z, v.z);
6438
+
6439
+ return this;
6440
+
6441
+ },
6442
+
6443
+ clamp: function (min, max) {
6444
+
6445
+ // assumes min < max, componentwise
6446
+
6447
+ this.x = Math.max(min.x, Math.min(max.x, this.x));
6448
+ this.y = Math.max(min.y, Math.min(max.y, this.y));
6449
+ this.z = Math.max(min.z, Math.min(max.z, this.z));
6450
+
6451
+ return this;
6452
+
6453
+ },
6454
+
6455
+ clampScalar: function () {
6456
+
6457
+ var min = new Vector3();
6458
+ var max = new Vector3();
6459
+
6460
+ return function clampScalar(minVal, maxVal) {
6461
+
6462
+ min.set(minVal, minVal, minVal);
6463
+ max.set(maxVal, maxVal, maxVal);
6464
+
6465
+ return this.clamp(min, max);
6466
+
6467
+ };
6468
+
6469
+ }(),
6470
+
6471
+ clampLength: function (min, max) {
6472
+
6473
+ var length = this.length();
6474
+
6475
+ return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));
6476
+
6477
+ },
6478
+
6479
+ floor: function () {
6480
+
6481
+ this.x = Math.floor(this.x);
6482
+ this.y = Math.floor(this.y);
6483
+ this.z = Math.floor(this.z);
6484
+
6485
+ return this;
6486
+
6487
+ },
6488
+
6489
+ ceil: function () {
6490
+
6491
+ this.x = Math.ceil(this.x);
6492
+ this.y = Math.ceil(this.y);
6493
+ this.z = Math.ceil(this.z);
6494
+
6495
+ return this;
6496
+
6497
+ },
6498
+
6499
+ round: function () {
6500
+
6501
+ this.x = Math.round(this.x);
6502
+ this.y = Math.round(this.y);
6503
+ this.z = Math.round(this.z);
6504
+
6505
+ return this;
6506
+
6507
+ },
6508
+
6509
+ roundToZero: function () {
6510
+
6511
+ this.x = (this.x < 0) ? Math.ceil(this.x) : Math.floor(this.x);
6512
+ this.y = (this.y < 0) ? Math.ceil(this.y) : Math.floor(this.y);
6513
+ this.z = (this.z < 0) ? Math.ceil(this.z) : Math.floor(this.z);
6514
+
6515
+ return this;
6516
+
6517
+ },
6518
+
6519
+ negate: function () {
6520
+
6521
+ this.x = - this.x;
6522
+ this.y = - this.y;
6523
+ this.z = - this.z;
6524
+
6525
+ return this;
6526
+
6527
+ },
6528
+
6529
+ dot: function (v) {
6530
+
6531
+ return this.x * v.x + this.y * v.y + this.z * v.z;
6532
+
6533
+ },
6534
+
6535
+ // TODO lengthSquared?
6536
+
6537
+ lengthSq: function () {
6538
+
6539
+ return this.x * this.x + this.y * this.y + this.z * this.z;
6540
+
6541
+ },
6542
+
6543
+ length: function () {
6544
+
6545
+ return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
6546
+
6547
+ },
6548
+
6549
+ manhattanLength: function () {
6550
+
6551
+ return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);
6552
+
6553
+ },
6554
+
6555
+ normalize: function () {
6556
+
6557
+ return this.divideScalar(this.length() || 1);
6558
+
6559
+ },
6560
+
6561
+ setLength: function (length) {
6562
+
6563
+ return this.normalize().multiplyScalar(length);
6564
+
6565
+ },
6566
+
6567
+ lerp: function (v, alpha) {
6568
+
6569
+ this.x += (v.x - this.x) * alpha;
6570
+ this.y += (v.y - this.y) * alpha;
6571
+ this.z += (v.z - this.z) * alpha;
6572
+
6573
+ return this;
6574
+
6575
+ },
6576
+
6577
+ lerpVectors: function (v1, v2, alpha) {
6578
+
6579
+ return this.subVectors(v2, v1).multiplyScalar(alpha).add(v1);
6580
+
6581
+ },
6582
+
6583
+ cross: function (v, w) {
6584
+
6585
+ if (w !== undefined) {
6586
+
6587
+ console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.');
6588
+ return this.crossVectors(v, w);
6589
+
6590
+ }
6591
+
6592
+ return this.crossVectors(this, v);
6593
+
6594
+ },
6595
+
6596
+ crossVectors: function (a, b) {
6597
+
6598
+ var ax = a.x, ay = a.y, az = a.z;
6599
+ var bx = b.x, by = b.y, bz = b.z;
6600
+
6601
+ this.x = ay * bz - az * by;
6602
+ this.y = az * bx - ax * bz;
6603
+ this.z = ax * by - ay * bx;
6604
+
6605
+ return this;
6606
+
6607
+ },
6608
+
6609
+ projectOnVector: function (vector) {
6610
+
6611
+ var scalar = vector.dot(this) / vector.lengthSq();
6612
+
6613
+ return this.copy(vector).multiplyScalar(scalar);
6614
+
6615
+ },
6616
+
6617
+ projectOnPlane: function () {
6618
+
6619
+ var v1 = new Vector3();
6620
+
6621
+ return function projectOnPlane(planeNormal) {
6622
+
6623
+ v1.copy(this).projectOnVector(planeNormal);
6624
+
6625
+ return this.sub(v1);
6626
+
6627
+ };
6628
+
6629
+ }(),
6630
+
6631
+ reflect: function () {
6632
+
6633
+ // reflect incident vector off plane orthogonal to normal
6634
+ // normal is assumed to have unit length
6635
+
6636
+ var v1 = new Vector3();
6637
+
6638
+ return function reflect(normal) {
6639
+
6640
+ return this.sub(v1.copy(normal).multiplyScalar(2 * this.dot(normal)));
6641
+
6642
+ };
6643
+
6644
+ }(),
6645
+
6646
+ angleTo: function (v) {
6647
+
6648
+ var theta = this.dot(v) / (Math.sqrt(this.lengthSq() * v.lengthSq()));
6649
+
6650
+ // clamp, to handle numerical problems
6651
+
6652
+ return Math.acos(_Math.clamp(theta, - 1, 1));
6653
+
6654
+ },
6655
+
6656
+ distanceTo: function (v) {
6657
+
6658
+ return Math.sqrt(this.distanceToSquared(v));
6659
+
6660
+ },
6661
+
6662
+ distanceToSquared: function (v) {
6663
+
6664
+ var dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;
6665
+
6666
+ return dx * dx + dy * dy + dz * dz;
6667
+
6668
+ },
6669
+
6670
+ manhattanDistanceTo: function (v) {
6671
+
6672
+ return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z);
6673
+
6674
+ },
6675
+
6676
+ setFromSpherical: function (s) {
6677
+
6678
+ var sinPhiRadius = Math.sin(s.phi) * s.radius;
6679
+
6680
+ this.x = sinPhiRadius * Math.sin(s.theta);
6681
+ this.y = Math.cos(s.phi) * s.radius;
6682
+ this.z = sinPhiRadius * Math.cos(s.theta);
6683
+
6684
+ return this;
6685
+
6686
+ },
6687
+
6688
+ setFromCylindrical: function (c) {
6689
+
6690
+ this.x = c.radius * Math.sin(c.theta);
6691
+ this.y = c.y;
6692
+ this.z = c.radius * Math.cos(c.theta);
6693
+
6694
+ return this;
6695
+
6696
+ },
6697
+
6698
+ setFromMatrixPosition: function (m) {
6699
+
6700
+ var e = m.elements;
6701
+
6702
+ this.x = e[12];
6703
+ this.y = e[13];
6704
+ this.z = e[14];
6705
+
6706
+ return this;
6707
+
6708
+ },
6709
+
6710
+ setFromMatrixScale: function (m) {
6711
+
6712
+ var sx = this.setFromMatrixColumn(m, 0).length();
6713
+ var sy = this.setFromMatrixColumn(m, 1).length();
6714
+ var sz = this.setFromMatrixColumn(m, 2).length();
6715
+
6716
+ this.x = sx;
6717
+ this.y = sy;
6718
+ this.z = sz;
6719
+
6720
+ return this;
6721
+
6722
+ },
6723
+
6724
+ setFromMatrixColumn: function (m, index) {
6725
+
6726
+ return this.fromArray(m.elements, index * 4);
6727
+
6728
+ },
6729
+
6730
+ equals: function (v) {
6731
+
6732
+ return ((v.x === this.x) && (v.y === this.y) && (v.z === this.z));
6733
+
6734
+ },
6735
+
6736
+ fromArray: function (array, offset) {
6737
+
6738
+ if (offset === undefined) offset = 0;
6739
+
6740
+ this.x = array[offset];
6741
+ this.y = array[offset + 1];
6742
+ this.z = array[offset + 2];
6743
+
6744
+ return this;
6745
+
6746
+ },
6747
+
6748
+ toArray: function (array, offset) {
6749
+
6750
+ if (array === undefined) array = [];
6751
+ if (offset === undefined) offset = 0;
6752
+
6753
+ array[offset] = this.x;
6754
+ array[offset + 1] = this.y;
6755
+ array[offset + 2] = this.z;
6756
+
6757
+ return array;
6758
+
6759
+ },
6760
+
6761
+ fromBufferAttribute: function (attribute, index, offset) {
6762
+
6763
+ if (offset !== undefined) {
6764
+
6765
+ console.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().');
6766
+
6767
+ }
6768
+
6769
+ this.x = attribute.getX(index);
6770
+ this.y = attribute.getY(index);
6771
+ this.z = attribute.getZ(index);
6772
+
6773
+ return this;
6774
+
6775
+ }
6776
+
6777
+ });
6778
+
6779
+ /**
6780
+ * @author alteredq / http://alteredqualia.com/
6781
+ * @author WestLangley / http://github.com/WestLangley
6782
+ * @author bhouston / http://clara.io
6783
+ * @author tschw
6784
+ */
6785
+
6786
+ function Matrix3() {
6787
+
6788
+ this.elements = [
6789
+
6790
+ 1, 0, 0,
6791
+ 0, 1, 0,
6792
+ 0, 0, 1
6793
+
6794
+ ];
6795
+
6796
+ if (arguments.length > 0) {
6797
+
6798
+ console.error('THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.');
6799
+
6800
+ }
6801
+
6802
+ }
6803
+
6804
+ Object.assign(Matrix3.prototype, {
6805
+
6806
+ isMatrix3: true,
6807
+
6808
+ set: function (n11, n12, n13, n21, n22, n23, n31, n32, n33) {
6809
+
6810
+ var te = this.elements;
6811
+
6812
+ te[0] = n11; te[1] = n21; te[2] = n31;
6813
+ te[3] = n12; te[4] = n22; te[5] = n32;
6814
+ te[6] = n13; te[7] = n23; te[8] = n33;
6815
+
6816
+ return this;
6817
+
6818
+ },
6819
+
6820
+ identity: function () {
6821
+
6822
+ this.set(
6823
+
6824
+ 1, 0, 0,
6825
+ 0, 1, 0,
6826
+ 0, 0, 1
6827
+
6828
+ );
6829
+
6830
+ return this;
6831
+
6832
+ },
6833
+
6834
+ clone: function () {
6835
+
6836
+ return new this.constructor().fromArray(this.elements);
6837
+
6838
+ },
6839
+
6840
+ copy: function (m) {
6841
+
6842
+ var te = this.elements;
6843
+ var me = m.elements;
6844
+
6845
+ te[0] = me[0]; te[1] = me[1]; te[2] = me[2];
6846
+ te[3] = me[3]; te[4] = me[4]; te[5] = me[5];
6847
+ te[6] = me[6]; te[7] = me[7]; te[8] = me[8];
6848
+
6849
+ return this;
6850
+
6851
+ },
6852
+
6853
+ setFromMatrix4: function (m) {
6854
+
6855
+ var me = m.elements;
6856
+
6857
+ this.set(
6858
+
6859
+ me[0], me[4], me[8],
6860
+ me[1], me[5], me[9],
6861
+ me[2], me[6], me[10]
6862
+
6863
+ );
6864
+
6865
+ return this;
6866
+
6867
+ },
6868
+
6869
+ applyToBufferAttribute: function () {
6870
+
6871
+ var v1 = new Vector3();
6872
+
6873
+ return function applyToBufferAttribute(attribute) {
6874
+
6875
+ for (var i = 0, l = attribute.count; i < l; i++) {
6876
+
6877
+ v1.x = attribute.getX(i);
6878
+ v1.y = attribute.getY(i);
6879
+ v1.z = attribute.getZ(i);
6880
+
6881
+ v1.applyMatrix3(this);
6882
+
6883
+ attribute.setXYZ(i, v1.x, v1.y, v1.z);
6884
+
6885
+ }
6886
+
6887
+ return attribute;
6888
+
6889
+ };
6890
+
6891
+ }(),
6892
+
6893
+ multiply: function (m) {
6894
+
6895
+ return this.multiplyMatrices(this, m);
6896
+
6897
+ },
6898
+
6899
+ premultiply: function (m) {
6900
+
6901
+ return this.multiplyMatrices(m, this);
6902
+
6903
+ },
6904
+
6905
+ multiplyMatrices: function (a, b) {
6906
+
6907
+ var ae = a.elements;
6908
+ var be = b.elements;
6909
+ var te = this.elements;
6910
+
6911
+ var a11 = ae[0], a12 = ae[3], a13 = ae[6];
6912
+ var a21 = ae[1], a22 = ae[4], a23 = ae[7];
6913
+ var a31 = ae[2], a32 = ae[5], a33 = ae[8];
6914
+
6915
+ var b11 = be[0], b12 = be[3], b13 = be[6];
6916
+ var b21 = be[1], b22 = be[4], b23 = be[7];
6917
+ var b31 = be[2], b32 = be[5], b33 = be[8];
6918
+
6919
+ te[0] = a11 * b11 + a12 * b21 + a13 * b31;
6920
+ te[3] = a11 * b12 + a12 * b22 + a13 * b32;
6921
+ te[6] = a11 * b13 + a12 * b23 + a13 * b33;
6922
+
6923
+ te[1] = a21 * b11 + a22 * b21 + a23 * b31;
6924
+ te[4] = a21 * b12 + a22 * b22 + a23 * b32;
6925
+ te[7] = a21 * b13 + a22 * b23 + a23 * b33;
6926
+
6927
+ te[2] = a31 * b11 + a32 * b21 + a33 * b31;
6928
+ te[5] = a31 * b12 + a32 * b22 + a33 * b32;
6929
+ te[8] = a31 * b13 + a32 * b23 + a33 * b33;
6930
+
6931
+ return this;
6932
+
6933
+ },
6934
+
6935
+ multiplyScalar: function (s) {
6936
+
6937
+ var te = this.elements;
6938
+
6939
+ te[0] *= s; te[3] *= s; te[6] *= s;
6940
+ te[1] *= s; te[4] *= s; te[7] *= s;
6941
+ te[2] *= s; te[5] *= s; te[8] *= s;
6942
+
6943
+ return this;
6944
+
6945
+ },
6946
+
6947
+ determinant: function () {
6948
+
6949
+ var te = this.elements;
6950
+
6951
+ var a = te[0], b = te[1], c = te[2],
6952
+ d = te[3], e = te[4], f = te[5],
6953
+ g = te[6], h = te[7], i = te[8];
6954
+
6955
+ return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;
6956
+
6957
+ },
6958
+
6959
+ getInverse: function (matrix, throwOnDegenerate) {
6960
+
6961
+ if (matrix && matrix.isMatrix4) {
6962
+
6963
+ console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");
6964
+
6965
+ }
6966
+
6967
+ var me = matrix.elements,
6968
+ te = this.elements,
6969
+
6970
+ n11 = me[0], n21 = me[1], n31 = me[2],
6971
+ n12 = me[3], n22 = me[4], n32 = me[5],
6972
+ n13 = me[6], n23 = me[7], n33 = me[8],
6973
+
6974
+ t11 = n33 * n22 - n32 * n23,
6975
+ t12 = n32 * n13 - n33 * n12,
6976
+ t13 = n23 * n12 - n22 * n13,
6977
+
6978
+ det = n11 * t11 + n21 * t12 + n31 * t13;
6979
+
6980
+ if (det === 0) {
6981
+
6982
+ var msg = "THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";
6983
+
6984
+ if (throwOnDegenerate === true) {
6985
+
6986
+ throw new Error(msg);
6987
+
6988
+ } else {
6989
+
6990
+ console.warn(msg);
6991
+
6992
+ }
6993
+
6994
+ return this.identity();
6995
+
6996
+ }
6997
+
6998
+ var detInv = 1 / det;
6999
+
7000
+ te[0] = t11 * detInv;
7001
+ te[1] = (n31 * n23 - n33 * n21) * detInv;
7002
+ te[2] = (n32 * n21 - n31 * n22) * detInv;
7003
+
7004
+ te[3] = t12 * detInv;
7005
+ te[4] = (n33 * n11 - n31 * n13) * detInv;
7006
+ te[5] = (n31 * n12 - n32 * n11) * detInv;
7007
+
7008
+ te[6] = t13 * detInv;
7009
+ te[7] = (n21 * n13 - n23 * n11) * detInv;
7010
+ te[8] = (n22 * n11 - n21 * n12) * detInv;
7011
+
7012
+ return this;
7013
+
7014
+ },
7015
+
7016
+ transpose: function () {
7017
+
7018
+ var tmp, m = this.elements;
7019
+
7020
+ tmp = m[1]; m[1] = m[3]; m[3] = tmp;
7021
+ tmp = m[2]; m[2] = m[6]; m[6] = tmp;
7022
+ tmp = m[5]; m[5] = m[7]; m[7] = tmp;
7023
+
7024
+ return this;
7025
+
7026
+ },
7027
+
7028
+ getNormalMatrix: function (matrix4) {
7029
+
7030
+ return this.setFromMatrix4(matrix4).getInverse(this).transpose();
7031
+
7032
+ },
7033
+
7034
+ transposeIntoArray: function (r) {
7035
+
7036
+ var m = this.elements;
7037
+
7038
+ r[0] = m[0];
7039
+ r[1] = m[3];
7040
+ r[2] = m[6];
7041
+ r[3] = m[1];
7042
+ r[4] = m[4];
7043
+ r[5] = m[7];
7044
+ r[6] = m[2];
7045
+ r[7] = m[5];
7046
+ r[8] = m[8];
7047
+
7048
+ return this;
7049
+
7050
+ },
7051
+
7052
+ setUvTransform: function (tx, ty, sx, sy, rotation, cx, cy) {
7053
+
7054
+ var c = Math.cos(rotation);
7055
+ var s = Math.sin(rotation);
7056
+
7057
+ this.set(
7058
+ sx * c, sx * s, - sx * (c * cx + s * cy) + cx + tx,
7059
+ - sy * s, sy * c, - sy * (- s * cx + c * cy) + cy + ty,
7060
+ 0, 0, 1
7061
+ );
7062
+
7063
+ },
7064
+
7065
+ scale: function (sx, sy) {
7066
+
7067
+ var te = this.elements;
7068
+
7069
+ te[0] *= sx; te[3] *= sx; te[6] *= sx;
7070
+ te[1] *= sy; te[4] *= sy; te[7] *= sy;
7071
+
7072
+ return this;
7073
+
7074
+ },
7075
+
7076
+ rotate: function (theta) {
7077
+
7078
+ var c = Math.cos(theta);
7079
+ var s = Math.sin(theta);
7080
+
7081
+ var te = this.elements;
7082
+
7083
+ var a11 = te[0], a12 = te[3], a13 = te[6];
7084
+ var a21 = te[1], a22 = te[4], a23 = te[7];
7085
+
7086
+ te[0] = c * a11 + s * a21;
7087
+ te[3] = c * a12 + s * a22;
7088
+ te[6] = c * a13 + s * a23;
7089
+
7090
+ te[1] = - s * a11 + c * a21;
7091
+ te[4] = - s * a12 + c * a22;
7092
+ te[7] = - s * a13 + c * a23;
7093
+
7094
+ return this;
7095
+
7096
+ },
7097
+
7098
+ translate: function (tx, ty) {
7099
+
7100
+ var te = this.elements;
7101
+
7102
+ te[0] += tx * te[2]; te[3] += tx * te[5]; te[6] += tx * te[8];
7103
+ te[1] += ty * te[2]; te[4] += ty * te[5]; te[7] += ty * te[8];
7104
+
7105
+ return this;
7106
+
7107
+ },
7108
+
7109
+ equals: function (matrix) {
7110
+
7111
+ var te = this.elements;
7112
+ var me = matrix.elements;
7113
+
7114
+ for (var i = 0; i < 9; i++) {
7115
+
7116
+ if (te[i] !== me[i]) return false;
7117
+
7118
+ }
7119
+
7120
+ return true;
7121
+
7122
+ },
7123
+
7124
+ fromArray: function (array, offset) {
7125
+
7126
+ if (offset === undefined) offset = 0;
7127
+
7128
+ for (var i = 0; i < 9; i++) {
7129
+
7130
+ this.elements[i] = array[i + offset];
7131
+
7132
+ }
7133
+
7134
+ return this;
7135
+
7136
+ },
7137
+
7138
+ toArray: function (array, offset) {
7139
+
7140
+ if (array === undefined) array = [];
7141
+ if (offset === undefined) offset = 0;
7142
+
7143
+ var te = this.elements;
7144
+
7145
+ array[offset] = te[0];
7146
+ array[offset + 1] = te[1];
7147
+ array[offset + 2] = te[2];
7148
+
7149
+ array[offset + 3] = te[3];
7150
+ array[offset + 4] = te[4];
7151
+ array[offset + 5] = te[5];
7152
+
7153
+ array[offset + 6] = te[6];
7154
+ array[offset + 7] = te[7];
7155
+ array[offset + 8] = te[8];
7156
+
7157
+ return array;
7158
+
7159
+ }
7160
+
7161
+ });
7162
+
7163
+ /**
7164
+ * @author mrdoob / http://mrdoob.com/
7165
+ * @author alteredq / http://alteredqualia.com/
7166
+ * @author szimek / https://github.com/szimek/
7167
+ */
7168
+
7169
+ var textureId = 0;
7170
+
7171
+ function Texture(image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) {
7172
+
7173
+ Object.defineProperty(this, 'id', { value: textureId++ });
7174
+
7175
+ this.uuid = _Math.generateUUID();
7176
+
7177
+ this.name = '';
7178
+
7179
+ this.image = image !== undefined ? image : Texture.DEFAULT_IMAGE;
7180
+ this.mipmaps = [];
7181
+
7182
+ this.mapping = mapping !== undefined ? mapping : Texture.DEFAULT_MAPPING;
7183
+
7184
+ this.wrapS = wrapS !== undefined ? wrapS : ClampToEdgeWrapping;
7185
+ this.wrapT = wrapT !== undefined ? wrapT : ClampToEdgeWrapping;
7186
+
7187
+ this.magFilter = magFilter !== undefined ? magFilter : LinearFilter;
7188
+ this.minFilter = minFilter !== undefined ? minFilter : LinearMipMapLinearFilter;
7189
+
7190
+ this.anisotropy = anisotropy !== undefined ? anisotropy : 1;
7191
+
7192
+ this.format = format !== undefined ? format : RGBAFormat;
7193
+ this.type = type !== undefined ? type : UnsignedByteType;
7194
+
7195
+ this.offset = new Vector2(0, 0);
7196
+ this.repeat = new Vector2(1, 1);
7197
+ this.center = new Vector2(0, 0);
7198
+ this.rotation = 0;
7199
+
7200
+ this.matrixAutoUpdate = true;
7201
+ this.matrix = new Matrix3();
7202
+
7203
+ this.generateMipmaps = true;
7204
+ this.premultiplyAlpha = false;
7205
+ this.flipY = true;
7206
+ this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)
7207
+
7208
+ // Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap.
7209
+ //
7210
+ // Also changing the encoding after already used by a Material will not automatically make the Material
7211
+ // update. You need to explicitly call Material.needsUpdate to trigger it to recompile.
7212
+ this.encoding = encoding !== undefined ? encoding : LinearEncoding;
7213
+
7214
+ this.version = 0;
7215
+ this.onUpdate = null;
7216
+
7217
+ }
7218
+
7219
+ Texture.DEFAULT_IMAGE = undefined;
7220
+ Texture.DEFAULT_MAPPING = UVMapping;
7221
+
7222
+ Texture.prototype = Object.assign(Object.create(EventDispatcher.prototype), {
7223
+
7224
+ constructor: Texture,
7225
+
7226
+ isTexture: true,
7227
+
7228
+ updateMatrix: function () {
7229
+
7230
+ this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);
7231
+
7232
+ },
7233
+
7234
+ clone: function () {
7235
+
7236
+ return new this.constructor().copy(this);
7237
+
7238
+ },
7239
+
7240
+ copy: function (source) {
7241
+
7242
+ this.name = source.name;
7243
+
7244
+ this.image = source.image;
7245
+ this.mipmaps = source.mipmaps.slice(0);
7246
+
7247
+ this.mapping = source.mapping;
7248
+
7249
+ this.wrapS = source.wrapS;
7250
+ this.wrapT = source.wrapT;
7251
+
7252
+ this.magFilter = source.magFilter;
7253
+ this.minFilter = source.minFilter;
7254
+
7255
+ this.anisotropy = source.anisotropy;
7256
+
7257
+ this.format = source.format;
7258
+ this.type = source.type;
7259
+
7260
+ this.offset.copy(source.offset);
7261
+ this.repeat.copy(source.repeat);
7262
+ this.center.copy(source.center);
7263
+ this.rotation = source.rotation;
7264
+
7265
+ this.matrixAutoUpdate = source.matrixAutoUpdate;
7266
+ this.matrix.copy(source.matrix);
7267
+
7268
+ this.generateMipmaps = source.generateMipmaps;
7269
+ this.premultiplyAlpha = source.premultiplyAlpha;
7270
+ this.flipY = source.flipY;
7271
+ this.unpackAlignment = source.unpackAlignment;
7272
+ this.encoding = source.encoding;
7273
+
7274
+ return this;
7275
+
7276
+ },
7277
+
7278
+ toJSON: function (meta) {
7279
+
7280
+ var isRootObject = (meta === undefined || typeof meta === 'string');
7281
+
7282
+ if (!isRootObject && meta.textures[this.uuid] !== undefined) {
7283
+
7284
+ return meta.textures[this.uuid];
7285
+
7286
+ }
7287
+
7288
+ function getDataURL(image) {
7289
+
7290
+ var canvas;
7291
+
7292
+ if (image instanceof HTMLCanvasElement) {
7293
+
7294
+ canvas = image;
7295
+
7296
+ } else {
7297
+
7298
+ canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
7299
+ canvas.width = image.width;
7300
+ canvas.height = image.height;
7301
+
7302
+ var context = canvas.getContext('2d');
7303
+
7304
+ if (image instanceof ImageData) {
7305
+
7306
+ context.putImageData(image, 0, 0);
7307
+
7308
+ } else {
7309
+
7310
+ context.drawImage(image, 0, 0, image.width, image.height);
7311
+
7312
+ }
7313
+
7314
+ }
7315
+
7316
+ if (canvas.width > 2048 || canvas.height > 2048) {
7317
+
7318
+ return canvas.toDataURL('image/jpeg', 0.6);
7319
+
7320
+ } else {
7321
+
7322
+ return canvas.toDataURL('image/png');
7323
+
7324
+ }
7325
+
7326
+ }
7327
+
7328
+ var output = {
7329
+
7330
+ metadata: {
7331
+ version: 4.5,
7332
+ type: 'Texture',
7333
+ generator: 'Texture.toJSON'
7334
+ },
7335
+
7336
+ uuid: this.uuid,
7337
+ name: this.name,
7338
+
7339
+ mapping: this.mapping,
7340
+
7341
+ repeat: [this.repeat.x, this.repeat.y],
7342
+ offset: [this.offset.x, this.offset.y],
7343
+ center: [this.center.x, this.center.y],
7344
+ rotation: this.rotation,
7345
+
7346
+ wrap: [this.wrapS, this.wrapT],
7347
+
7348
+ format: this.format,
7349
+ minFilter: this.minFilter,
7350
+ magFilter: this.magFilter,
7351
+ anisotropy: this.anisotropy,
7352
+
7353
+ flipY: this.flipY
7354
+
7355
+ };
7356
+
7357
+ if (this.image !== undefined) {
7358
+
7359
+ // TODO: Move to THREE.Image
7360
+
7361
+ var image = this.image;
7362
+
7363
+ if (image.uuid === undefined) {
7364
+
7365
+ image.uuid = _Math.generateUUID(); // UGH
7366
+
7367
+ }
7368
+
7369
+ if (!isRootObject && meta.images[image.uuid] === undefined) {
7370
+
7371
+ meta.images[image.uuid] = {
7372
+ uuid: image.uuid,
7373
+ url: getDataURL(image)
7374
+ };
7375
+
7376
+ }
7377
+
7378
+ output.image = image.uuid;
7379
+
7380
+ }
7381
+
7382
+ if (!isRootObject) {
7383
+
7384
+ meta.textures[this.uuid] = output;
7385
+
7386
+ }
7387
+
7388
+ return output;
7389
+
7390
+ },
7391
+
7392
+ dispose: function () {
7393
+
7394
+ this.dispatchEvent({ type: 'dispose' });
7395
+
7396
+ },
7397
+
7398
+ transformUv: function (uv) {
7399
+
7400
+ if (this.mapping !== UVMapping) return;
7401
+
7402
+ uv.applyMatrix3(this.matrix);
7403
+
7404
+ if (uv.x < 0 || uv.x > 1) {
7405
+
7406
+ switch (this.wrapS) {
7407
+
7408
+ case RepeatWrapping:
7409
+
7410
+ uv.x = uv.x - Math.floor(uv.x);
7411
+ break;
7412
+
7413
+ case ClampToEdgeWrapping:
7414
+
7415
+ uv.x = uv.x < 0 ? 0 : 1;
7416
+ break;
7417
+
7418
+ case MirroredRepeatWrapping:
7419
+
7420
+ if (Math.abs(Math.floor(uv.x) % 2) === 1) {
7421
+
7422
+ uv.x = Math.ceil(uv.x) - uv.x;
7423
+
7424
+ } else {
7425
+
7426
+ uv.x = uv.x - Math.floor(uv.x);
7427
+
7428
+ }
7429
+ break;
7430
+
7431
+ }
7432
+
7433
+ }
7434
+
7435
+ if (uv.y < 0 || uv.y > 1) {
7436
+
7437
+ switch (this.wrapT) {
7438
+
7439
+ case RepeatWrapping:
7440
+
7441
+ uv.y = uv.y - Math.floor(uv.y);
7442
+ break;
7443
+
7444
+ case ClampToEdgeWrapping:
7445
+
7446
+ uv.y = uv.y < 0 ? 0 : 1;
7447
+ break;
7448
+
7449
+ case MirroredRepeatWrapping:
7450
+
7451
+ if (Math.abs(Math.floor(uv.y) % 2) === 1) {
7452
+
7453
+ uv.y = Math.ceil(uv.y) - uv.y;
7454
+
7455
+ } else {
7456
+
7457
+ uv.y = uv.y - Math.floor(uv.y);
7458
+
7459
+ }
7460
+ break;
7461
+
7462
+ }
7463
+
7464
+ }
7465
+
7466
+ if (this.flipY) {
7467
+
7468
+ uv.y = 1 - uv.y;
7469
+
7470
+ }
7471
+
7472
+ }
7473
+
7474
+ });
7475
+
7476
+ Object.defineProperty(Texture.prototype, "needsUpdate", {
7477
+
7478
+ set: function (value) {
7479
+
7480
+ if (value === true) this.version++;
7481
+
7482
+ }
7483
+
7484
+ });
7485
+
7486
+ /**
7487
+ * @author supereggbert / http://www.paulbrunt.co.uk/
7488
+ * @author philogb / http://blog.thejit.org/
7489
+ * @author mikael emtinger / http://gomo.se/
7490
+ * @author egraether / http://egraether.com/
7491
+ * @author WestLangley / http://github.com/WestLangley
7492
+ */
7493
+
7494
+ function Vector4(x, y, z, w) {
7495
+
7496
+ this.x = x || 0;
7497
+ this.y = y || 0;
7498
+ this.z = z || 0;
7499
+ this.w = (w !== undefined) ? w : 1;
7500
+
7501
+ }
7502
+
7503
+ Object.assign(Vector4.prototype, {
7504
+
7505
+ isVector4: true,
7506
+
7507
+ set: function (x, y, z, w) {
7508
+
7509
+ this.x = x;
7510
+ this.y = y;
7511
+ this.z = z;
7512
+ this.w = w;
7513
+
7514
+ return this;
7515
+
7516
+ },
7517
+
7518
+ setScalar: function (scalar) {
7519
+
7520
+ this.x = scalar;
7521
+ this.y = scalar;
7522
+ this.z = scalar;
7523
+ this.w = scalar;
7524
+
7525
+ return this;
7526
+
7527
+ },
7528
+
7529
+ setX: function (x) {
7530
+
7531
+ this.x = x;
7532
+
7533
+ return this;
7534
+
7535
+ },
7536
+
7537
+ setY: function (y) {
7538
+
7539
+ this.y = y;
7540
+
7541
+ return this;
7542
+
7543
+ },
7544
+
7545
+ setZ: function (z) {
7546
+
7547
+ this.z = z;
7548
+
7549
+ return this;
7550
+
7551
+ },
7552
+
7553
+ setW: function (w) {
7554
+
7555
+ this.w = w;
7556
+
7557
+ return this;
7558
+
7559
+ },
7560
+
7561
+ setComponent: function (index, value) {
7562
+
7563
+ switch (index) {
7564
+
7565
+ case 0: this.x = value; break;
7566
+ case 1: this.y = value; break;
7567
+ case 2: this.z = value; break;
7568
+ case 3: this.w = value; break;
7569
+ default: throw new Error('index is out of range: ' + index);
7570
+
7571
+ }
7572
+
7573
+ return this;
7574
+
7575
+ },
7576
+
7577
+ getComponent: function (index) {
7578
+
7579
+ switch (index) {
7580
+
7581
+ case 0: return this.x;
7582
+ case 1: return this.y;
7583
+ case 2: return this.z;
7584
+ case 3: return this.w;
7585
+ default: throw new Error('index is out of range: ' + index);
7586
+
7587
+ }
7588
+
7589
+ },
7590
+
7591
+ clone: function () {
7592
+
7593
+ return new this.constructor(this.x, this.y, this.z, this.w);
7594
+
7595
+ },
7596
+
7597
+ copy: function (v) {
7598
+
7599
+ this.x = v.x;
7600
+ this.y = v.y;
7601
+ this.z = v.z;
7602
+ this.w = (v.w !== undefined) ? v.w : 1;
7603
+
7604
+ return this;
7605
+
7606
+ },
7607
+
7608
+ add: function (v, w) {
7609
+
7610
+ if (w !== undefined) {
7611
+
7612
+ console.warn('THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');
7613
+ return this.addVectors(v, w);
7614
+
7615
+ }
7616
+
7617
+ this.x += v.x;
7618
+ this.y += v.y;
7619
+ this.z += v.z;
7620
+ this.w += v.w;
7621
+
7622
+ return this;
7623
+
7624
+ },
7625
+
7626
+ addScalar: function (s) {
7627
+
7628
+ this.x += s;
7629
+ this.y += s;
7630
+ this.z += s;
7631
+ this.w += s;
7632
+
7633
+ return this;
7634
+
7635
+ },
7636
+
7637
+ addVectors: function (a, b) {
7638
+
7639
+ this.x = a.x + b.x;
7640
+ this.y = a.y + b.y;
7641
+ this.z = a.z + b.z;
7642
+ this.w = a.w + b.w;
7643
+
7644
+ return this;
7645
+
7646
+ },
7647
+
7648
+ addScaledVector: function (v, s) {
7649
+
7650
+ this.x += v.x * s;
7651
+ this.y += v.y * s;
7652
+ this.z += v.z * s;
7653
+ this.w += v.w * s;
7654
+
7655
+ return this;
7656
+
7657
+ },
7658
+
7659
+ sub: function (v, w) {
7660
+
7661
+ if (w !== undefined) {
7662
+
7663
+ console.warn('THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');
7664
+ return this.subVectors(v, w);
7665
+
7666
+ }
7667
+
7668
+ this.x -= v.x;
7669
+ this.y -= v.y;
7670
+ this.z -= v.z;
7671
+ this.w -= v.w;
7672
+
7673
+ return this;
7674
+
7675
+ },
7676
+
7677
+ subScalar: function (s) {
7678
+
7679
+ this.x -= s;
7680
+ this.y -= s;
7681
+ this.z -= s;
7682
+ this.w -= s;
7683
+
7684
+ return this;
7685
+
7686
+ },
7687
+
7688
+ subVectors: function (a, b) {
7689
+
7690
+ this.x = a.x - b.x;
7691
+ this.y = a.y - b.y;
7692
+ this.z = a.z - b.z;
7693
+ this.w = a.w - b.w;
7694
+
7695
+ return this;
7696
+
7697
+ },
7698
+
7699
+ multiplyScalar: function (scalar) {
7700
+
7701
+ this.x *= scalar;
7702
+ this.y *= scalar;
7703
+ this.z *= scalar;
7704
+ this.w *= scalar;
7705
+
7706
+ return this;
7707
+
7708
+ },
7709
+
7710
+ applyMatrix4: function (m) {
7711
+
7712
+ var x = this.x, y = this.y, z = this.z, w = this.w;
7713
+ var e = m.elements;
7714
+
7715
+ this.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w;
7716
+ this.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w;
7717
+ this.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w;
7718
+ this.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w;
7719
+
7720
+ return this;
7721
+
7722
+ },
7723
+
7724
+ divideScalar: function (scalar) {
7725
+
7726
+ return this.multiplyScalar(1 / scalar);
7727
+
7728
+ },
7729
+
7730
+ setAxisAngleFromQuaternion: function (q) {
7731
+
7732
+ // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm
7733
+
7734
+ // q is assumed to be normalized
7735
+
7736
+ this.w = 2 * Math.acos(q.w);
7737
+
7738
+ var s = Math.sqrt(1 - q.w * q.w);
7739
+
7740
+ if (s < 0.0001) {
7741
+
7742
+ this.x = 1;
7743
+ this.y = 0;
7744
+ this.z = 0;
7745
+
7746
+ } else {
7747
+
7748
+ this.x = q.x / s;
7749
+ this.y = q.y / s;
7750
+ this.z = q.z / s;
7751
+
7752
+ }
7753
+
7754
+ return this;
7755
+
7756
+ },
7757
+
7758
+ setAxisAngleFromRotationMatrix: function (m) {
7759
+
7760
+ // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm
7761
+
7762
+ // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
7763
+
7764
+ var angle, x, y, z, // variables for result
7765
+ epsilon = 0.01, // margin to allow for rounding errors
7766
+ epsilon2 = 0.1, // margin to distinguish between 0 and 180 degrees
7767
+
7768
+ te = m.elements,
7769
+
7770
+ m11 = te[0], m12 = te[4], m13 = te[8],
7771
+ m21 = te[1], m22 = te[5], m23 = te[9],
7772
+ m31 = te[2], m32 = te[6], m33 = te[10];
7773
+
7774
+ if ((Math.abs(m12 - m21) < epsilon) &&
7775
+ (Math.abs(m13 - m31) < epsilon) &&
7776
+ (Math.abs(m23 - m32) < epsilon)) {
7777
+
7778
+ // singularity found
7779
+ // first check for identity matrix which must have +1 for all terms
7780
+ // in leading diagonal and zero in other terms
7781
+
7782
+ if ((Math.abs(m12 + m21) < epsilon2) &&
7783
+ (Math.abs(m13 + m31) < epsilon2) &&
7784
+ (Math.abs(m23 + m32) < epsilon2) &&
7785
+ (Math.abs(m11 + m22 + m33 - 3) < epsilon2)) {
7786
+
7787
+ // this singularity is identity matrix so angle = 0
7788
+
7789
+ this.set(1, 0, 0, 0);
7790
+
7791
+ return this; // zero angle, arbitrary axis
7792
+
7793
+ }
7794
+
7795
+ // otherwise this singularity is angle = 180
7796
+
7797
+ angle = Math.PI;
7798
+
7799
+ var xx = (m11 + 1) / 2;
7800
+ var yy = (m22 + 1) / 2;
7801
+ var zz = (m33 + 1) / 2;
7802
+ var xy = (m12 + m21) / 4;
7803
+ var xz = (m13 + m31) / 4;
7804
+ var yz = (m23 + m32) / 4;
7805
+
7806
+ if ((xx > yy) && (xx > zz)) {
7807
+
7808
+ // m11 is the largest diagonal term
7809
+
7810
+ if (xx < epsilon) {
7811
+
7812
+ x = 0;
7813
+ y = 0.707106781;
7814
+ z = 0.707106781;
7815
+
7816
+ } else {
7817
+
7818
+ x = Math.sqrt(xx);
7819
+ y = xy / x;
7820
+ z = xz / x;
7821
+
7822
+ }
7823
+
7824
+ } else if (yy > zz) {
7825
+
7826
+ // m22 is the largest diagonal term
7827
+
7828
+ if (yy < epsilon) {
7829
+
7830
+ x = 0.707106781;
7831
+ y = 0;
7832
+ z = 0.707106781;
7833
+
7834
+ } else {
7835
+
7836
+ y = Math.sqrt(yy);
7837
+ x = xy / y;
7838
+ z = yz / y;
7839
+
7840
+ }
7841
+
7842
+ } else {
7843
+
7844
+ // m33 is the largest diagonal term so base result on this
7845
+
7846
+ if (zz < epsilon) {
7847
+
7848
+ x = 0.707106781;
7849
+ y = 0.707106781;
7850
+ z = 0;
7851
+
7852
+ } else {
7853
+
7854
+ z = Math.sqrt(zz);
7855
+ x = xz / z;
7856
+ y = yz / z;
7857
+
7858
+ }
7859
+
7860
+ }
7861
+
7862
+ this.set(x, y, z, angle);
7863
+
7864
+ return this; // return 180 deg rotation
7865
+
7866
+ }
7867
+
7868
+ // as we have reached here there are no singularities so we can handle normally
7869
+
7870
+ var s = Math.sqrt((m32 - m23) * (m32 - m23) +
7871
+ (m13 - m31) * (m13 - m31) +
7872
+ (m21 - m12) * (m21 - m12)); // used to normalize
7873
+
7874
+ if (Math.abs(s) < 0.001) s = 1;
7875
+
7876
+ // prevent divide by zero, should not happen if matrix is orthogonal and should be
7877
+ // caught by singularity test above, but I've left it in just in case
7878
+
7879
+ this.x = (m32 - m23) / s;
7880
+ this.y = (m13 - m31) / s;
7881
+ this.z = (m21 - m12) / s;
7882
+ this.w = Math.acos((m11 + m22 + m33 - 1) / 2);
7883
+
7884
+ return this;
7885
+
7886
+ },
7887
+
7888
+ min: function (v) {
7889
+
7890
+ this.x = Math.min(this.x, v.x);
7891
+ this.y = Math.min(this.y, v.y);
7892
+ this.z = Math.min(this.z, v.z);
7893
+ this.w = Math.min(this.w, v.w);
7894
+
7895
+ return this;
7896
+
7897
+ },
7898
+
7899
+ max: function (v) {
7900
+
7901
+ this.x = Math.max(this.x, v.x);
7902
+ this.y = Math.max(this.y, v.y);
7903
+ this.z = Math.max(this.z, v.z);
7904
+ this.w = Math.max(this.w, v.w);
7905
+
7906
+ return this;
7907
+
7908
+ },
7909
+
7910
+ clamp: function (min, max) {
7911
+
7912
+ // assumes min < max, componentwise
7913
+
7914
+ this.x = Math.max(min.x, Math.min(max.x, this.x));
7915
+ this.y = Math.max(min.y, Math.min(max.y, this.y));
7916
+ this.z = Math.max(min.z, Math.min(max.z, this.z));
7917
+ this.w = Math.max(min.w, Math.min(max.w, this.w));
7918
+
7919
+ return this;
7920
+
7921
+ },
7922
+
7923
+ clampScalar: function () {
7924
+
7925
+ var min, max;
7926
+
7927
+ return function clampScalar(minVal, maxVal) {
7928
+
7929
+ if (min === undefined) {
7930
+
7931
+ min = new Vector4();
7932
+ max = new Vector4();
7933
+
7934
+ }
7935
+
7936
+ min.set(minVal, minVal, minVal, minVal);
7937
+ max.set(maxVal, maxVal, maxVal, maxVal);
7938
+
7939
+ return this.clamp(min, max);
7940
+
7941
+ };
7942
+
7943
+ }(),
7944
+
7945
+ clampLength: function (min, max) {
7946
+
7947
+ var length = this.length();
7948
+
7949
+ return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));
7950
+
7951
+ },
7952
+
7953
+ floor: function () {
7954
+
7955
+ this.x = Math.floor(this.x);
7956
+ this.y = Math.floor(this.y);
7957
+ this.z = Math.floor(this.z);
7958
+ this.w = Math.floor(this.w);
7959
+
7960
+ return this;
7961
+
7962
+ },
7963
+
7964
+ ceil: function () {
7965
+
7966
+ this.x = Math.ceil(this.x);
7967
+ this.y = Math.ceil(this.y);
7968
+ this.z = Math.ceil(this.z);
7969
+ this.w = Math.ceil(this.w);
7970
+
7971
+ return this;
7972
+
7973
+ },
7974
+
7975
+ round: function () {
7976
+
7977
+ this.x = Math.round(this.x);
7978
+ this.y = Math.round(this.y);
7979
+ this.z = Math.round(this.z);
7980
+ this.w = Math.round(this.w);
7981
+
7982
+ return this;
7983
+
7984
+ },
7985
+
7986
+ roundToZero: function () {
7987
+
7988
+ this.x = (this.x < 0) ? Math.ceil(this.x) : Math.floor(this.x);
7989
+ this.y = (this.y < 0) ? Math.ceil(this.y) : Math.floor(this.y);
7990
+ this.z = (this.z < 0) ? Math.ceil(this.z) : Math.floor(this.z);
7991
+ this.w = (this.w < 0) ? Math.ceil(this.w) : Math.floor(this.w);
7992
+
7993
+ return this;
7994
+
7995
+ },
7996
+
7997
+ negate: function () {
7998
+
7999
+ this.x = - this.x;
8000
+ this.y = - this.y;
8001
+ this.z = - this.z;
8002
+ this.w = - this.w;
8003
+
8004
+ return this;
8005
+
8006
+ },
8007
+
8008
+ dot: function (v) {
8009
+
8010
+ return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;
8011
+
8012
+ },
8013
+
8014
+ lengthSq: function () {
8015
+
8016
+ return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;
8017
+
8018
+ },
8019
+
8020
+ length: function () {
8021
+
8022
+ return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);
8023
+
8024
+ },
8025
+
8026
+ manhattanLength: function () {
8027
+
8028
+ return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);
8029
+
8030
+ },
8031
+
8032
+ normalize: function () {
8033
+
8034
+ return this.divideScalar(this.length() || 1);
8035
+
8036
+ },
8037
+
8038
+ setLength: function (length) {
8039
+
8040
+ return this.normalize().multiplyScalar(length);
8041
+
8042
+ },
8043
+
8044
+ lerp: function (v, alpha) {
8045
+
8046
+ this.x += (v.x - this.x) * alpha;
8047
+ this.y += (v.y - this.y) * alpha;
8048
+ this.z += (v.z - this.z) * alpha;
8049
+ this.w += (v.w - this.w) * alpha;
8050
+
8051
+ return this;
8052
+
8053
+ },
8054
+
8055
+ lerpVectors: function (v1, v2, alpha) {
8056
+
8057
+ return this.subVectors(v2, v1).multiplyScalar(alpha).add(v1);
8058
+
8059
+ },
8060
+
8061
+ equals: function (v) {
8062
+
8063
+ return ((v.x === this.x) && (v.y === this.y) && (v.z === this.z) && (v.w === this.w));
8064
+
8065
+ },
8066
+
8067
+ fromArray: function (array, offset) {
8068
+
8069
+ if (offset === undefined) offset = 0;
8070
+
8071
+ this.x = array[offset];
8072
+ this.y = array[offset + 1];
8073
+ this.z = array[offset + 2];
8074
+ this.w = array[offset + 3];
8075
+
8076
+ return this;
8077
+
8078
+ },
8079
+
8080
+ toArray: function (array, offset) {
8081
+
8082
+ if (array === undefined) array = [];
8083
+ if (offset === undefined) offset = 0;
8084
+
8085
+ array[offset] = this.x;
8086
+ array[offset + 1] = this.y;
8087
+ array[offset + 2] = this.z;
8088
+ array[offset + 3] = this.w;
8089
+
8090
+ return array;
8091
+
8092
+ },
8093
+
8094
+ fromBufferAttribute: function (attribute, index, offset) {
8095
+
8096
+ if (offset !== undefined) {
8097
+
8098
+ console.warn('THREE.Vector4: offset has been removed from .fromBufferAttribute().');
8099
+
8100
+ }
8101
+
8102
+ this.x = attribute.getX(index);
8103
+ this.y = attribute.getY(index);
8104
+ this.z = attribute.getZ(index);
8105
+ this.w = attribute.getW(index);
8106
+
8107
+ return this;
8108
+
8109
+ }
8110
+
8111
+ });
8112
+
8113
+ /**
8114
+ * @author szimek / https://github.com/szimek/
8115
+ * @author alteredq / http://alteredqualia.com/
8116
+ * @author Marius Kintel / https://github.com/kintel
8117
+ */
8118
+
8119
+ /*
8120
+ In options, we can specify:
8121
+ * Texture parameters for an auto-generated target texture
8122
+ * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers
8123
+ */
8124
+ function WebGLRenderTarget(width, height, options) {
8125
+
8126
+ this.width = width;
8127
+ this.height = height;
8128
+
8129
+ this.scissor = new Vector4(0, 0, width, height);
8130
+ this.scissorTest = false;
8131
+
8132
+ this.viewport = new Vector4(0, 0, width, height);
8133
+
8134
+ options = options || {};
8135
+
8136
+ if (options.minFilter === undefined) options.minFilter = LinearFilter;
8137
+
8138
+ this.texture = new Texture(undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);
8139
+
8140
+ this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : true;
8141
+
8142
+ this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
8143
+ this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
8144
+ this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;
8145
+
8146
+ }
8147
+
8148
+ WebGLRenderTarget.prototype = Object.assign(Object.create(EventDispatcher.prototype), {
8149
+
8150
+ constructor: WebGLRenderTarget,
8151
+
8152
+ isWebGLRenderTarget: true,
8153
+
8154
+ setSize: function (width, height) {
8155
+
8156
+ if (this.width !== width || this.height !== height) {
8157
+
8158
+ this.width = width;
8159
+ this.height = height;
8160
+
8161
+ this.dispose();
8162
+
8163
+ }
8164
+
8165
+ this.viewport.set(0, 0, width, height);
8166
+ this.scissor.set(0, 0, width, height);
8167
+
8168
+ },
8169
+
8170
+ clone: function () {
8171
+
8172
+ return new this.constructor().copy(this);
8173
+
8174
+ },
8175
+
8176
+ copy: function (source) {
8177
+
8178
+ this.width = source.width;
8179
+ this.height = source.height;
8180
+
8181
+ this.viewport.copy(source.viewport);
8182
+
8183
+ this.texture = source.texture.clone();
8184
+
8185
+ this.depthBuffer = source.depthBuffer;
8186
+ this.stencilBuffer = source.stencilBuffer;
8187
+ this.depthTexture = source.depthTexture;
8188
+
8189
+ return this;
8190
+
8191
+ },
8192
+
8193
+ dispose: function () {
8194
+
8195
+ this.dispatchEvent({ type: 'dispose' });
8196
+
8197
+ }
8198
+
8199
+ });
8200
+
8201
+ /**
8202
+ * @author alteredq / http://alteredqualia.com
8203
+ */
8204
+
8205
+ function WebGLRenderTargetCube(width, height, options) {
8206
+
8207
+ WebGLRenderTarget.call(this, width, height, options);
8208
+
8209
+ this.activeCubeFace = 0; // PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5
8210
+ this.activeMipMapLevel = 0;
8211
+
8212
+ }
8213
+
8214
+ WebGLRenderTargetCube.prototype = Object.create(WebGLRenderTarget.prototype);
8215
+ WebGLRenderTargetCube.prototype.constructor = WebGLRenderTargetCube;
8216
+
8217
+ WebGLRenderTargetCube.prototype.isWebGLRenderTargetCube = true;
8218
+
8219
+ /**
8220
+ * @author alteredq / http://alteredqualia.com/
8221
+ */
8222
+
8223
+ function DataTexture(data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {
8224
+
8225
+ Texture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);
8226
+
8227
+ this.image = { data: data, width: width, height: height };
8228
+
8229
+ this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
8230
+ this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
8231
+
8232
+ this.generateMipmaps = false;
8233
+ this.flipY = false;
8234
+ this.unpackAlignment = 1;
8235
+
8236
+ }
8237
+
8238
+ DataTexture.prototype = Object.create(Texture.prototype);
8239
+ DataTexture.prototype.constructor = DataTexture;
8240
+
8241
+ DataTexture.prototype.isDataTexture = true;
8242
+
8243
+ /**
8244
+ * @author bhouston / http://clara.io
8245
+ * @author WestLangley / http://github.com/WestLangley
8246
+ */
8247
+
8248
+ function Box3(min, max) {
8249
+
8250
+ this.min = (min !== undefined) ? min : new Vector3(+ Infinity, + Infinity, + Infinity);
8251
+ this.max = (max !== undefined) ? max : new Vector3(- Infinity, - Infinity, - Infinity);
8252
+
8253
+ }
8254
+
8255
+ Object.assign(Box3.prototype, {
8256
+
8257
+ isBox3: true,
8258
+
8259
+ set: function (min, max) {
8260
+
8261
+ this.min.copy(min);
8262
+ this.max.copy(max);
8263
+
8264
+ return this;
8265
+
8266
+ },
8267
+
8268
+ setFromArray: function (array) {
8269
+
8270
+ var minX = + Infinity;
8271
+ var minY = + Infinity;
8272
+ var minZ = + Infinity;
8273
+
8274
+ var maxX = - Infinity;
8275
+ var maxY = - Infinity;
8276
+ var maxZ = - Infinity;
8277
+
8278
+ for (var i = 0, l = array.length; i < l; i += 3) {
8279
+
8280
+ var x = array[i];
8281
+ var y = array[i + 1];
8282
+ var z = array[i + 2];
8283
+
8284
+ if (x < minX) minX = x;
8285
+ if (y < minY) minY = y;
8286
+ if (z < minZ) minZ = z;
8287
+
8288
+ if (x > maxX) maxX = x;
8289
+ if (y > maxY) maxY = y;
8290
+ if (z > maxZ) maxZ = z;
8291
+
8292
+ }
8293
+
8294
+ this.min.set(minX, minY, minZ);
8295
+ this.max.set(maxX, maxY, maxZ);
8296
+
8297
+ return this;
8298
+
8299
+ },
8300
+
8301
+ setFromBufferAttribute: function (attribute) {
8302
+
8303
+ var minX = + Infinity;
8304
+ var minY = + Infinity;
8305
+ var minZ = + Infinity;
8306
+
8307
+ var maxX = - Infinity;
8308
+ var maxY = - Infinity;
8309
+ var maxZ = - Infinity;
8310
+
8311
+ for (var i = 0, l = attribute.count; i < l; i++) {
8312
+
8313
+ var x = attribute.getX(i);
8314
+ var y = attribute.getY(i);
8315
+ var z = attribute.getZ(i);
8316
+
8317
+ if (x < minX) minX = x;
8318
+ if (y < minY) minY = y;
8319
+ if (z < minZ) minZ = z;
8320
+
8321
+ if (x > maxX) maxX = x;
8322
+ if (y > maxY) maxY = y;
8323
+ if (z > maxZ) maxZ = z;
8324
+
8325
+ }
8326
+
8327
+ this.min.set(minX, minY, minZ);
8328
+ this.max.set(maxX, maxY, maxZ);
8329
+
8330
+ return this;
8331
+
8332
+ },
8333
+
8334
+ setFromPoints: function (points) {
8335
+
8336
+ this.makeEmpty();
8337
+
8338
+ for (var i = 0, il = points.length; i < il; i++) {
8339
+
8340
+ this.expandByPoint(points[i]);
8341
+
8342
+ }
8343
+
8344
+ return this;
8345
+
8346
+ },
8347
+
8348
+ setFromCenterAndSize: function () {
8349
+
8350
+ var v1 = new Vector3();
8351
+
8352
+ return function setFromCenterAndSize(center, size) {
8353
+
8354
+ var halfSize = v1.copy(size).multiplyScalar(0.5);
8355
+
8356
+ this.min.copy(center).sub(halfSize);
8357
+ this.max.copy(center).add(halfSize);
8358
+
8359
+ return this;
8360
+
8361
+ };
8362
+
8363
+ }(),
8364
+
8365
+ setFromObject: function (object) {
8366
+
8367
+ this.makeEmpty();
8368
+
8369
+ return this.expandByObject(object);
8370
+
8371
+ },
8372
+
8373
+ clone: function () {
8374
+
8375
+ return new this.constructor().copy(this);
8376
+
8377
+ },
8378
+
8379
+ copy: function (box) {
8380
+
8381
+ this.min.copy(box.min);
8382
+ this.max.copy(box.max);
8383
+
8384
+ return this;
8385
+
8386
+ },
8387
+
8388
+ makeEmpty: function () {
8389
+
8390
+ this.min.x = this.min.y = this.min.z = + Infinity;
8391
+ this.max.x = this.max.y = this.max.z = - Infinity;
8392
+
8393
+ return this;
8394
+
8395
+ },
8396
+
8397
+ isEmpty: function () {
8398
+
8399
+ // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes
8400
+
8401
+ return (this.max.x < this.min.x) || (this.max.y < this.min.y) || (this.max.z < this.min.z);
8402
+
8403
+ },
8404
+
8405
+ getCenter: function (target) {
8406
+
8407
+ if (target === undefined) {
8408
+
8409
+ console.warn('THREE.Box3: .getCenter() target is now required');
8410
+ target = new Vector3();
8411
+
8412
+ }
8413
+
8414
+ return this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);
8415
+
8416
+ },
8417
+
8418
+ getSize: function (target) {
8419
+
8420
+ if (target === undefined) {
8421
+
8422
+ console.warn('THREE.Box3: .getSize() target is now required');
8423
+ target = new Vector3();
8424
+
8425
+ }
8426
+
8427
+ return this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min);
8428
+
8429
+ },
8430
+
8431
+ expandByPoint: function (point) {
8432
+
8433
+ this.min.min(point);
8434
+ this.max.max(point);
8435
+
8436
+ return this;
8437
+
8438
+ },
8439
+
8440
+ expandByVector: function (vector) {
8441
+
8442
+ this.min.sub(vector);
8443
+ this.max.add(vector);
8444
+
8445
+ return this;
8446
+
8447
+ },
8448
+
8449
+ expandByScalar: function (scalar) {
8450
+
8451
+ this.min.addScalar(- scalar);
8452
+ this.max.addScalar(scalar);
8453
+
8454
+ return this;
8455
+
8456
+ },
8457
+
8458
+ expandByObject: function () {
8459
+
8460
+ // Computes the world-axis-aligned bounding box of an object (including its children),
8461
+ // accounting for both the object's, and children's, world transforms
8462
+
8463
+ var scope, i, l;
8464
+
8465
+ var v1 = new Vector3();
8466
+
8467
+ function traverse(node) {
8468
+
8469
+ var geometry = node.geometry;
8470
+
8471
+ if (geometry !== undefined) {
8472
+
8473
+ if (geometry.isGeometry) {
8474
+
8475
+ var vertices = geometry.vertices;
8476
+
8477
+ for (i = 0, l = vertices.length; i < l; i++) {
8478
+
8479
+ v1.copy(vertices[i]);
8480
+ v1.applyMatrix4(node.matrixWorld);
8481
+
8482
+ scope.expandByPoint(v1);
8483
+
8484
+ }
8485
+
8486
+ } else if (geometry.isBufferGeometry) {
8487
+
8488
+ var attribute = geometry.attributes.position;
8489
+
8490
+ if (attribute !== undefined) {
8491
+
8492
+ for (i = 0, l = attribute.count; i < l; i++) {
8493
+
8494
+ v1.fromBufferAttribute(attribute, i).applyMatrix4(node.matrixWorld);
8495
+
8496
+ scope.expandByPoint(v1);
8497
+
8498
+ }
8499
+
8500
+ }
8501
+
8502
+ }
8503
+
8504
+ }
8505
+
8506
+ }
8507
+
8508
+ return function expandByObject(object) {
8509
+
8510
+ scope = this;
8511
+
8512
+ object.updateMatrixWorld(true);
8513
+
8514
+ object.traverse(traverse);
8515
+
8516
+ return this;
8517
+
8518
+ };
8519
+
8520
+ }(),
8521
+
8522
+ containsPoint: function (point) {
8523
+
8524
+ return point.x < this.min.x || point.x > this.max.x ||
8525
+ point.y < this.min.y || point.y > this.max.y ||
8526
+ point.z < this.min.z || point.z > this.max.z ? false : true;
8527
+
8528
+ },
8529
+
8530
+ containsBox: function (box) {
8531
+
8532
+ return this.min.x <= box.min.x && box.max.x <= this.max.x &&
8533
+ this.min.y <= box.min.y && box.max.y <= this.max.y &&
8534
+ this.min.z <= box.min.z && box.max.z <= this.max.z;
8535
+
8536
+ },
8537
+
8538
+ getParameter: function (point, target) {
8539
+
8540
+ // This can potentially have a divide by zero if the box
8541
+ // has a size dimension of 0.
8542
+
8543
+ if (target === undefined) {
8544
+
8545
+ console.warn('THREE.Box3: .getParameter() target is now required');
8546
+ target = new Vector3();
8547
+
8548
+ }
8549
+
8550
+ return target.set(
8551
+ (point.x - this.min.x) / (this.max.x - this.min.x),
8552
+ (point.y - this.min.y) / (this.max.y - this.min.y),
8553
+ (point.z - this.min.z) / (this.max.z - this.min.z)
8554
+ );
8555
+
8556
+ },
8557
+
8558
+ intersectsBox: function (box) {
8559
+
8560
+ // using 6 splitting planes to rule out intersections.
8561
+ return box.max.x < this.min.x || box.min.x > this.max.x ||
8562
+ box.max.y < this.min.y || box.min.y > this.max.y ||
8563
+ box.max.z < this.min.z || box.min.z > this.max.z ? false : true;
8564
+
8565
+ },
8566
+
8567
+ intersectsSphere: (function () {
8568
+
8569
+ var closestPoint = new Vector3();
8570
+
8571
+ return function intersectsSphere(sphere) {
8572
+
8573
+ // Find the point on the AABB closest to the sphere center.
8574
+ this.clampPoint(sphere.center, closestPoint);
8575
+
8576
+ // If that point is inside the sphere, the AABB and sphere intersect.
8577
+ return closestPoint.distanceToSquared(sphere.center) <= (sphere.radius * sphere.radius);
8578
+
8579
+ };
8580
+
8581
+ })(),
8582
+
8583
+ intersectsPlane: function (plane) {
8584
+
8585
+ // We compute the minimum and maximum dot product values. If those values
8586
+ // are on the same side (back or front) of the plane, then there is no intersection.
8587
+
8588
+ var min, max;
8589
+
8590
+ if (plane.normal.x > 0) {
8591
+
8592
+ min = plane.normal.x * this.min.x;
8593
+ max = plane.normal.x * this.max.x;
8594
+
8595
+ } else {
8596
+
8597
+ min = plane.normal.x * this.max.x;
8598
+ max = plane.normal.x * this.min.x;
8599
+
8600
+ }
8601
+
8602
+ if (plane.normal.y > 0) {
8603
+
8604
+ min += plane.normal.y * this.min.y;
8605
+ max += plane.normal.y * this.max.y;
8606
+
8607
+ } else {
8608
+
8609
+ min += plane.normal.y * this.max.y;
8610
+ max += plane.normal.y * this.min.y;
8611
+
8612
+ }
8613
+
8614
+ if (plane.normal.z > 0) {
8615
+
8616
+ min += plane.normal.z * this.min.z;
8617
+ max += plane.normal.z * this.max.z;
8618
+
8619
+ } else {
8620
+
8621
+ min += plane.normal.z * this.max.z;
8622
+ max += plane.normal.z * this.min.z;
8623
+
8624
+ }
8625
+
8626
+ return (min <= plane.constant && max >= plane.constant);
8627
+
8628
+ },
8629
+
8630
+ intersectsTriangle: (function () {
8631
+
8632
+ // triangle centered vertices
8633
+ var v0 = new Vector3();
8634
+ var v1 = new Vector3();
8635
+ var v2 = new Vector3();
8636
+
8637
+ // triangle edge vectors
8638
+ var f0 = new Vector3();
8639
+ var f1 = new Vector3();
8640
+ var f2 = new Vector3();
8641
+
8642
+ var testAxis = new Vector3();
8643
+
8644
+ var center = new Vector3();
8645
+ var extents = new Vector3();
8646
+
8647
+ var triangleNormal = new Vector3();
8648
+
8649
+ function satForAxes(axes) {
8650
+
8651
+ var i, j;
8652
+
8653
+ for (i = 0, j = axes.length - 3; i <= j; i += 3) {
8654
+
8655
+ testAxis.fromArray(axes, i);
8656
+ // project the aabb onto the seperating axis
8657
+ var r = extents.x * Math.abs(testAxis.x) + extents.y * Math.abs(testAxis.y) + extents.z * Math.abs(testAxis.z);
8658
+ // project all 3 vertices of the triangle onto the seperating axis
8659
+ var p0 = v0.dot(testAxis);
8660
+ var p1 = v1.dot(testAxis);
8661
+ var p2 = v2.dot(testAxis);
8662
+ // actual test, basically see if either of the most extreme of the triangle points intersects r
8663
+ if (Math.max(- Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) {
8664
+
8665
+ // points of the projected triangle are outside the projected half-length of the aabb
8666
+ // the axis is seperating and we can exit
8667
+ return false;
8668
+
8669
+ }
8670
+
8671
+ }
8672
+
8673
+ return true;
8674
+
8675
+ }
8676
+
8677
+ return function intersectsTriangle(triangle) {
8678
+
8679
+ if (this.isEmpty()) {
8680
+
8681
+ return false;
8682
+
8683
+ }
8684
+
8685
+ // compute box center and extents
8686
+ this.getCenter(center);
8687
+ extents.subVectors(this.max, center);
8688
+
8689
+ // translate triangle to aabb origin
8690
+ v0.subVectors(triangle.a, center);
8691
+ v1.subVectors(triangle.b, center);
8692
+ v2.subVectors(triangle.c, center);
8693
+
8694
+ // compute edge vectors for triangle
8695
+ f0.subVectors(v1, v0);
8696
+ f1.subVectors(v2, v1);
8697
+ f2.subVectors(v0, v2);
8698
+
8699
+ // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb
8700
+ // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation
8701
+ // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)
8702
+ var axes = [
8703
+ 0, - f0.z, f0.y, 0, - f1.z, f1.y, 0, - f2.z, f2.y,
8704
+ f0.z, 0, - f0.x, f1.z, 0, - f1.x, f2.z, 0, - f2.x,
8705
+ - f0.y, f0.x, 0, - f1.y, f1.x, 0, - f2.y, f2.x, 0
8706
+ ];
8707
+ if (!satForAxes(axes)) {
8708
+
8709
+ return false;
8710
+
8711
+ }
8712
+
8713
+ // test 3 face normals from the aabb
8714
+ axes = [1, 0, 0, 0, 1, 0, 0, 0, 1];
8715
+ if (!satForAxes(axes)) {
8716
+
8717
+ return false;
8718
+
8719
+ }
8720
+
8721
+ // finally testing the face normal of the triangle
8722
+ // use already existing triangle edge vectors here
8723
+ triangleNormal.crossVectors(f0, f1);
8724
+ axes = [triangleNormal.x, triangleNormal.y, triangleNormal.z];
8725
+ return satForAxes(axes);
8726
+
8727
+ };
8728
+
8729
+ })(),
8730
+
8731
+ clampPoint: function (point, target) {
8732
+
8733
+ if (target === undefined) {
8734
+
8735
+ console.warn('THREE.Box3: .clampPoint() target is now required');
8736
+ target = new Vector3();
8737
+
8738
+ }
8739
+
8740
+ return target.copy(point).clamp(this.min, this.max);
8741
+
8742
+ },
8743
+
8744
+ distanceToPoint: function () {
8745
+
8746
+ var v1 = new Vector3();
8747
+
8748
+ return function distanceToPoint(point) {
8749
+
8750
+ var clampedPoint = v1.copy(point).clamp(this.min, this.max);
8751
+ return clampedPoint.sub(point).length();
8752
+
8753
+ };
8754
+
8755
+ }(),
8756
+
8757
+ getBoundingSphere: function () {
8758
+
8759
+ var v1 = new Vector3();
8760
+
8761
+ return function getBoundingSphere(target) {
8762
+
8763
+ if (target === undefined) {
8764
+
8765
+ console.warn('THREE.Box3: .getBoundingSphere() target is now required');
8766
+ target = new Sphere();
8767
+
8768
+ }
8769
+
8770
+ this.getCenter(target.center);
8771
+
8772
+ target.radius = this.getSize(v1).length() * 0.5;
8773
+
8774
+ return target;
8775
+
8776
+ };
8777
+
8778
+ }(),
8779
+
8780
+ intersect: function (box) {
8781
+
8782
+ this.min.max(box.min);
8783
+ this.max.min(box.max);
8784
+
8785
+ // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.
8786
+ if (this.isEmpty()) this.makeEmpty();
8787
+
8788
+ return this;
8789
+
8790
+ },
8791
+
8792
+ union: function (box) {
8793
+
8794
+ this.min.min(box.min);
8795
+ this.max.max(box.max);
8796
+
8797
+ return this;
8798
+
8799
+ },
8800
+
8801
+ applyMatrix4: function (matrix) {
8802
+
8803
+ // transform of empty box is an empty box.
8804
+ if (this.isEmpty()) return this;
8805
+
8806
+ var m = matrix.elements;
8807
+
8808
+ var xax = m[0] * this.min.x, xay = m[1] * this.min.x, xaz = m[2] * this.min.x;
8809
+ var xbx = m[0] * this.max.x, xby = m[1] * this.max.x, xbz = m[2] * this.max.x;
8810
+ var yax = m[4] * this.min.y, yay = m[5] * this.min.y, yaz = m[6] * this.min.y;
8811
+ var ybx = m[4] * this.max.y, yby = m[5] * this.max.y, ybz = m[6] * this.max.y;
8812
+ var zax = m[8] * this.min.z, zay = m[9] * this.min.z, zaz = m[10] * this.min.z;
8813
+ var zbx = m[8] * this.max.z, zby = m[9] * this.max.z, zbz = m[10] * this.max.z;
8814
+
8815
+ this.min.x = Math.min(xax, xbx) + Math.min(yax, ybx) + Math.min(zax, zbx) + m[12];
8816
+ this.min.y = Math.min(xay, xby) + Math.min(yay, yby) + Math.min(zay, zby) + m[13];
8817
+ this.min.z = Math.min(xaz, xbz) + Math.min(yaz, ybz) + Math.min(zaz, zbz) + m[14];
8818
+ this.max.x = Math.max(xax, xbx) + Math.max(yax, ybx) + Math.max(zax, zbx) + m[12];
8819
+ this.max.y = Math.max(xay, xby) + Math.max(yay, yby) + Math.max(zay, zby) + m[13];
8820
+ this.max.z = Math.max(xaz, xbz) + Math.max(yaz, ybz) + Math.max(zaz, zbz) + m[14];
8821
+
8822
+ return this;
8823
+
8824
+ },
8825
+
8826
+ translate: function (offset) {
8827
+
8828
+ this.min.add(offset);
8829
+ this.max.add(offset);
8830
+
8831
+ return this;
8832
+
8833
+ },
8834
+
8835
+ equals: function (box) {
8836
+
8837
+ return box.min.equals(this.min) && box.max.equals(this.max);
8838
+
8839
+ }
8840
+
8841
+ });
8842
+
8843
+ /**
8844
+ * @author bhouston / http://clara.io
8845
+ * @author mrdoob / http://mrdoob.com/
8846
+ */
8847
+
8848
+ function Sphere(center, radius) {
8849
+
8850
+ this.center = (center !== undefined) ? center : new Vector3();
8851
+ this.radius = (radius !== undefined) ? radius : 0;
8852
+
8853
+ }
8854
+
8855
+ Object.assign(Sphere.prototype, {
8856
+
8857
+ set: function (center, radius) {
8858
+
8859
+ this.center.copy(center);
8860
+ this.radius = radius;
8861
+
8862
+ return this;
8863
+
8864
+ },
8865
+
8866
+ setFromPoints: function () {
8867
+
8868
+ var box = new Box3();
8869
+
8870
+ return function setFromPoints(points, optionalCenter) {
8871
+
8872
+ var center = this.center;
8873
+
8874
+ if (optionalCenter !== undefined) {
8875
+
8876
+ center.copy(optionalCenter);
8877
+
8878
+ } else {
8879
+
8880
+ box.setFromPoints(points).getCenter(center);
8881
+
8882
+ }
8883
+
8884
+ var maxRadiusSq = 0;
8885
+
8886
+ for (var i = 0, il = points.length; i < il; i++) {
8887
+
8888
+ maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i]));
8889
+
8890
+ }
8891
+
8892
+ this.radius = Math.sqrt(maxRadiusSq);
8893
+
8894
+ return this;
8895
+
8896
+ };
8897
+
8898
+ }(),
8899
+
8900
+ clone: function () {
8901
+
8902
+ return new this.constructor().copy(this);
8903
+
8904
+ },
8905
+
8906
+ copy: function (sphere) {
8907
+
8908
+ this.center.copy(sphere.center);
8909
+ this.radius = sphere.radius;
8910
+
8911
+ return this;
8912
+
8913
+ },
8914
+
8915
+ empty: function () {
8916
+
8917
+ return (this.radius <= 0);
8918
+
8919
+ },
8920
+
8921
+ containsPoint: function (point) {
8922
+
8923
+ return (point.distanceToSquared(this.center) <= (this.radius * this.radius));
8924
+
8925
+ },
8926
+
8927
+ distanceToPoint: function (point) {
8928
+
8929
+ return (point.distanceTo(this.center) - this.radius);
8930
+
8931
+ },
8932
+
8933
+ intersectsSphere: function (sphere) {
8934
+
8935
+ var radiusSum = this.radius + sphere.radius;
8936
+
8937
+ return sphere.center.distanceToSquared(this.center) <= (radiusSum * radiusSum);
8938
+
8939
+ },
8940
+
8941
+ intersectsBox: function (box) {
8942
+
8943
+ return box.intersectsSphere(this);
8944
+
8945
+ },
8946
+
8947
+ intersectsPlane: function (plane) {
8948
+
8949
+ return Math.abs(plane.distanceToPoint(this.center)) <= this.radius;
8950
+
8951
+ },
8952
+
8953
+ clampPoint: function (point, target) {
8954
+
8955
+ var deltaLengthSq = this.center.distanceToSquared(point);
8956
+
8957
+ if (target === undefined) {
8958
+
8959
+ console.warn('THREE.Sphere: .clampPoint() target is now required');
8960
+ target = new Vector3();
8961
+
8962
+ }
8963
+
8964
+ target.copy(point);
8965
+
8966
+ if (deltaLengthSq > (this.radius * this.radius)) {
8967
+
8968
+ target.sub(this.center).normalize();
8969
+ target.multiplyScalar(this.radius).add(this.center);
8970
+
8971
+ }
8972
+
8973
+ return target;
8974
+
8975
+ },
8976
+
8977
+ getBoundingBox: function (target) {
8978
+
8979
+ if (target === undefined) {
8980
+
8981
+ console.warn('THREE.Sphere: .getBoundingBox() target is now required');
8982
+ target = new Box3();
8983
+
8984
+ }
8985
+
8986
+ target.set(this.center, this.center);
8987
+ target.expandByScalar(this.radius);
8988
+
8989
+ return target;
8990
+
8991
+ },
8992
+
8993
+ applyMatrix4: function (matrix) {
8994
+
8995
+ this.center.applyMatrix4(matrix);
8996
+ this.radius = this.radius * matrix.getMaxScaleOnAxis();
8997
+
8998
+ return this;
8999
+
9000
+ },
9001
+
9002
+ translate: function (offset) {
9003
+
9004
+ this.center.add(offset);
9005
+
9006
+ return this;
9007
+
9008
+ },
9009
+
9010
+ equals: function (sphere) {
9011
+
9012
+ return sphere.center.equals(this.center) && (sphere.radius === this.radius);
9013
+
9014
+ }
9015
+
9016
+ });
9017
+
9018
+ /**
9019
+ * @author bhouston / http://clara.io
9020
+ */
9021
+
9022
+ function Plane(normal, constant) {
9023
+
9024
+ // normal is assumed to be normalized
9025
+
9026
+ this.normal = (normal !== undefined) ? normal : new Vector3(1, 0, 0);
9027
+ this.constant = (constant !== undefined) ? constant : 0;
9028
+
9029
+ }
9030
+
9031
+ Object.assign(Plane.prototype, {
9032
+
9033
+ set: function (normal, constant) {
9034
+
9035
+ this.normal.copy(normal);
9036
+ this.constant = constant;
9037
+
9038
+ return this;
9039
+
9040
+ },
9041
+
9042
+ setComponents: function (x, y, z, w) {
9043
+
9044
+ this.normal.set(x, y, z);
9045
+ this.constant = w;
9046
+
9047
+ return this;
9048
+
9049
+ },
9050
+
9051
+ setFromNormalAndCoplanarPoint: function (normal, point) {
9052
+
9053
+ this.normal.copy(normal);
9054
+ this.constant = - point.dot(this.normal);
9055
+
9056
+ return this;
9057
+
9058
+ },
9059
+
9060
+ setFromCoplanarPoints: function () {
9061
+
9062
+ var v1 = new Vector3();
9063
+ var v2 = new Vector3();
9064
+
9065
+ return function setFromCoplanarPoints(a, b, c) {
9066
+
9067
+ var normal = v1.subVectors(c, b).cross(v2.subVectors(a, b)).normalize();
9068
+
9069
+ // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?
9070
+
9071
+ this.setFromNormalAndCoplanarPoint(normal, a);
9072
+
9073
+ return this;
9074
+
9075
+ };
9076
+
9077
+ }(),
9078
+
9079
+ clone: function () {
9080
+
9081
+ return new this.constructor().copy(this);
9082
+
9083
+ },
9084
+
9085
+ copy: function (plane) {
9086
+
9087
+ this.normal.copy(plane.normal);
9088
+ this.constant = plane.constant;
9089
+
9090
+ return this;
9091
+
9092
+ },
9093
+
9094
+ normalize: function () {
9095
+
9096
+ // Note: will lead to a divide by zero if the plane is invalid.
9097
+
9098
+ var inverseNormalLength = 1.0 / this.normal.length();
9099
+ this.normal.multiplyScalar(inverseNormalLength);
9100
+ this.constant *= inverseNormalLength;
9101
+
9102
+ return this;
9103
+
9104
+ },
9105
+
9106
+ negate: function () {
9107
+
9108
+ this.constant *= - 1;
9109
+ this.normal.negate();
9110
+
9111
+ return this;
9112
+
9113
+ },
9114
+
9115
+ distanceToPoint: function (point) {
9116
+
9117
+ return this.normal.dot(point) + this.constant;
9118
+
9119
+ },
9120
+
9121
+ distanceToSphere: function (sphere) {
9122
+
9123
+ return this.distanceToPoint(sphere.center) - sphere.radius;
9124
+
9125
+ },
9126
+
9127
+ projectPoint: function (point, target) {
9128
+
9129
+ if (target === undefined) {
9130
+
9131
+ console.warn('THREE.Plane: .projectPoint() target is now required');
9132
+ target = new Vector3();
9133
+
9134
+ }
9135
+
9136
+ return target.copy(this.normal).multiplyScalar(- this.distanceToPoint(point)).add(point);
9137
+
9138
+ },
9139
+
9140
+ intersectLine: function () {
9141
+
9142
+ var v1 = new Vector3();
9143
+
9144
+ return function intersectLine(line, target) {
9145
+
9146
+ if (target === undefined) {
9147
+
9148
+ console.warn('THREE.Plane: .intersectLine() target is now required');
9149
+ target = new Vector3();
9150
+
9151
+ }
9152
+
9153
+ var direction = line.delta(v1);
9154
+
9155
+ var denominator = this.normal.dot(direction);
9156
+
9157
+ if (denominator === 0) {
9158
+
9159
+ // line is coplanar, return origin
9160
+ if (this.distanceToPoint(line.start) === 0) {
9161
+
9162
+ return target.copy(line.start);
9163
+
9164
+ }
9165
+
9166
+ // Unsure if this is the correct method to handle this case.
9167
+ return undefined;
9168
+
9169
+ }
9170
+
9171
+ var t = - (line.start.dot(this.normal) + this.constant) / denominator;
9172
+
9173
+ if (t < 0 || t > 1) {
9174
+
9175
+ return undefined;
9176
+
9177
+ }
9178
+
9179
+ return target.copy(direction).multiplyScalar(t).add(line.start);
9180
+
9181
+ };
9182
+
9183
+ }(),
9184
+
9185
+ intersectsLine: function (line) {
9186
+
9187
+ // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.
9188
+
9189
+ var startSign = this.distanceToPoint(line.start);
9190
+ var endSign = this.distanceToPoint(line.end);
9191
+
9192
+ return (startSign < 0 && endSign > 0) || (endSign < 0 && startSign > 0);
9193
+
9194
+ },
9195
+
9196
+ intersectsBox: function (box) {
9197
+
9198
+ return box.intersectsPlane(this);
9199
+
9200
+ },
9201
+
9202
+ intersectsSphere: function (sphere) {
9203
+
9204
+ return sphere.intersectsPlane(this);
9205
+
9206
+ },
9207
+
9208
+ coplanarPoint: function (target) {
9209
+
9210
+ if (target === undefined) {
9211
+
9212
+ console.warn('THREE.Plane: .coplanarPoint() target is now required');
9213
+ target = new Vector3();
9214
+
9215
+ }
9216
+
9217
+ return target.copy(this.normal).multiplyScalar(- this.constant);
9218
+
9219
+ },
9220
+
9221
+ applyMatrix4: function () {
9222
+
9223
+ var v1 = new Vector3();
9224
+ var m1 = new Matrix3();
9225
+
9226
+ return function applyMatrix4(matrix, optionalNormalMatrix) {
9227
+
9228
+ var normalMatrix = optionalNormalMatrix || m1.getNormalMatrix(matrix);
9229
+
9230
+ var referencePoint = this.coplanarPoint(v1).applyMatrix4(matrix);
9231
+
9232
+ var normal = this.normal.applyMatrix3(normalMatrix).normalize();
9233
+
9234
+ this.constant = - referencePoint.dot(normal);
9235
+
9236
+ return this;
9237
+
9238
+ };
9239
+
9240
+ }(),
9241
+
9242
+ translate: function (offset) {
9243
+
9244
+ this.constant -= offset.dot(this.normal);
9245
+
9246
+ return this;
9247
+
9248
+ },
9249
+
9250
+ equals: function (plane) {
9251
+
9252
+ return plane.normal.equals(this.normal) && (plane.constant === this.constant);
9253
+
9254
+ }
9255
+
9256
+ });
9257
+
9258
+ /**
9259
+ * @author mrdoob / http://mrdoob.com/
9260
+ * @author alteredq / http://alteredqualia.com/
9261
+ * @author bhouston / http://clara.io
9262
+ */
9263
+
9264
+ function Frustum(p0, p1, p2, p3, p4, p5) {
9265
+
9266
+ this.planes = [
9267
+
9268
+ (p0 !== undefined) ? p0 : new Plane(),
9269
+ (p1 !== undefined) ? p1 : new Plane(),
9270
+ (p2 !== undefined) ? p2 : new Plane(),
9271
+ (p3 !== undefined) ? p3 : new Plane(),
9272
+ (p4 !== undefined) ? p4 : new Plane(),
9273
+ (p5 !== undefined) ? p5 : new Plane()
9274
+
9275
+ ];
9276
+
9277
+ }
9278
+
9279
+ Object.assign(Frustum.prototype, {
9280
+
9281
+ set: function (p0, p1, p2, p3, p4, p5) {
9282
+
9283
+ var planes = this.planes;
9284
+
9285
+ planes[0].copy(p0);
9286
+ planes[1].copy(p1);
9287
+ planes[2].copy(p2);
9288
+ planes[3].copy(p3);
9289
+ planes[4].copy(p4);
9290
+ planes[5].copy(p5);
9291
+
9292
+ return this;
9293
+
9294
+ },
9295
+
9296
+ clone: function () {
9297
+
9298
+ return new this.constructor().copy(this);
9299
+
9300
+ },
9301
+
9302
+ copy: function (frustum) {
9303
+
9304
+ var planes = this.planes;
9305
+
9306
+ for (var i = 0; i < 6; i++) {
9307
+
9308
+ planes[i].copy(frustum.planes[i]);
9309
+
9310
+ }
9311
+
9312
+ return this;
9313
+
9314
+ },
9315
+
9316
+ setFromMatrix: function (m) {
9317
+
9318
+ var planes = this.planes;
9319
+ var me = m.elements;
9320
+ var me0 = me[0], me1 = me[1], me2 = me[2], me3 = me[3];
9321
+ var me4 = me[4], me5 = me[5], me6 = me[6], me7 = me[7];
9322
+ var me8 = me[8], me9 = me[9], me10 = me[10], me11 = me[11];
9323
+ var me12 = me[12], me13 = me[13], me14 = me[14], me15 = me[15];
9324
+
9325
+ planes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize();
9326
+ planes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize();
9327
+ planes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();
9328
+ planes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();
9329
+ planes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();
9330
+ planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();
9331
+
9332
+ return this;
9333
+
9334
+ },
9335
+
9336
+ intersectsObject: function () {
9337
+
9338
+ var sphere = new Sphere();
9339
+
9340
+ return function intersectsObject(object) {
9341
+
9342
+ var geometry = object.geometry;
9343
+
9344
+ if (geometry.boundingSphere === null)
9345
+ geometry.computeBoundingSphere();
9346
+
9347
+ sphere.copy(geometry.boundingSphere)
9348
+ .applyMatrix4(object.matrixWorld);
9349
+
9350
+ return this.intersectsSphere(sphere);
9351
+
9352
+ };
9353
+
9354
+ }(),
9355
+
9356
+ intersectsSprite: function () {
9357
+
9358
+ var sphere = new Sphere();
9359
+
9360
+ return function intersectsSprite(sprite) {
9361
+
9362
+ sphere.center.set(0, 0, 0);
9363
+ sphere.radius = 0.7071067811865476;
9364
+ sphere.applyMatrix4(sprite.matrixWorld);
9365
+
9366
+ return this.intersectsSphere(sphere);
9367
+
9368
+ };
9369
+
9370
+ }(),
9371
+
9372
+ intersectsSphere: function (sphere) {
9373
+
9374
+ var planes = this.planes;
9375
+ var center = sphere.center;
9376
+ var negRadius = - sphere.radius;
9377
+
9378
+ for (var i = 0; i < 6; i++) {
9379
+
9380
+ var distance = planes[i].distanceToPoint(center);
9381
+
9382
+ if (distance < negRadius) {
9383
+
9384
+ return false;
9385
+
9386
+ }
9387
+
9388
+ }
9389
+
9390
+ return true;
9391
+
9392
+ },
9393
+
9394
+ intersectsBox: function () {
9395
+
9396
+ var p1 = new Vector3(),
9397
+ p2 = new Vector3();
9398
+
9399
+ return function intersectsBox(box) {
9400
+
9401
+ var planes = this.planes;
9402
+
9403
+ for (var i = 0; i < 6; i++) {
9404
+
9405
+ var plane = planes[i];
9406
+
9407
+ p1.x = plane.normal.x > 0 ? box.min.x : box.max.x;
9408
+ p2.x = plane.normal.x > 0 ? box.max.x : box.min.x;
9409
+ p1.y = plane.normal.y > 0 ? box.min.y : box.max.y;
9410
+ p2.y = plane.normal.y > 0 ? box.max.y : box.min.y;
9411
+ p1.z = plane.normal.z > 0 ? box.min.z : box.max.z;
9412
+ p2.z = plane.normal.z > 0 ? box.max.z : box.min.z;
9413
+
9414
+ var d1 = plane.distanceToPoint(p1);
9415
+ var d2 = plane.distanceToPoint(p2);
9416
+
9417
+ // if both outside plane, no intersection
9418
+
9419
+ if (d1 < 0 && d2 < 0) {
9420
+
9421
+ return false;
9422
+
9423
+ }
9424
+
9425
+ }
9426
+
9427
+ return true;
9428
+
9429
+ };
9430
+
9431
+ }(),
9432
+
9433
+ containsPoint: function (point) {
9434
+
9435
+ var planes = this.planes;
9436
+
9437
+ for (var i = 0; i < 6; i++) {
9438
+
9439
+ if (planes[i].distanceToPoint(point) < 0) {
9440
+
9441
+ return false;
9442
+
9443
+ }
9444
+
9445
+ }
9446
+
9447
+ return true;
9448
+
9449
+ }
9450
+
9451
+ });
9452
+
9453
+ var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n";
9454
+
9455
+ var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n";
9456
+
9457
+ var alphatest_fragment = "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n";
9458
+
9459
+ var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n";
9460
+
9461
+ var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";
9462
+
9463
+ var begin_vertex = "\nvec3 transformed = vec3( position );\n";
9464
+
9465
+ var beginnormal_vertex = "\nvec3 objectNormal = vec3( normal );\n";
9466
+
9467
+ var bsdfs = "float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n";
9468
+
9469
+ var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n";
9470
+
9471
+ var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n";
9472
+
9473
+ var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n";
9474
+
9475
+ var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n";
9476
+
9477
+ var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n";
9478
+
9479
+ var color_fragment = "#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif";
9480
+
9481
+ var color_pars_fragment = "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n";
9482
+
9483
+ var color_pars_vertex = "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif";
9484
+
9485
+ var color_vertex = "#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif";
9486
+
9487
+ var common = "#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n";
9488
+
9489
+ var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n";
9490
+
9491
+ var defaultnormal_vertex = "vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n";
9492
+
9493
+ var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n";
9494
+
9495
+ var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n";
9496
+
9497
+ var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n";
9498
+
9499
+ var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n";
9500
+
9501
+ var encodings_fragment = " gl_FragColor = linearToOutputTexel( gl_FragColor );\n";
9502
+
9503
+ var encodings_pars_fragment = "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n";
9504
+
9505
+ var envmap_fragment = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n";
9506
+
9507
+ var envmap_pars_fragment = "#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n";
9508
+
9509
+ var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n";
9510
+
9511
+ var envmap_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n";
9512
+
9513
+ var fog_vertex = "\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif";
9514
+
9515
+ var fog_pars_vertex = "#ifdef USE_FOG\n varying float fogDepth;\n#endif\n";
9516
+
9517
+ var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n";
9518
+
9519
+ var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n";
9520
+
9521
+ var gradientmap_pars_fragment = "#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n";
9522
+
9523
+ var lightmap_fragment = "#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n";
9524
+
9525
+ var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";
9526
+
9527
+ var lights_lambert_vertex = "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n";
9528
+
9529
+ var lights_pars_begin = "uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n";
9530
+
9531
+ var lights_pars_maps = "#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n";
9532
+
9533
+ var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n";
9534
+
9535
+ var lights_phong_pars_fragment = "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n";
9536
+
9537
+ var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n";
9538
+
9539
+ var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n";
9540
+
9541
+ var lights_fragment_begin = "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n";
9542
+
9543
+ var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n";
9544
+
9545
+ var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n";
9546
+
9547
+ var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";
9548
+
9549
+ var logdepthbuf_pars_fragment = "#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n";
9550
+
9551
+ var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif";
9552
+
9553
+ var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n";
9554
+
9555
+ var map_fragment = "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n";
9556
+
9557
+ var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n";
9558
+
9559
+ var map_particle_fragment = "#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n";
9560
+
9561
+ var map_particle_pars_fragment = "#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n";
9562
+
9563
+ var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n";
9564
+
9565
+ var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";
9566
+
9567
+ var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n";
9568
+
9569
+ var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif";
9570
+
9571
+ var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n";
9572
+
9573
+ var normal_fragment_begin = "#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n";
9574
+
9575
+ var normal_fragment_maps = "#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n";
9576
+
9577
+ var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy *= normalScale;\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n";
9578
+
9579
+ var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n";
9580
+
9581
+ var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n";
9582
+
9583
+ var project_vertex = "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n";
9584
+
9585
+ var dithering_fragment = "#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n";
9586
+
9587
+ var dithering_pars_fragment = "#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n";
9588
+
9589
+ var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n";
9590
+
9591
+ var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";
9592
+
9593
+ var shadowmap_pars_fragment = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n";
9594
+
9595
+ var shadowmap_pars_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n";
9596
+
9597
+ var shadowmap_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n";
9598
+
9599
+ var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n";
9600
+
9601
+ var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";
9602
+
9603
+ var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n";
9604
+
9605
+ var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n";
9606
+
9607
+ var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n";
9608
+
9609
+ var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";
9610
+
9611
+ var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";
9612
+
9613
+ var tonemapping_fragment = "#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n";
9614
+
9615
+ var tonemapping_pars_fragment = "#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n";
9616
+
9617
+ var uv_pars_fragment = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif";
9618
+
9619
+ var uv_pars_vertex = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n";
9620
+
9621
+ var uv_vertex = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif";
9622
+
9623
+ var uv2_pars_fragment = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif";
9624
+
9625
+ var uv2_pars_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif";
9626
+
9627
+ var uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif";
9628
+
9629
+ var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n";
9630
+
9631
+ var cube_frag = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n";
9632
+
9633
+ var cube_vert = "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n";
9634
+
9635
+ var depth_frag = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n";
9636
+
9637
+ var depth_vert = "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n";
9638
+
9639
+ var distanceRGBA_frag = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n";
9640
+
9641
+ var distanceRGBA_vert = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n";
9642
+
9643
+ var equirect_frag = "uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n";
9644
+
9645
+ var equirect_vert = "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n";
9646
+
9647
+ var linedashed_frag = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
9648
+
9649
+ var linedashed_vert = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n";
9650
+
9651
+ var meshbasic_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
9652
+
9653
+ var meshbasic_vert = "#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n";
9654
+
9655
+ var meshlambert_frag = "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n";
9656
+
9657
+ var meshlambert_vert = "#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n";
9658
+
9659
+ var meshphong_frag = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n";
9660
+
9661
+ var meshphong_vert = "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n";
9662
+
9663
+ var meshphysical_frag = "#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n";
9664
+
9665
+ var meshphysical_vert = "#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n";
9666
+
9667
+ var normal_frag = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n";
9668
+
9669
+ var normal_vert = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n";
9670
+
9671
+ var points_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
9672
+
9673
+ var points_vert = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n";
9674
+
9675
+ var shadow_frag = "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n";
9676
+
9677
+ var shadow_vert = "#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n";
9678
+
9679
+ var ShaderChunk = {
9680
+ alphamap_fragment: alphamap_fragment,
9681
+ alphamap_pars_fragment: alphamap_pars_fragment,
9682
+ alphatest_fragment: alphatest_fragment,
9683
+ aomap_fragment: aomap_fragment,
9684
+ aomap_pars_fragment: aomap_pars_fragment,
9685
+ begin_vertex: begin_vertex,
9686
+ beginnormal_vertex: beginnormal_vertex,
9687
+ bsdfs: bsdfs,
9688
+ bumpmap_pars_fragment: bumpmap_pars_fragment,
9689
+ clipping_planes_fragment: clipping_planes_fragment,
9690
+ clipping_planes_pars_fragment: clipping_planes_pars_fragment,
9691
+ clipping_planes_pars_vertex: clipping_planes_pars_vertex,
9692
+ clipping_planes_vertex: clipping_planes_vertex,
9693
+ color_fragment: color_fragment,
9694
+ color_pars_fragment: color_pars_fragment,
9695
+ color_pars_vertex: color_pars_vertex,
9696
+ color_vertex: color_vertex,
9697
+ common: common,
9698
+ cube_uv_reflection_fragment: cube_uv_reflection_fragment,
9699
+ defaultnormal_vertex: defaultnormal_vertex,
9700
+ displacementmap_pars_vertex: displacementmap_pars_vertex,
9701
+ displacementmap_vertex: displacementmap_vertex,
9702
+ emissivemap_fragment: emissivemap_fragment,
9703
+ emissivemap_pars_fragment: emissivemap_pars_fragment,
9704
+ encodings_fragment: encodings_fragment,
9705
+ encodings_pars_fragment: encodings_pars_fragment,
9706
+ envmap_fragment: envmap_fragment,
9707
+ envmap_pars_fragment: envmap_pars_fragment,
9708
+ envmap_pars_vertex: envmap_pars_vertex,
9709
+ envmap_vertex: envmap_vertex,
9710
+ fog_vertex: fog_vertex,
9711
+ fog_pars_vertex: fog_pars_vertex,
9712
+ fog_fragment: fog_fragment,
9713
+ fog_pars_fragment: fog_pars_fragment,
9714
+ gradientmap_pars_fragment: gradientmap_pars_fragment,
9715
+ lightmap_fragment: lightmap_fragment,
9716
+ lightmap_pars_fragment: lightmap_pars_fragment,
9717
+ lights_lambert_vertex: lights_lambert_vertex,
9718
+ lights_pars_begin: lights_pars_begin,
9719
+ lights_pars_maps: lights_pars_maps,
9720
+ lights_phong_fragment: lights_phong_fragment,
9721
+ lights_phong_pars_fragment: lights_phong_pars_fragment,
9722
+ lights_physical_fragment: lights_physical_fragment,
9723
+ lights_physical_pars_fragment: lights_physical_pars_fragment,
9724
+ lights_fragment_begin: lights_fragment_begin,
9725
+ lights_fragment_maps: lights_fragment_maps,
9726
+ lights_fragment_end: lights_fragment_end,
9727
+ logdepthbuf_fragment: logdepthbuf_fragment,
9728
+ logdepthbuf_pars_fragment: logdepthbuf_pars_fragment,
9729
+ logdepthbuf_pars_vertex: logdepthbuf_pars_vertex,
9730
+ logdepthbuf_vertex: logdepthbuf_vertex,
9731
+ map_fragment: map_fragment,
9732
+ map_pars_fragment: map_pars_fragment,
9733
+ map_particle_fragment: map_particle_fragment,
9734
+ map_particle_pars_fragment: map_particle_pars_fragment,
9735
+ metalnessmap_fragment: metalnessmap_fragment,
9736
+ metalnessmap_pars_fragment: metalnessmap_pars_fragment,
9737
+ morphnormal_vertex: morphnormal_vertex,
9738
+ morphtarget_pars_vertex: morphtarget_pars_vertex,
9739
+ morphtarget_vertex: morphtarget_vertex,
9740
+ normal_fragment_begin: normal_fragment_begin,
9741
+ normal_fragment_maps: normal_fragment_maps,
9742
+ normalmap_pars_fragment: normalmap_pars_fragment,
9743
+ packing: packing,
9744
+ premultiplied_alpha_fragment: premultiplied_alpha_fragment,
9745
+ project_vertex: project_vertex,
9746
+ dithering_fragment: dithering_fragment,
9747
+ dithering_pars_fragment: dithering_pars_fragment,
9748
+ roughnessmap_fragment: roughnessmap_fragment,
9749
+ roughnessmap_pars_fragment: roughnessmap_pars_fragment,
9750
+ shadowmap_pars_fragment: shadowmap_pars_fragment,
9751
+ shadowmap_pars_vertex: shadowmap_pars_vertex,
9752
+ shadowmap_vertex: shadowmap_vertex,
9753
+ shadowmask_pars_fragment: shadowmask_pars_fragment,
9754
+ skinbase_vertex: skinbase_vertex,
9755
+ skinning_pars_vertex: skinning_pars_vertex,
9756
+ skinning_vertex: skinning_vertex,
9757
+ skinnormal_vertex: skinnormal_vertex,
9758
+ specularmap_fragment: specularmap_fragment,
9759
+ specularmap_pars_fragment: specularmap_pars_fragment,
9760
+ tonemapping_fragment: tonemapping_fragment,
9761
+ tonemapping_pars_fragment: tonemapping_pars_fragment,
9762
+ uv_pars_fragment: uv_pars_fragment,
9763
+ uv_pars_vertex: uv_pars_vertex,
9764
+ uv_vertex: uv_vertex,
9765
+ uv2_pars_fragment: uv2_pars_fragment,
9766
+ uv2_pars_vertex: uv2_pars_vertex,
9767
+ uv2_vertex: uv2_vertex,
9768
+ worldpos_vertex: worldpos_vertex,
9769
+
9770
+ cube_frag: cube_frag,
9771
+ cube_vert: cube_vert,
9772
+ depth_frag: depth_frag,
9773
+ depth_vert: depth_vert,
9774
+ distanceRGBA_frag: distanceRGBA_frag,
9775
+ distanceRGBA_vert: distanceRGBA_vert,
9776
+ equirect_frag: equirect_frag,
9777
+ equirect_vert: equirect_vert,
9778
+ linedashed_frag: linedashed_frag,
9779
+ linedashed_vert: linedashed_vert,
9780
+ meshbasic_frag: meshbasic_frag,
9781
+ meshbasic_vert: meshbasic_vert,
9782
+ meshlambert_frag: meshlambert_frag,
9783
+ meshlambert_vert: meshlambert_vert,
9784
+ meshphong_frag: meshphong_frag,
9785
+ meshphong_vert: meshphong_vert,
9786
+ meshphysical_frag: meshphysical_frag,
9787
+ meshphysical_vert: meshphysical_vert,
9788
+ normal_frag: normal_frag,
9789
+ normal_vert: normal_vert,
9790
+ points_frag: points_frag,
9791
+ points_vert: points_vert,
9792
+ shadow_frag: shadow_frag,
9793
+ shadow_vert: shadow_vert
9794
+ };
9795
+
9796
+ /**
9797
+ * Uniform Utilities
9798
+ */
9799
+
9800
+ var UniformsUtils = {
9801
+
9802
+ merge: function (uniforms) {
9803
+
9804
+ var merged = {};
9805
+
9806
+ for (var u = 0; u < uniforms.length; u++) {
9807
+
9808
+ var tmp = this.clone(uniforms[u]);
9809
+
9810
+ for (var p in tmp) {
9811
+
9812
+ merged[p] = tmp[p];
9813
+
9814
+ }
9815
+
9816
+ }
9817
+
9818
+ return merged;
9819
+
9820
+ },
9821
+
9822
+ clone: function (uniforms_src) {
9823
+
9824
+ var uniforms_dst = {};
9825
+
9826
+ for (var u in uniforms_src) {
9827
+
9828
+ uniforms_dst[u] = {};
9829
+
9830
+ for (var p in uniforms_src[u]) {
9831
+
9832
+ var parameter_src = uniforms_src[u][p];
9833
+
9834
+ if (parameter_src && (parameter_src.isColor ||
9835
+ parameter_src.isMatrix3 || parameter_src.isMatrix4 ||
9836
+ parameter_src.isVector2 || parameter_src.isVector3 || parameter_src.isVector4 ||
9837
+ parameter_src.isTexture)) {
9838
+
9839
+ uniforms_dst[u][p] = parameter_src.clone();
9840
+
9841
+ } else if (Array.isArray(parameter_src)) {
9842
+
9843
+ uniforms_dst[u][p] = parameter_src.slice();
9844
+
9845
+ } else {
9846
+
9847
+ uniforms_dst[u][p] = parameter_src;
9848
+
9849
+ }
9850
+
9851
+ }
9852
+
9853
+ }
9854
+
9855
+ return uniforms_dst;
9856
+
9857
+ }
9858
+
9859
+ };
9860
+
9861
+ /**
9862
+ * @author mrdoob / http://mrdoob.com/
9863
+ */
9864
+
9865
+ var ColorKeywords = {
9866
+ 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,
9867
+ 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,
9868
+ 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,
9869
+ 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B,
9870
+ 'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B,
9871
+ 'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F,
9872
+ 'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3,
9873
+ 'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222,
9874
+ 'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700,
9875
+ 'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4,
9876
+ 'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00,
9877
+ 'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3,
9878
+ 'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA,
9879
+ 'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32,
9880
+ 'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3,
9881
+ 'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC,
9882
+ 'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD,
9883
+ 'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6,
9884
+ 'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9,
9885
+ 'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F,
9886
+ 'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE,
9887
+ 'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA,
9888
+ 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,
9889
+ 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32
9890
+ };
9891
+
9892
+ function Color(r, g, b) {
9893
+
9894
+ if (g === undefined && b === undefined) {
9895
+
9896
+ // r is THREE.Color, hex or string
9897
+ return this.set(r);
9898
+
9899
+ }
9900
+
9901
+ return this.setRGB(r, g, b);
9902
+
9903
+ }
9904
+
9905
+ Object.assign(Color.prototype, {
9906
+
9907
+ isColor: true,
9908
+
9909
+ r: 1, g: 1, b: 1,
9910
+
9911
+ set: function (value) {
9912
+
9913
+ if (value && value.isColor) {
9914
+
9915
+ this.copy(value);
9916
+
9917
+ } else if (typeof value === 'number') {
9918
+
9919
+ this.setHex(value);
9920
+
9921
+ } else if (typeof value === 'string') {
9922
+
9923
+ this.setStyle(value);
9924
+
9925
+ }
9926
+
9927
+ return this;
9928
+
9929
+ },
9930
+
9931
+ setScalar: function (scalar) {
9932
+
9933
+ this.r = scalar;
9934
+ this.g = scalar;
9935
+ this.b = scalar;
9936
+
9937
+ return this;
9938
+
9939
+ },
9940
+
9941
+ setHex: function (hex) {
9942
+
9943
+ hex = Math.floor(hex);
9944
+
9945
+ this.r = (hex >> 16 & 255) / 255;
9946
+ this.g = (hex >> 8 & 255) / 255;
9947
+ this.b = (hex & 255) / 255;
9948
+
9949
+ return this;
9950
+
9951
+ },
9952
+
9953
+ setRGB: function (r, g, b) {
9954
+
9955
+ this.r = r;
9956
+ this.g = g;
9957
+ this.b = b;
9958
+
9959
+ return this;
9960
+
9961
+ },
9962
+
9963
+ setHSL: function () {
9964
+
9965
+ function hue2rgb(p, q, t) {
9966
+
9967
+ if (t < 0) t += 1;
9968
+ if (t > 1) t -= 1;
9969
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
9970
+ if (t < 1 / 2) return q;
9971
+ if (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t);
9972
+ return p;
9973
+
9974
+ }
9975
+
9976
+ return function setHSL(h, s, l) {
9977
+
9978
+ // h,s,l ranges are in 0.0 - 1.0
9979
+ h = _Math.euclideanModulo(h, 1);
9980
+ s = _Math.clamp(s, 0, 1);
9981
+ l = _Math.clamp(l, 0, 1);
9982
+
9983
+ if (s === 0) {
9984
+
9985
+ this.r = this.g = this.b = l;
9986
+
9987
+ } else {
9988
+
9989
+ var p = l <= 0.5 ? l * (1 + s) : l + s - (l * s);
9990
+ var q = (2 * l) - p;
9991
+
9992
+ this.r = hue2rgb(q, p, h + 1 / 3);
9993
+ this.g = hue2rgb(q, p, h);
9994
+ this.b = hue2rgb(q, p, h - 1 / 3);
9995
+
9996
+ }
9997
+
9998
+ return this;
9999
+
10000
+ };
10001
+
10002
+ }(),
10003
+
10004
+ setStyle: function (style) {
10005
+
10006
+ function handleAlpha(string) {
10007
+
10008
+ if (string === undefined) return;
10009
+
10010
+ if (parseFloat(string) < 1) {
10011
+
10012
+ console.warn('THREE.Color: Alpha component of ' + style + ' will be ignored.');
10013
+
10014
+ }
10015
+
10016
+ }
10017
+
10018
+
10019
+ var m;
10020
+
10021
+ if (m = /^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(style)) {
10022
+
10023
+ // rgb / hsl
10024
+
10025
+ var color;
10026
+ var name = m[1];
10027
+ var components = m[2];
10028
+
10029
+ switch (name) {
10030
+
10031
+ case 'rgb':
10032
+ case 'rgba':
10033
+
10034
+ if (color = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
10035
+
10036
+ // rgb(255,0,0) rgba(255,0,0,0.5)
10037
+ this.r = Math.min(255, parseInt(color[1], 10)) / 255;
10038
+ this.g = Math.min(255, parseInt(color[2], 10)) / 255;
10039
+ this.b = Math.min(255, parseInt(color[3], 10)) / 255;
10040
+
10041
+ handleAlpha(color[5]);
10042
+
10043
+ return this;
10044
+
10045
+ }
10046
+
10047
+ if (color = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
10048
+
10049
+ // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)
10050
+ this.r = Math.min(100, parseInt(color[1], 10)) / 100;
10051
+ this.g = Math.min(100, parseInt(color[2], 10)) / 100;
10052
+ this.b = Math.min(100, parseInt(color[3], 10)) / 100;
10053
+
10054
+ handleAlpha(color[5]);
10055
+
10056
+ return this;
10057
+
10058
+ }
10059
+
10060
+ break;
10061
+
10062
+ case 'hsl':
10063
+ case 'hsla':
10064
+
10065
+ if (color = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
10066
+
10067
+ // hsl(120,50%,50%) hsla(120,50%,50%,0.5)
10068
+ var h = parseFloat(color[1]) / 360;
10069
+ var s = parseInt(color[2], 10) / 100;
10070
+ var l = parseInt(color[3], 10) / 100;
10071
+
10072
+ handleAlpha(color[5]);
10073
+
10074
+ return this.setHSL(h, s, l);
10075
+
10076
+ }
10077
+
10078
+ break;
10079
+
10080
+ }
10081
+
10082
+ } else if (m = /^\#([A-Fa-f0-9]+)$/.exec(style)) {
10083
+
10084
+ // hex color
10085
+
10086
+ var hex = m[1];
10087
+ var size = hex.length;
10088
+
10089
+ if (size === 3) {
10090
+
10091
+ // #ff0
10092
+ this.r = parseInt(hex.charAt(0) + hex.charAt(0), 16) / 255;
10093
+ this.g = parseInt(hex.charAt(1) + hex.charAt(1), 16) / 255;
10094
+ this.b = parseInt(hex.charAt(2) + hex.charAt(2), 16) / 255;
10095
+
10096
+ return this;
10097
+
10098
+ } else if (size === 6) {
10099
+
10100
+ // #ff0000
10101
+ this.r = parseInt(hex.charAt(0) + hex.charAt(1), 16) / 255;
10102
+ this.g = parseInt(hex.charAt(2) + hex.charAt(3), 16) / 255;
10103
+ this.b = parseInt(hex.charAt(4) + hex.charAt(5), 16) / 255;
10104
+
10105
+ return this;
10106
+
10107
+ }
10108
+
10109
+ }
10110
+
10111
+ if (style && style.length > 0) {
10112
+
10113
+ // color keywords
10114
+ var hex = ColorKeywords[style];
10115
+
10116
+ if (hex !== undefined) {
10117
+
10118
+ // red
10119
+ this.setHex(hex);
10120
+
10121
+ } else {
10122
+
10123
+ // unknown color
10124
+ console.warn('THREE.Color: Unknown color ' + style);
10125
+
10126
+ }
10127
+
10128
+ }
10129
+
10130
+ return this;
10131
+
10132
+ },
10133
+
10134
+ clone: function () {
10135
+
10136
+ return new this.constructor(this.r, this.g, this.b);
10137
+
10138
+ },
10139
+
10140
+ copy: function (color) {
10141
+
10142
+ this.r = color.r;
10143
+ this.g = color.g;
10144
+ this.b = color.b;
10145
+
10146
+ return this;
10147
+
10148
+ },
10149
+
10150
+ copyGammaToLinear: function (color, gammaFactor) {
10151
+
10152
+ if (gammaFactor === undefined) gammaFactor = 2.0;
10153
+
10154
+ this.r = Math.pow(color.r, gammaFactor);
10155
+ this.g = Math.pow(color.g, gammaFactor);
10156
+ this.b = Math.pow(color.b, gammaFactor);
10157
+
10158
+ return this;
10159
+
10160
+ },
10161
+
10162
+ copyLinearToGamma: function (color, gammaFactor) {
10163
+
10164
+ if (gammaFactor === undefined) gammaFactor = 2.0;
10165
+
10166
+ var safeInverse = (gammaFactor > 0) ? (1.0 / gammaFactor) : 1.0;
10167
+
10168
+ this.r = Math.pow(color.r, safeInverse);
10169
+ this.g = Math.pow(color.g, safeInverse);
10170
+ this.b = Math.pow(color.b, safeInverse);
10171
+
10172
+ return this;
10173
+
10174
+ },
10175
+
10176
+ convertGammaToLinear: function (gammaFactor) {
10177
+
10178
+ this.copyGammaToLinear(this, gammaFactor);
10179
+
10180
+ return this;
10181
+
10182
+ },
10183
+
10184
+ convertLinearToGamma: function (gammaFactor) {
10185
+
10186
+ this.copyLinearToGamma(this, gammaFactor);
10187
+
10188
+ return this;
10189
+
10190
+ },
10191
+
10192
+ getHex: function () {
10193
+
10194
+ return (this.r * 255) << 16 ^ (this.g * 255) << 8 ^ (this.b * 255) << 0;
10195
+
10196
+ },
10197
+
10198
+ getHexString: function () {
10199
+
10200
+ return ('000000' + this.getHex().toString(16)).slice(- 6);
10201
+
10202
+ },
10203
+
10204
+ getHSL: function (target) {
10205
+
10206
+ // h,s,l ranges are in 0.0 - 1.0
10207
+
10208
+ if (target === undefined) {
10209
+
10210
+ console.warn('THREE.Color: .getHSL() target is now required');
10211
+ target = { h: 0, s: 0, l: 0 };
10212
+
10213
+ }
10214
+
10215
+ var r = this.r, g = this.g, b = this.b;
10216
+
10217
+ var max = Math.max(r, g, b);
10218
+ var min = Math.min(r, g, b);
10219
+
10220
+ var hue, saturation;
10221
+ var lightness = (min + max) / 2.0;
10222
+
10223
+ if (min === max) {
10224
+
10225
+ hue = 0;
10226
+ saturation = 0;
10227
+
10228
+ } else {
10229
+
10230
+ var delta = max - min;
10231
+
10232
+ saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);
10233
+
10234
+ switch (max) {
10235
+
10236
+ case r: hue = (g - b) / delta + (g < b ? 6 : 0); break;
10237
+ case g: hue = (b - r) / delta + 2; break;
10238
+ case b: hue = (r - g) / delta + 4; break;
10239
+
10240
+ }
10241
+
10242
+ hue /= 6;
10243
+
10244
+ }
10245
+
10246
+ target.h = hue;
10247
+ target.s = saturation;
10248
+ target.l = lightness;
10249
+
10250
+ return target;
10251
+
10252
+ },
10253
+
10254
+ getStyle: function () {
10255
+
10256
+ return 'rgb(' + ((this.r * 255) | 0) + ',' + ((this.g * 255) | 0) + ',' + ((this.b * 255) | 0) + ')';
10257
+
10258
+ },
10259
+
10260
+ offsetHSL: function () {
10261
+
10262
+ var hsl = {};
10263
+
10264
+ return function (h, s, l) {
10265
+
10266
+ this.getHSL(hsl);
10267
+
10268
+ hsl.h += h; hsl.s += s; hsl.l += l;
10269
+
10270
+ this.setHSL(hsl.h, hsl.s, hsl.l);
10271
+
10272
+ return this;
10273
+
10274
+ };
10275
+
10276
+ }(),
10277
+
10278
+ add: function (color) {
10279
+
10280
+ this.r += color.r;
10281
+ this.g += color.g;
10282
+ this.b += color.b;
10283
+
10284
+ return this;
10285
+
10286
+ },
10287
+
10288
+ addColors: function (color1, color2) {
10289
+
10290
+ this.r = color1.r + color2.r;
10291
+ this.g = color1.g + color2.g;
10292
+ this.b = color1.b + color2.b;
10293
+
10294
+ return this;
10295
+
10296
+ },
10297
+
10298
+ addScalar: function (s) {
10299
+
10300
+ this.r += s;
10301
+ this.g += s;
10302
+ this.b += s;
10303
+
10304
+ return this;
10305
+
10306
+ },
10307
+
10308
+ sub: function (color) {
10309
+
10310
+ this.r = Math.max(0, this.r - color.r);
10311
+ this.g = Math.max(0, this.g - color.g);
10312
+ this.b = Math.max(0, this.b - color.b);
10313
+
10314
+ return this;
10315
+
10316
+ },
10317
+
10318
+ multiply: function (color) {
10319
+
10320
+ this.r *= color.r;
10321
+ this.g *= color.g;
10322
+ this.b *= color.b;
10323
+
10324
+ return this;
10325
+
10326
+ },
10327
+
10328
+ multiplyScalar: function (s) {
10329
+
10330
+ this.r *= s;
10331
+ this.g *= s;
10332
+ this.b *= s;
10333
+
10334
+ return this;
10335
+
10336
+ },
10337
+
10338
+ lerp: function (color, alpha) {
10339
+
10340
+ this.r += (color.r - this.r) * alpha;
10341
+ this.g += (color.g - this.g) * alpha;
10342
+ this.b += (color.b - this.b) * alpha;
10343
+
10344
+ return this;
10345
+
10346
+ },
10347
+
10348
+ equals: function (c) {
10349
+
10350
+ return (c.r === this.r) && (c.g === this.g) && (c.b === this.b);
10351
+
10352
+ },
10353
+
10354
+ fromArray: function (array, offset) {
10355
+
10356
+ if (offset === undefined) offset = 0;
10357
+
10358
+ this.r = array[offset];
10359
+ this.g = array[offset + 1];
10360
+ this.b = array[offset + 2];
10361
+
10362
+ return this;
10363
+
10364
+ },
10365
+
10366
+ toArray: function (array, offset) {
10367
+
10368
+ if (array === undefined) array = [];
10369
+ if (offset === undefined) offset = 0;
10370
+
10371
+ array[offset] = this.r;
10372
+ array[offset + 1] = this.g;
10373
+ array[offset + 2] = this.b;
10374
+
10375
+ return array;
10376
+
10377
+ },
10378
+
10379
+ toJSON: function () {
10380
+
10381
+ return this.getHex();
10382
+
10383
+ }
10384
+
10385
+ });
10386
+
10387
+ /**
10388
+ * Uniforms library for shared webgl shaders
10389
+ */
10390
+
10391
+ var UniformsLib = {
10392
+
10393
+ common: {
10394
+
10395
+ diffuse: { value: new Color(0xeeeeee) },
10396
+ opacity: { value: 1.0 },
10397
+
10398
+ map: { value: null },
10399
+ uvTransform: { value: new Matrix3() },
10400
+
10401
+ alphaMap: { value: null },
10402
+
10403
+ },
10404
+
10405
+ specularmap: {
10406
+
10407
+ specularMap: { value: null },
10408
+
10409
+ },
10410
+
10411
+ envmap: {
10412
+
10413
+ envMap: { value: null },
10414
+ flipEnvMap: { value: - 1 },
10415
+ reflectivity: { value: 1.0 },
10416
+ refractionRatio: { value: 0.98 },
10417
+ maxMipLevel: { value: 0 }
10418
+
10419
+ },
10420
+
10421
+ aomap: {
10422
+
10423
+ aoMap: { value: null },
10424
+ aoMapIntensity: { value: 1 }
10425
+
10426
+ },
10427
+
10428
+ lightmap: {
10429
+
10430
+ lightMap: { value: null },
10431
+ lightMapIntensity: { value: 1 }
10432
+
10433
+ },
10434
+
10435
+ emissivemap: {
10436
+
10437
+ emissiveMap: { value: null }
10438
+
10439
+ },
10440
+
10441
+ bumpmap: {
10442
+
10443
+ bumpMap: { value: null },
10444
+ bumpScale: { value: 1 }
10445
+
10446
+ },
10447
+
10448
+ normalmap: {
10449
+
10450
+ normalMap: { value: null },
10451
+ normalScale: { value: new Vector2(1, 1) }
10452
+
10453
+ },
10454
+
10455
+ displacementmap: {
10456
+
10457
+ displacementMap: { value: null },
10458
+ displacementScale: { value: 1 },
10459
+ displacementBias: { value: 0 }
10460
+
10461
+ },
10462
+
10463
+ roughnessmap: {
10464
+
10465
+ roughnessMap: { value: null }
10466
+
10467
+ },
10468
+
10469
+ metalnessmap: {
10470
+
10471
+ metalnessMap: { value: null }
10472
+
10473
+ },
10474
+
10475
+ gradientmap: {
10476
+
10477
+ gradientMap: { value: null }
10478
+
10479
+ },
10480
+
10481
+ fog: {
10482
+
10483
+ fogDensity: { value: 0.00025 },
10484
+ fogNear: { value: 1 },
10485
+ fogFar: { value: 2000 },
10486
+ fogColor: { value: new Color(0xffffff) }
10487
+
10488
+ },
10489
+
10490
+ lights: {
10491
+
10492
+ ambientLightColor: { value: [] },
10493
+
10494
+ directionalLights: {
10495
+ value: [], properties: {
10496
+ direction: {},
10497
+ color: {},
10498
+
10499
+ shadow: {},
10500
+ shadowBias: {},
10501
+ shadowRadius: {},
10502
+ shadowMapSize: {}
10503
+ }
10504
+ },
10505
+
10506
+ directionalShadowMap: { value: [] },
10507
+ directionalShadowMatrix: { value: [] },
10508
+
10509
+ spotLights: {
10510
+ value: [], properties: {
10511
+ color: {},
10512
+ position: {},
10513
+ direction: {},
10514
+ distance: {},
10515
+ coneCos: {},
10516
+ penumbraCos: {},
10517
+ decay: {},
10518
+
10519
+ shadow: {},
10520
+ shadowBias: {},
10521
+ shadowRadius: {},
10522
+ shadowMapSize: {}
10523
+ }
10524
+ },
10525
+
10526
+ spotShadowMap: { value: [] },
10527
+ spotShadowMatrix: { value: [] },
10528
+
10529
+ pointLights: {
10530
+ value: [], properties: {
10531
+ color: {},
10532
+ position: {},
10533
+ decay: {},
10534
+ distance: {},
10535
+
10536
+ shadow: {},
10537
+ shadowBias: {},
10538
+ shadowRadius: {},
10539
+ shadowMapSize: {},
10540
+ shadowCameraNear: {},
10541
+ shadowCameraFar: {}
10542
+ }
10543
+ },
10544
+
10545
+ pointShadowMap: { value: [] },
10546
+ pointShadowMatrix: { value: [] },
10547
+
10548
+ hemisphereLights: {
10549
+ value: [], properties: {
10550
+ direction: {},
10551
+ skyColor: {},
10552
+ groundColor: {}
10553
+ }
10554
+ },
10555
+
10556
+ // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src
10557
+ rectAreaLights: {
10558
+ value: [], properties: {
10559
+ color: {},
10560
+ position: {},
10561
+ width: {},
10562
+ height: {}
10563
+ }
10564
+ }
10565
+
10566
+ },
10567
+
10568
+ points: {
10569
+
10570
+ diffuse: { value: new Color(0xeeeeee) },
10571
+ opacity: { value: 1.0 },
10572
+ size: { value: 1.0 },
10573
+ scale: { value: 1.0 },
10574
+ map: { value: null },
10575
+ uvTransform: { value: new Matrix3() }
10576
+
10577
+ }
10578
+
10579
+ };
10580
+
10581
+ /**
10582
+ * @author alteredq / http://alteredqualia.com/
10583
+ * @author mrdoob / http://mrdoob.com/
10584
+ * @author mikael emtinger / http://gomo.se/
10585
+ */
10586
+
10587
+ var ShaderLib = {
10588
+
10589
+ basic: {
10590
+
10591
+ uniforms: UniformsUtils.merge([
10592
+ UniformsLib.common,
10593
+ UniformsLib.specularmap,
10594
+ UniformsLib.envmap,
10595
+ UniformsLib.aomap,
10596
+ UniformsLib.lightmap,
10597
+ UniformsLib.fog
10598
+ ]),
10599
+
10600
+ vertexShader: ShaderChunk.meshbasic_vert,
10601
+ fragmentShader: ShaderChunk.meshbasic_frag
10602
+
10603
+ },
10604
+
10605
+ lambert: {
10606
+
10607
+ uniforms: UniformsUtils.merge([
10608
+ UniformsLib.common,
10609
+ UniformsLib.specularmap,
10610
+ UniformsLib.envmap,
10611
+ UniformsLib.aomap,
10612
+ UniformsLib.lightmap,
10613
+ UniformsLib.emissivemap,
10614
+ UniformsLib.fog,
10615
+ UniformsLib.lights,
10616
+ {
10617
+ emissive: { value: new Color(0x000000) }
10618
+ }
10619
+ ]),
10620
+
10621
+ vertexShader: ShaderChunk.meshlambert_vert,
10622
+ fragmentShader: ShaderChunk.meshlambert_frag
10623
+
10624
+ },
10625
+
10626
+ phong: {
10627
+
10628
+ uniforms: UniformsUtils.merge([
10629
+ UniformsLib.common,
10630
+ UniformsLib.specularmap,
10631
+ UniformsLib.envmap,
10632
+ UniformsLib.aomap,
10633
+ UniformsLib.lightmap,
10634
+ UniformsLib.emissivemap,
10635
+ UniformsLib.bumpmap,
10636
+ UniformsLib.normalmap,
10637
+ UniformsLib.displacementmap,
10638
+ UniformsLib.gradientmap,
10639
+ UniformsLib.fog,
10640
+ UniformsLib.lights,
10641
+ {
10642
+ emissive: { value: new Color(0x000000) },
10643
+ specular: { value: new Color(0x111111) },
10644
+ shininess: { value: 30 }
10645
+ }
10646
+ ]),
10647
+
10648
+ vertexShader: ShaderChunk.meshphong_vert,
10649
+ fragmentShader: ShaderChunk.meshphong_frag
10650
+
10651
+ },
10652
+
10653
+ standard: {
10654
+
10655
+ uniforms: UniformsUtils.merge([
10656
+ UniformsLib.common,
10657
+ UniformsLib.envmap,
10658
+ UniformsLib.aomap,
10659
+ UniformsLib.lightmap,
10660
+ UniformsLib.emissivemap,
10661
+ UniformsLib.bumpmap,
10662
+ UniformsLib.normalmap,
10663
+ UniformsLib.displacementmap,
10664
+ UniformsLib.roughnessmap,
10665
+ UniformsLib.metalnessmap,
10666
+ UniformsLib.fog,
10667
+ UniformsLib.lights,
10668
+ {
10669
+ emissive: { value: new Color(0x000000) },
10670
+ roughness: { value: 0.5 },
10671
+ metalness: { value: 0.5 },
10672
+ envMapIntensity: { value: 1 } // temporary
10673
+ }
10674
+ ]),
10675
+
10676
+ vertexShader: ShaderChunk.meshphysical_vert,
10677
+ fragmentShader: ShaderChunk.meshphysical_frag
10678
+
10679
+ },
10680
+
10681
+ points: {
10682
+
10683
+ uniforms: UniformsUtils.merge([
10684
+ UniformsLib.points,
10685
+ UniformsLib.fog
10686
+ ]),
10687
+
10688
+ vertexShader: ShaderChunk.points_vert,
10689
+ fragmentShader: ShaderChunk.points_frag
10690
+
10691
+ },
10692
+
10693
+ dashed: {
10694
+
10695
+ uniforms: UniformsUtils.merge([
10696
+ UniformsLib.common,
10697
+ UniformsLib.fog,
10698
+ {
10699
+ scale: { value: 1 },
10700
+ dashSize: { value: 1 },
10701
+ totalSize: { value: 2 }
10702
+ }
10703
+ ]),
10704
+
10705
+ vertexShader: ShaderChunk.linedashed_vert,
10706
+ fragmentShader: ShaderChunk.linedashed_frag
10707
+
10708
+ },
10709
+
10710
+ depth: {
10711
+
10712
+ uniforms: UniformsUtils.merge([
10713
+ UniformsLib.common,
10714
+ UniformsLib.displacementmap
10715
+ ]),
10716
+
10717
+ vertexShader: ShaderChunk.depth_vert,
10718
+ fragmentShader: ShaderChunk.depth_frag
10719
+
10720
+ },
10721
+
10722
+ normal: {
10723
+
10724
+ uniforms: UniformsUtils.merge([
10725
+ UniformsLib.common,
10726
+ UniformsLib.bumpmap,
10727
+ UniformsLib.normalmap,
10728
+ UniformsLib.displacementmap,
10729
+ {
10730
+ opacity: { value: 1.0 }
10731
+ }
10732
+ ]),
10733
+
10734
+ vertexShader: ShaderChunk.normal_vert,
10735
+ fragmentShader: ShaderChunk.normal_frag
10736
+
10737
+ },
10738
+
10739
+ /* -------------------------------------------------------------------------
10740
+ // Cube map shader
10741
+ ------------------------------------------------------------------------- */
10742
+
10743
+ cube: {
10744
+
10745
+ uniforms: {
10746
+ tCube: { value: null },
10747
+ tFlip: { value: - 1 },
10748
+ opacity: { value: 1.0 }
10749
+ },
10750
+
10751
+ vertexShader: ShaderChunk.cube_vert,
10752
+ fragmentShader: ShaderChunk.cube_frag
10753
+
10754
+ },
10755
+
10756
+ equirect: {
10757
+
10758
+ uniforms: {
10759
+ tEquirect: { value: null },
10760
+ },
10761
+
10762
+ vertexShader: ShaderChunk.equirect_vert,
10763
+ fragmentShader: ShaderChunk.equirect_frag
10764
+
10765
+ },
10766
+
10767
+ distanceRGBA: {
10768
+
10769
+ uniforms: UniformsUtils.merge([
10770
+ UniformsLib.common,
10771
+ UniformsLib.displacementmap,
10772
+ {
10773
+ referencePosition: { value: new Vector3() },
10774
+ nearDistance: { value: 1 },
10775
+ farDistance: { value: 1000 }
10776
+ }
10777
+ ]),
10778
+
10779
+ vertexShader: ShaderChunk.distanceRGBA_vert,
10780
+ fragmentShader: ShaderChunk.distanceRGBA_frag
10781
+
10782
+ },
10783
+
10784
+ shadow: {
10785
+
10786
+ uniforms: UniformsUtils.merge([
10787
+ UniformsLib.lights,
10788
+ UniformsLib.fog,
10789
+ {
10790
+ color: { value: new Color(0x00000) },
10791
+ opacity: { value: 1.0 }
10792
+ },
10793
+ ]),
10794
+
10795
+ vertexShader: ShaderChunk.shadow_vert,
10796
+ fragmentShader: ShaderChunk.shadow_frag
10797
+
10798
+ }
10799
+
10800
+ };
10801
+
10802
+ ShaderLib.physical = {
10803
+
10804
+ uniforms: UniformsUtils.merge([
10805
+ ShaderLib.standard.uniforms,
10806
+ {
10807
+ clearCoat: { value: 0 },
10808
+ clearCoatRoughness: { value: 0 }
10809
+ }
10810
+ ]),
10811
+
10812
+ vertexShader: ShaderChunk.meshphysical_vert,
10813
+ fragmentShader: ShaderChunk.meshphysical_frag
10814
+
10815
+ };
10816
+
10817
+ /**
10818
+ * @author mrdoob / http://mrdoob.com/
10819
+ */
10820
+
10821
+ function WebGLAnimation() {
10822
+
10823
+ var context = null;
10824
+ var isAnimating = false;
10825
+ var animationLoop = null;
10826
+
10827
+ function onAnimationFrame(time, frame) {
10828
+
10829
+ if (isAnimating === false) return;
10830
+
10831
+ animationLoop(time, frame);
10832
+
10833
+ context.requestAnimationFrame(onAnimationFrame);
10834
+
10835
+ }
10836
+
10837
+ return {
10838
+
10839
+ start: function () {
10840
+
10841
+ if (isAnimating === true) return;
10842
+ if (animationLoop === null) return;
10843
+
10844
+ context.requestAnimationFrame(onAnimationFrame);
10845
+
10846
+ isAnimating = true;
10847
+
10848
+ },
10849
+
10850
+ stop: function () {
10851
+
10852
+ isAnimating = false;
10853
+
10854
+ },
10855
+
10856
+ setAnimationLoop: function (callback) {
10857
+
10858
+ animationLoop = callback;
10859
+
10860
+ },
10861
+
10862
+ setContext: function (value) {
10863
+
10864
+ context = value;
10865
+
10866
+ }
10867
+
10868
+ };
10869
+
10870
+ }
10871
+
10872
+ /**
10873
+ * @author mrdoob / http://mrdoob.com/
10874
+ */
10875
+
10876
+ function WebGLAttributes(gl) {
10877
+
10878
+ var buffers = new WeakMap();
10879
+
10880
+ function createBuffer(attribute, bufferType) {
10881
+
10882
+ var array = attribute.array;
10883
+ var usage = attribute.dynamic ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW;
10884
+
10885
+ var buffer = gl.createBuffer();
10886
+
10887
+ gl.bindBuffer(bufferType, buffer);
10888
+ gl.bufferData(bufferType, array, usage);
10889
+
10890
+ attribute.onUploadCallback();
10891
+
10892
+ var type = gl.FLOAT;
10893
+
10894
+ if (array instanceof Float32Array) {
10895
+
10896
+ type = gl.FLOAT;
10897
+
10898
+ } else if (array instanceof Float64Array) {
10899
+
10900
+ console.warn('THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.');
10901
+
10902
+ } else if (array instanceof Uint16Array) {
10903
+
10904
+ type = gl.UNSIGNED_SHORT;
10905
+
10906
+ } else if (array instanceof Int16Array) {
10907
+
10908
+ type = gl.SHORT;
10909
+
10910
+ } else if (array instanceof Uint32Array) {
10911
+
10912
+ type = gl.UNSIGNED_INT;
10913
+
10914
+ } else if (array instanceof Int32Array) {
10915
+
10916
+ type = gl.INT;
10917
+
10918
+ } else if (array instanceof Int8Array) {
10919
+
10920
+ type = gl.BYTE;
10921
+
10922
+ } else if (array instanceof Uint8Array) {
10923
+
10924
+ type = gl.UNSIGNED_BYTE;
10925
+
10926
+ }
10927
+
10928
+ return {
10929
+ buffer: buffer,
10930
+ type: type,
10931
+ bytesPerElement: array.BYTES_PER_ELEMENT,
10932
+ version: attribute.version
10933
+ };
10934
+
10935
+ }
10936
+
10937
+ function updateBuffer(buffer, attribute, bufferType) {
10938
+
10939
+ var array = attribute.array;
10940
+ var updateRange = attribute.updateRange;
10941
+
10942
+ gl.bindBuffer(bufferType, buffer);
10943
+
10944
+ if (attribute.dynamic === false) {
10945
+
10946
+ gl.bufferData(bufferType, array, gl.STATIC_DRAW);
10947
+
10948
+ } else if (updateRange.count === - 1) {
10949
+
10950
+ // Not using update ranges
10951
+
10952
+ gl.bufferSubData(bufferType, 0, array);
10953
+
10954
+ } else if (updateRange.count === 0) {
10955
+
10956
+ console.error('THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.');
10957
+
10958
+ } else {
10959
+
10960
+ gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,
10961
+ array.subarray(updateRange.offset, updateRange.offset + updateRange.count));
10962
+
10963
+ updateRange.count = - 1; // reset range
10964
+
10965
+ }
10966
+
10967
+ }
10968
+
10969
+ //
10970
+
10971
+ function get(attribute) {
10972
+
10973
+ if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;
10974
+
10975
+ return buffers.get(attribute);
10976
+
10977
+ }
10978
+
10979
+ function remove(attribute) {
10980
+
10981
+ if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;
10982
+
10983
+ var data = buffers.get(attribute);
10984
+
10985
+ if (data) {
10986
+
10987
+ gl.deleteBuffer(data.buffer);
10988
+
10989
+ buffers.delete(attribute);
10990
+
10991
+ }
10992
+
10993
+ }
10994
+
10995
+ function update(attribute, bufferType) {
10996
+
10997
+ if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;
10998
+
10999
+ var data = buffers.get(attribute);
11000
+
11001
+ if (data === undefined) {
11002
+
11003
+ buffers.set(attribute, createBuffer(attribute, bufferType));
11004
+
11005
+ } else if (data.version < attribute.version) {
11006
+
11007
+ updateBuffer(data.buffer, attribute, bufferType);
11008
+
11009
+ data.version = attribute.version;
11010
+
11011
+ }
11012
+
11013
+ }
11014
+
11015
+ return {
11016
+
11017
+ get: get,
11018
+ remove: remove,
11019
+ update: update
11020
+
11021
+ };
11022
+
11023
+ }
11024
+
11025
+ /**
11026
+ * @author mrdoob / http://mrdoob.com/
11027
+ * @author WestLangley / http://github.com/WestLangley
11028
+ * @author bhouston / http://clara.io
11029
+ */
11030
+
11031
+ function Euler(x, y, z, order) {
11032
+
11033
+ this._x = x || 0;
11034
+ this._y = y || 0;
11035
+ this._z = z || 0;
11036
+ this._order = order || Euler.DefaultOrder;
11037
+
11038
+ }
11039
+
11040
+ Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'];
11041
+
11042
+ Euler.DefaultOrder = 'XYZ';
11043
+
11044
+ Object.defineProperties(Euler.prototype, {
11045
+
11046
+ x: {
11047
+
11048
+ get: function () {
11049
+
11050
+ return this._x;
11051
+
11052
+ },
11053
+
11054
+ set: function (value) {
11055
+
11056
+ this._x = value;
11057
+ this.onChangeCallback();
11058
+
11059
+ }
11060
+
11061
+ },
11062
+
11063
+ y: {
11064
+
11065
+ get: function () {
11066
+
11067
+ return this._y;
11068
+
11069
+ },
11070
+
11071
+ set: function (value) {
11072
+
11073
+ this._y = value;
11074
+ this.onChangeCallback();
11075
+
11076
+ }
11077
+
11078
+ },
11079
+
11080
+ z: {
11081
+
11082
+ get: function () {
11083
+
11084
+ return this._z;
11085
+
11086
+ },
11087
+
11088
+ set: function (value) {
11089
+
11090
+ this._z = value;
11091
+ this.onChangeCallback();
11092
+
11093
+ }
11094
+
11095
+ },
11096
+
11097
+ order: {
11098
+
11099
+ get: function () {
11100
+
11101
+ return this._order;
11102
+
11103
+ },
11104
+
11105
+ set: function (value) {
11106
+
11107
+ this._order = value;
11108
+ this.onChangeCallback();
11109
+
11110
+ }
11111
+
11112
+ }
11113
+
11114
+ });
11115
+
11116
+ Object.assign(Euler.prototype, {
11117
+
11118
+ isEuler: true,
11119
+
11120
+ set: function (x, y, z, order) {
11121
+
11122
+ this._x = x;
11123
+ this._y = y;
11124
+ this._z = z;
11125
+ this._order = order || this._order;
11126
+
11127
+ this.onChangeCallback();
11128
+
11129
+ return this;
11130
+
11131
+ },
11132
+
11133
+ clone: function () {
11134
+
11135
+ return new this.constructor(this._x, this._y, this._z, this._order);
11136
+
11137
+ },
11138
+
11139
+ copy: function (euler) {
11140
+
11141
+ this._x = euler._x;
11142
+ this._y = euler._y;
11143
+ this._z = euler._z;
11144
+ this._order = euler._order;
11145
+
11146
+ this.onChangeCallback();
11147
+
11148
+ return this;
11149
+
11150
+ },
11151
+
11152
+ setFromRotationMatrix: function (m, order, update) {
11153
+
11154
+ var clamp = _Math.clamp;
11155
+
11156
+ // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
11157
+
11158
+ var te = m.elements;
11159
+ var m11 = te[0], m12 = te[4], m13 = te[8];
11160
+ var m21 = te[1], m22 = te[5], m23 = te[9];
11161
+ var m31 = te[2], m32 = te[6], m33 = te[10];
11162
+
11163
+ order = order || this._order;
11164
+
11165
+ if (order === 'XYZ') {
11166
+
11167
+ this._y = Math.asin(clamp(m13, - 1, 1));
11168
+
11169
+ if (Math.abs(m13) < 0.99999) {
11170
+
11171
+ this._x = Math.atan2(- m23, m33);
11172
+ this._z = Math.atan2(- m12, m11);
11173
+
11174
+ } else {
11175
+
11176
+ this._x = Math.atan2(m32, m22);
11177
+ this._z = 0;
11178
+
11179
+ }
11180
+
11181
+ } else if (order === 'YXZ') {
11182
+
11183
+ this._x = Math.asin(- clamp(m23, - 1, 1));
11184
+
11185
+ if (Math.abs(m23) < 0.99999) {
11186
+
11187
+ this._y = Math.atan2(m13, m33);
11188
+ this._z = Math.atan2(m21, m22);
11189
+
11190
+ } else {
11191
+
11192
+ this._y = Math.atan2(- m31, m11);
11193
+ this._z = 0;
11194
+
11195
+ }
11196
+
11197
+ } else if (order === 'ZXY') {
11198
+
11199
+ this._x = Math.asin(clamp(m32, - 1, 1));
11200
+
11201
+ if (Math.abs(m32) < 0.99999) {
11202
+
11203
+ this._y = Math.atan2(- m31, m33);
11204
+ this._z = Math.atan2(- m12, m22);
11205
+
11206
+ } else {
11207
+
11208
+ this._y = 0;
11209
+ this._z = Math.atan2(m21, m11);
11210
+
11211
+ }
11212
+
11213
+ } else if (order === 'ZYX') {
11214
+
11215
+ this._y = Math.asin(- clamp(m31, - 1, 1));
11216
+
11217
+ if (Math.abs(m31) < 0.99999) {
11218
+
11219
+ this._x = Math.atan2(m32, m33);
11220
+ this._z = Math.atan2(m21, m11);
11221
+
11222
+ } else {
11223
+
11224
+ this._x = 0;
11225
+ this._z = Math.atan2(- m12, m22);
11226
+
11227
+ }
11228
+
11229
+ } else if (order === 'YZX') {
11230
+
11231
+ this._z = Math.asin(clamp(m21, - 1, 1));
11232
+
11233
+ if (Math.abs(m21) < 0.99999) {
11234
+
11235
+ this._x = Math.atan2(- m23, m22);
11236
+ this._y = Math.atan2(- m31, m11);
11237
+
11238
+ } else {
11239
+
11240
+ this._x = 0;
11241
+ this._y = Math.atan2(m13, m33);
11242
+
11243
+ }
11244
+
11245
+ } else if (order === 'XZY') {
11246
+
11247
+ this._z = Math.asin(- clamp(m12, - 1, 1));
11248
+
11249
+ if (Math.abs(m12) < 0.99999) {
11250
+
11251
+ this._x = Math.atan2(m32, m22);
11252
+ this._y = Math.atan2(m13, m11);
11253
+
11254
+ } else {
11255
+
11256
+ this._x = Math.atan2(- m23, m33);
11257
+ this._y = 0;
11258
+
11259
+ }
11260
+
11261
+ } else {
11262
+
11263
+ console.warn('THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + order);
11264
+
11265
+ }
11266
+
11267
+ this._order = order;
11268
+
11269
+ if (update !== false) this.onChangeCallback();
11270
+
11271
+ return this;
11272
+
11273
+ },
11274
+
11275
+ setFromQuaternion: function () {
11276
+
11277
+ var matrix = new Matrix4();
11278
+
11279
+ return function setFromQuaternion(q, order, update) {
11280
+
11281
+ matrix.makeRotationFromQuaternion(q);
11282
+
11283
+ return this.setFromRotationMatrix(matrix, order, update);
11284
+
11285
+ };
11286
+
11287
+ }(),
11288
+
11289
+ setFromVector3: function (v, order) {
11290
+
11291
+ return this.set(v.x, v.y, v.z, order || this._order);
11292
+
11293
+ },
11294
+
11295
+ reorder: function () {
11296
+
11297
+ // WARNING: this discards revolution information -bhouston
11298
+
11299
+ var q = new Quaternion();
11300
+
11301
+ return function reorder(newOrder) {
11302
+
11303
+ q.setFromEuler(this);
11304
+
11305
+ return this.setFromQuaternion(q, newOrder);
11306
+
11307
+ };
11308
+
11309
+ }(),
11310
+
11311
+ equals: function (euler) {
11312
+
11313
+ return (euler._x === this._x) && (euler._y === this._y) && (euler._z === this._z) && (euler._order === this._order);
11314
+
11315
+ },
11316
+
11317
+ fromArray: function (array) {
11318
+
11319
+ this._x = array[0];
11320
+ this._y = array[1];
11321
+ this._z = array[2];
11322
+ if (array[3] !== undefined) this._order = array[3];
11323
+
11324
+ this.onChangeCallback();
11325
+
11326
+ return this;
11327
+
11328
+ },
11329
+
11330
+ toArray: function (array, offset) {
11331
+
11332
+ if (array === undefined) array = [];
11333
+ if (offset === undefined) offset = 0;
11334
+
11335
+ array[offset] = this._x;
11336
+ array[offset + 1] = this._y;
11337
+ array[offset + 2] = this._z;
11338
+ array[offset + 3] = this._order;
11339
+
11340
+ return array;
11341
+
11342
+ },
11343
+
11344
+ toVector3: function (optionalResult) {
11345
+
11346
+ if (optionalResult) {
11347
+
11348
+ return optionalResult.set(this._x, this._y, this._z);
11349
+
11350
+ } else {
11351
+
11352
+ return new Vector3(this._x, this._y, this._z);
11353
+
11354
+ }
11355
+
11356
+ },
11357
+
11358
+ onChange: function (callback) {
11359
+
11360
+ this.onChangeCallback = callback;
11361
+
11362
+ return this;
11363
+
11364
+ },
11365
+
11366
+ onChangeCallback: function () { }
11367
+
11368
+ });
11369
+
11370
+ /**
11371
+ * @author mrdoob / http://mrdoob.com/
11372
+ */
11373
+
11374
+ function Layers() {
11375
+
11376
+ this.mask = 1 | 0;
11377
+
11378
+ }
11379
+
11380
+ Object.assign(Layers.prototype, {
11381
+
11382
+ set: function (channel) {
11383
+
11384
+ this.mask = 1 << channel | 0;
11385
+
11386
+ },
11387
+
11388
+ enable: function (channel) {
11389
+
11390
+ this.mask |= 1 << channel | 0;
11391
+
11392
+ },
11393
+
11394
+ toggle: function (channel) {
11395
+
11396
+ this.mask ^= 1 << channel | 0;
11397
+
11398
+ },
11399
+
11400
+ disable: function (channel) {
11401
+
11402
+ this.mask &= ~(1 << channel | 0);
11403
+
11404
+ },
11405
+
11406
+ test: function (layers) {
11407
+
11408
+ return (this.mask & layers.mask) !== 0;
11409
+
11410
+ }
11411
+
11412
+ });
11413
+
11414
+ /**
11415
+ * @author mrdoob / http://mrdoob.com/
11416
+ * @author mikael emtinger / http://gomo.se/
11417
+ * @author alteredq / http://alteredqualia.com/
11418
+ * @author WestLangley / http://github.com/WestLangley
11419
+ * @author elephantatwork / www.elephantatwork.ch
11420
+ */
11421
+
11422
+ var object3DId = 0;
11423
+
11424
+ function Object3D() {
11425
+
11426
+ Object.defineProperty(this, 'id', { value: object3DId++ });
11427
+
11428
+ this.uuid = _Math.generateUUID();
11429
+
11430
+ this.name = '';
11431
+ this.type = 'Object3D';
11432
+
11433
+ this.parent = null;
11434
+ this.children = [];
11435
+
11436
+ this.up = Object3D.DefaultUp.clone();
11437
+
11438
+ var position = new Vector3();
11439
+ var rotation = new Euler();
11440
+ var quaternion = new Quaternion();
11441
+ var scale = new Vector3(1, 1, 1);
11442
+
11443
+ function onRotationChange() {
11444
+
11445
+ quaternion.setFromEuler(rotation, false);
11446
+
11447
+ }
11448
+
11449
+ function onQuaternionChange() {
11450
+
11451
+ rotation.setFromQuaternion(quaternion, undefined, false);
11452
+
11453
+ }
11454
+
11455
+ rotation.onChange(onRotationChange);
11456
+ quaternion.onChange(onQuaternionChange);
11457
+
11458
+ Object.defineProperties(this, {
11459
+ position: {
11460
+ enumerable: true,
11461
+ value: position
11462
+ },
11463
+ rotation: {
11464
+ enumerable: true,
11465
+ value: rotation
11466
+ },
11467
+ quaternion: {
11468
+ enumerable: true,
11469
+ value: quaternion
11470
+ },
11471
+ scale: {
11472
+ enumerable: true,
11473
+ value: scale
11474
+ },
11475
+ modelViewMatrix: {
11476
+ value: new Matrix4()
11477
+ },
11478
+ normalMatrix: {
11479
+ value: new Matrix3()
11480
+ }
11481
+ });
11482
+
11483
+ this.matrix = new Matrix4();
11484
+ this.matrixWorld = new Matrix4();
11485
+
11486
+ this.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate;
11487
+ this.matrixWorldNeedsUpdate = false;
11488
+
11489
+ this.layers = new Layers();
11490
+ this.visible = true;
11491
+
11492
+ this.castShadow = false;
11493
+ this.receiveShadow = false;
11494
+
11495
+ this.frustumCulled = true;
11496
+ this.renderOrder = 0;
11497
+
11498
+ this.userData = {};
11499
+
11500
+ }
11501
+
11502
+ Object3D.DefaultUp = new Vector3(0, 1, 0);
11503
+ Object3D.DefaultMatrixAutoUpdate = true;
11504
+
11505
+ Object3D.prototype = Object.assign(Object.create(EventDispatcher.prototype), {
11506
+
11507
+ constructor: Object3D,
11508
+
11509
+ isObject3D: true,
11510
+
11511
+ onBeforeRender: function () { },
11512
+ onAfterRender: function () { },
11513
+
11514
+ applyMatrix: function (matrix) {
11515
+
11516
+ this.matrix.multiplyMatrices(matrix, this.matrix);
11517
+
11518
+ this.matrix.decompose(this.position, this.quaternion, this.scale);
11519
+
11520
+ },
11521
+
11522
+ applyQuaternion: function (q) {
11523
+
11524
+ this.quaternion.premultiply(q);
11525
+
11526
+ return this;
11527
+
11528
+ },
11529
+
11530
+ setRotationFromAxisAngle: function (axis, angle) {
11531
+
11532
+ // assumes axis is normalized
11533
+
11534
+ this.quaternion.setFromAxisAngle(axis, angle);
11535
+
11536
+ },
11537
+
11538
+ setRotationFromEuler: function (euler) {
11539
+
11540
+ this.quaternion.setFromEuler(euler, true);
11541
+
11542
+ },
11543
+
11544
+ setRotationFromMatrix: function (m) {
11545
+
11546
+ // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
11547
+
11548
+ this.quaternion.setFromRotationMatrix(m);
11549
+
11550
+ },
11551
+
11552
+ setRotationFromQuaternion: function (q) {
11553
+
11554
+ // assumes q is normalized
11555
+
11556
+ this.quaternion.copy(q);
11557
+
11558
+ },
11559
+
11560
+ rotateOnAxis: function () {
11561
+
11562
+ // rotate object on axis in object space
11563
+ // axis is assumed to be normalized
11564
+
11565
+ var q1 = new Quaternion();
11566
+
11567
+ return function rotateOnAxis(axis, angle) {
11568
+
11569
+ q1.setFromAxisAngle(axis, angle);
11570
+
11571
+ this.quaternion.multiply(q1);
11572
+
11573
+ return this;
11574
+
11575
+ };
11576
+
11577
+ }(),
11578
+
11579
+ rotateOnWorldAxis: function () {
11580
+
11581
+ // rotate object on axis in world space
11582
+ // axis is assumed to be normalized
11583
+ // method assumes no rotated parent
11584
+
11585
+ var q1 = new Quaternion();
11586
+
11587
+ return function rotateOnWorldAxis(axis, angle) {
11588
+
11589
+ q1.setFromAxisAngle(axis, angle);
11590
+
11591
+ this.quaternion.premultiply(q1);
11592
+
11593
+ return this;
11594
+
11595
+ };
11596
+
11597
+ }(),
11598
+
11599
+ rotateX: function () {
11600
+
11601
+ var v1 = new Vector3(1, 0, 0);
11602
+
11603
+ return function rotateX(angle) {
11604
+
11605
+ return this.rotateOnAxis(v1, angle);
11606
+
11607
+ };
11608
+
11609
+ }(),
11610
+
11611
+ rotateY: function () {
11612
+
11613
+ var v1 = new Vector3(0, 1, 0);
11614
+
11615
+ return function rotateY(angle) {
11616
+
11617
+ return this.rotateOnAxis(v1, angle);
11618
+
11619
+ };
11620
+
11621
+ }(),
11622
+
11623
+ rotateZ: function () {
11624
+
11625
+ var v1 = new Vector3(0, 0, 1);
11626
+
11627
+ return function rotateZ(angle) {
11628
+
11629
+ return this.rotateOnAxis(v1, angle);
11630
+
11631
+ };
11632
+
11633
+ }(),
11634
+
11635
+ translateOnAxis: function () {
11636
+
11637
+ // translate object by distance along axis in object space
11638
+ // axis is assumed to be normalized
11639
+
11640
+ var v1 = new Vector3();
11641
+
11642
+ return function translateOnAxis(axis, distance) {
11643
+
11644
+ v1.copy(axis).applyQuaternion(this.quaternion);
11645
+
11646
+ this.position.add(v1.multiplyScalar(distance));
11647
+
11648
+ return this;
11649
+
11650
+ };
11651
+
11652
+ }(),
11653
+
11654
+ translateX: function () {
11655
+
11656
+ var v1 = new Vector3(1, 0, 0);
11657
+
11658
+ return function translateX(distance) {
11659
+
11660
+ return this.translateOnAxis(v1, distance);
11661
+
11662
+ };
11663
+
11664
+ }(),
11665
+
11666
+ translateY: function () {
11667
+
11668
+ var v1 = new Vector3(0, 1, 0);
11669
+
11670
+ return function translateY(distance) {
11671
+
11672
+ return this.translateOnAxis(v1,