diff --git a/openvidu-server/src/main/resources/static/3rdpartylicenses.txt b/openvidu-server/src/main/resources/static/3rdpartylicenses.txt new file mode 100644 index 00000000..a1272303 --- /dev/null +++ b/openvidu-server/src/main/resources/static/3rdpartylicenses.txt @@ -0,0 +1,718 @@ +core-js@2.5.7 +MIT +Copyright (c) 2014-2018 Denis Pushkarev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +zone.js@0.8.26 +MIT +The MIT License + +Copyright (c) 2016-2018 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +events@1.1.1 +MIT +MIT + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +openvidu-browser@2.1.0 +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +wolfy87-eventemitter@5.2.4 +Unlicense +Unlicense + +freeice@2.2.0 +MIT +MIT + +inherits@2.0.3 +ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +ua-parser-js@0.7.18 +(GPL-2.0 OR MIT) +(GPL-2.0 OR MIT) + +uuid@3.2.1 +MIT +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +hark@1.2.0 +MIT +MIT + +tslib@1.9.2 +Apache-2.0 +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +merge@1.2.0 +MIT +The MIT License (MIT) + +Copyright (c) 2014 yeikos - http://www.yeikos.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +sdp-translator@0.1.24 +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +sdp-transform@1.5.3 +MIT +(The MIT License) + +Copyright (c) 2013 Eirik Albrigtsen + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +webpack@4.8.3 +MIT +Copyright JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +normalice@1.0.1 +MIT +MIT + +platform@1.3.5 +MIT +Copyright 2014-2018 Benjamin Tan +Copyright 2011-2013 John-David Dalton + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +hammerjs@2.0.8 +MIT +The MIT License (MIT) + +Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/index.html b/openvidu-server/src/main/resources/static/index.html index 39cfd0d0..02a7ab96 100644 --- a/openvidu-server/src/main/resources/static/index.html +++ b/openvidu-server/src/main/resources/static/index.html @@ -12,12 +12,12 @@ - + - + diff --git a/openvidu-server/src/main/resources/static/inline.bundle.js b/openvidu-server/src/main/resources/static/inline.bundle.js deleted file mode 100644 index a9c61441..00000000 --- a/openvidu-server/src/main/resources/static/inline.bundle.js +++ /dev/null @@ -1,102 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ var parentJsonpFunction = window["webpackJsonp"]; -/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = [], result; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ if(executeModules) { -/******/ for(i=0; i < executeModules.length; i++) { -/******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]); -/******/ } -/******/ } -/******/ return result; -/******/ }; -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // objects to store loaded and loading chunks -/******/ var installedChunks = { -/******/ "inline": 0 -/******/ }; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // on error function for async loading -/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; -/******/ }) -/************************************************************************/ -/******/ ([]); -//# sourceMappingURL=inline.bundle.js.map \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/inline.bundle.js.map b/openvidu-server/src/main/resources/static/inline.bundle.js.map deleted file mode 100644 index 612c58dc..00000000 --- a/openvidu-server/src/main/resources/static/inline.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack/bootstrap 0f3a1ac335360a2caf31"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0f3a1ac335360a2caf31"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/main.bundle.js b/openvidu-server/src/main/resources/static/main.bundle.js deleted file mode 100644 index 1282a921..00000000 --- a/openvidu-server/src/main/resources/static/main.bundle.js +++ /dev/null @@ -1,12552 +0,0 @@ -webpackJsonp(["main"],{ - -/***/ "../../../../openvidu-browser/lib/OpenVidu/Connection.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var Stream_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Stream.js"); -/** - * Represents each one of the user's connection to the session (the local one and other user's connections). - * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection - */ -var Connection = /** @class */ (function () { - /** - * @hidden - */ - function Connection(session, opts) { - this.session = session; - /** - * @hidden - */ - this.disposed = false; - var msg = "'Connection' created "; - if (!!opts) { - msg += "(remote) with 'connectionId' [" + opts.id + ']'; - } - else { - msg += '(local)'; - } - console.info(msg); - this.options = opts; - if (!!opts) { - // Connection is remote - this.connectionId = opts.id; - if (opts.metadata) { - this.data = opts.metadata; - } - if (opts.streams) { - this.initRemoteStreams(opts.streams); - } - } - this.creationTime = new Date().getTime(); - } - /* Hidden methods */ - /** - * @hidden - */ - Connection.prototype.sendIceCandidate = function (candidate) { - console.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote'), 'candidate for', this.connectionId, JSON.stringify(candidate)); - this.session.openvidu.sendRequest('onIceCandidate', { - endpointName: this.connectionId, - candidate: candidate.candidate, - sdpMid: candidate.sdpMid, - sdpMLineIndex: candidate.sdpMLineIndex - }, function (error, response) { - if (error) { - console.error('Error sending ICE candidate: ' - + JSON.stringify(error)); - } - }); - }; - /** - * @hidden - */ - Connection.prototype.initRemoteStreams = function (options) { - var _this = this; - // This is ready for supporting multiple streams per Connection object. Right now the loop will always run just once - // this.stream should also be replaced by a collection of streams to support multiple streams per Connection - options.forEach(function (opts) { - var streamOptions = { - id: opts.id, - connection: _this, - frameRate: opts.frameRate, - recvAudio: opts.audioActive, - recvVideo: opts.videoActive, - typeOfVideo: opts.typeOfVideo - }; - var stream = new Stream_1.Stream(_this.session, streamOptions); - _this.addStream(stream); - }); - console.info("Remote 'Connection' with 'connectionId' [" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts); - }; - /** - * @hidden - */ - Connection.prototype.addStream = function (stream) { - stream.connection = this; - this.stream = stream; - }; - /** - * @hidden - */ - Connection.prototype.removeStream = function (streamId) { - delete this.stream; - }; - /** - * @hidden - */ - Connection.prototype.dispose = function () { - if (!!this.stream) { - delete this.stream; - } - this.disposed = true; - }; - return Connection; -}()); -exports.Connection = Connection; -//# sourceMappingURL=Connection.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var LocalRecorderState_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js"); -/** - * Easy recording of [[Stream]] objects straightaway from the browser. - * - * > WARNING: Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case - */ -var LocalRecorder = /** @class */ (function () { - /** - * @hidden - */ - function LocalRecorder(stream) { - this.stream = stream; - this.chunks = []; - this.count = 0; - this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection'; - this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord'; - this.state = LocalRecorderState_1.LocalRecorderState.READY; - } - /** - * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not - */ - LocalRecorder.prototype.record = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (typeof MediaRecorder === 'undefined') { - console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'); - throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder')); - } - if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) { - throw (Error('\'LocalRecord.record()\' needs \'LocalRecord.state\' to be \'READY\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.clean()\' or init a new LocalRecorder before')); - } - console.log("Starting local recording of stream '" + _this.stream.streamId + "' of connection '" + _this.connectionId + "'"); - if (typeof MediaRecorder.isTypeSupported === 'function') { - var options = void 0; - if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) { - options = { mimeType: 'video/webm;codecs=vp9' }; - } - else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) { - options = { mimeType: 'video/webm;codecs=h264' }; - } - else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) { - options = { mimeType: 'video/webm;codecs=vp8' }; - } - console.log('Using mimeType ' + options.mimeType); - _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream(), options); - } - else { - console.warn('isTypeSupported is not supported, using default codecs for browser'); - _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream()); - } - _this.mediaRecorder.start(10); - } - catch (err) { - reject(err); - } - _this.mediaRecorder.ondataavailable = function (e) { - _this.chunks.push(e.data); - }; - _this.mediaRecorder.onerror = function (e) { - console.error('MediaRecorder error: ', e); - }; - _this.mediaRecorder.onstart = function () { - console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onstop = function () { - _this.onStopDefault(); - }; - _this.mediaRecorder.onpause = function () { - console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onresume = function () { - console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onwarning = function (e) { - console.log('MediaRecorder warning: ' + e); - }; - _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; - resolve(); - }); - }; - /** - * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not - */ - LocalRecorder.prototype.stop = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.stop()\' needs \'LocalRecord.state\' to be \'RECORDING\' or \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' before')); - } - _this.mediaRecorder.onstop = function () { - _this.onStopDefault(); - resolve(); - }; - _this.mediaRecorder.stop(); - } - catch (e) { - reject(e); - } - }); - }; - /** - * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not - */ - LocalRecorder.prototype.pause = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) { - reject(Error('\'LocalRecord.pause()\' needs \'LocalRecord.state\' to be \'RECORDING\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' or \'LocalRecorder.resume()\' before')); - } - _this.mediaRecorder.pause(); - _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED; - } - catch (error) { - reject(error); - } - }); - }; - /** - * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not - */ - LocalRecorder.prototype.resume = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) { - throw (Error('\'LocalRecord.resume()\' needs \'LocalRecord.state\' to be \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.pause()\' before')); - } - _this.mediaRecorder.resume(); - _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; - } - catch (error) { - reject(error); - } - }); - }; - /** - * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.preview = function (parentElement) { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.preview()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - this.videoPreview = document.createElement('video'); - this.videoPreview.id = this.id; - this.videoPreview.autoplay = true; - if (typeof parentElement === 'string') { - this.htmlParentElementId = parentElement; - var parentElementDom = document.getElementById(parentElement); - if (parentElementDom) { - this.videoPreview = parentElementDom.appendChild(this.videoPreview); - } - } - else { - this.htmlParentElementId = parentElement.id; - this.videoPreview = parentElement.appendChild(this.videoPreview); - } - this.videoPreview.src = this.videoPreviewSrc; - return this.videoPreview; - }; - /** - * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again - */ - LocalRecorder.prototype.clean = function () { - var _this = this; - var f = function () { - delete _this.blob; - _this.chunks = []; - _this.count = 0; - delete _this.mediaRecorder; - _this.state = LocalRecorderState_1.LocalRecorderState.READY; - }; - if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) { - this.stop().then(function () { return f(); })["catch"](function () { return f(); }); - } - else { - f(); - } - }; - /** - * Downloads the recorded video through the browser. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.download = function () { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.download()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var a = document.createElement('a'); - a.style.display = 'none'; - document.body.appendChild(a); - var url = window.URL.createObjectURL(this.blob); - a.href = url; - a.download = this.id + '.webm'; - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } - }; - /** - * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.getBlob = function () { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('Call \'LocalRecord.stop()\' before getting Blob file')); - } - else { - return this.blob; - } - }; - /** - * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not - */ - LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - reject(Error('\'LocalRecord.uploadAsBinary()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var http_1 = new XMLHttpRequest(); - http_1.open('POST', endpoint, true); - if (typeof headers === 'object') { - for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { - var key = _a[_i]; - http_1.setRequestHeader(key, headers[key]); - } - } - http_1.onreadystatechange = function () { - if (http_1.readyState === 4) { - if (http_1.status.toString().charAt(0) === '2') { - // Success response from server (HTTP status standard: 2XX is success) - resolve(http_1.responseText); - } - else { - reject(http_1.status); - } - } - }; - http_1.send(_this.blob); - } - }); - }; - /** - * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not: - */ - LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - reject(Error('\'LocalRecord.uploadAsMultipartfile()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var http_2 = new XMLHttpRequest(); - http_2.open('POST', endpoint, true); - if (typeof headers === 'object') { - for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { - var key = _a[_i]; - http_2.setRequestHeader(key, headers[key]); - } - } - var sendable = new FormData(); - sendable.append('file', _this.blob, _this.id + '.webm'); - http_2.onreadystatechange = function () { - if (http_2.readyState === 4) { - if (http_2.status.toString().charAt(0) === '2') { - // Success response from server (HTTP status standard: 2XX is success) - resolve(http_2.responseText); - } - else { - reject(http_2.status); - } - } - }; - http_2.send(sendable); - } - }); - }; - /* Private methods */ - LocalRecorder.prototype.onStopDefault = function () { - console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + ')'); - this.blob = new Blob(this.chunks, { type: 'video/webm' }); - this.chunks = []; - this.videoPreviewSrc = window.URL.createObjectURL(this.blob); - this.state = LocalRecorderState_1.LocalRecorderState.FINISHED; - }; - return LocalRecorder; -}()); -exports.LocalRecorder = LocalRecorder; -//# sourceMappingURL=LocalRecorder.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var LocalRecorder_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js"); -var Publisher_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Publisher.js"); -var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); -var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); -var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -var screenSharingAuto = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js"); -var screenSharing = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js"); -var RpcBuilder = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js"); -var platform = __webpack_require__("../../../../openvidu-browser/node_modules/platform/platform.js"); -/** - * Entrypoint of OpenVidu Browser library. - * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]] - */ -var OpenVidu = /** @class */ (function () { - function OpenVidu() { - /** - * @hidden - */ - this.secret = ''; - /** - * @hidden - */ - this.recorder = false; - /** - * @hidden - */ - this.advancedConfiguration = {}; - console.info("'OpenVidu' initialized"); - } - /** - * Returns new session - */ - OpenVidu.prototype.initSession = function () { - this.session = new Session_1.Session(this); - return this.session; - }; - /** - * Returns a new publisher - * - * #### Events dispatched - * - * The [[Publisher]] object will dispatch an `accessDialogOpened` event, only if the pop-up shown by the browser to request permissions for the camera is opened. You can use this event to alert the user about granting permissions - * for your website. An `accessDialogClosed` event will also be dispatched after user clicks on "Allow" or "Block" in the pop-up. - * - * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not. - * - * The [[Publisher]] object will dispatch a `videoElementCreated` event once a HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. - * - * The [[Publisher]] object will dispatch a `streamPlaying` event once the local streams starts playing. See [[StreamManagerEvent]] to learn more. - * - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Publisher. - * You can always call method [[Publisher.addVideoElement]] or [[Publisher.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section) - * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails. - * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event - */ - OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) { - var properties; - if (!!param2 && (typeof param2 !== 'function')) { - // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)' - properties = param2; - properties = { - audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined, - frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined), - insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true, - publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true, - publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true, - resolution: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'), - videoSource: (typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined - }; - } - else { - // Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)' - properties = { - insertMode: VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: true, - publishAudio: true, - publishVideo: true, - resolution: '640x480' - }; - } - var publisher = new Publisher_1.Publisher(targetElement, properties, this); - var completionHandler; - if (!!param2 && (typeof param2 === 'function')) { - completionHandler = param2; - } - else if (!!param3) { - completionHandler = param3; - } - publisher.initialize() - .then(function () { - if (completionHandler !== undefined) { - completionHandler(undefined); - } - publisher.emitEvent('accessAllowed', []); - })["catch"](function (error) { - if (completionHandler !== undefined) { - completionHandler(error); - } - publisher.emitEvent('accessDenied', []); - }); - return publisher; - }; - OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) { - var _this = this; - return new Promise(function (resolve, reject) { - var publisher; - var callback = function (error) { - if (!!error) { - reject(error); - } - else { - resolve(publisher); - } - }; - if (!!properties) { - publisher = _this.initPublisher(targetElement, properties, callback); - } - else { - publisher = _this.initPublisher(targetElement, callback); - } - }); - }; - /** - * Returns a new local recorder for recording streams straight away from the browser - * @param stream Stream to record - */ - OpenVidu.prototype.initLocalRecorder = function (stream) { - return new LocalRecorder_1.LocalRecorder(stream); - }; - /** - * Checks if the browser supports OpenVidu - * @returns 1 if the browser supports OpenVidu, 0 otherwise - */ - OpenVidu.prototype.checkSystemRequirements = function () { - var browser = platform.name; - var version = platform.version; - if ((browser !== 'Chrome') && (browser !== 'Chrome Mobile') && - (browser !== 'Firefox') && (browser !== 'Firefox Mobile') && (browser !== 'Firefox for iOS') && - (browser !== 'Opera') && (browser !== 'Opera Mobile') && - (browser !== 'Safari')) { - return 0; - } - else { - return 1; - } - }; - /** - * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method - */ - OpenVidu.prototype.getDevices = function () { - return new Promise(function (resolve, reject) { - navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) { - var devices = []; - deviceInfos.forEach(function (deviceInfo) { - if (deviceInfo.kind === 'audioinput' || deviceInfo.kind === 'videoinput') { - devices.push({ - kind: deviceInfo.kind, - deviceId: deviceInfo.deviceId, - label: deviceInfo.label - }); - } - }); - resolve(devices); - })["catch"](function (error) { - console.error('Error getting devices', error); - reject(error); - }); - }); - }; - /** - * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]]) - * - * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution` - * - * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound: - * ``` - * var OV = new OpenVidu(); - * var FRAME_RATE = 10; - * - * OV.getUserMedia({ - * audioSource: false; - * videoSource: undefined, - * resolution: '1280x720', - * frameRate: FRAME_RATE - * }) - * .then(mediaStream => { - * - * var videoTrack = mediaStream.getVideoTracks()[0]; - * var video = document.createElement('video'); - * video.srcObject = new MediaStream([videoTrack]); - * - * var canvas = document.createElement('canvas'); - * var ctx = canvas.getContext('2d'); - * ctx.filter = 'grayscale(100%)'; - * - * video.addEventListener('play', () => { - * var loop = () => { - * if (!video.paused && !video.ended) { - * ctx.drawImage(video, 0, 0, 300, 170); - * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps - * } - * }; - * loop(); - * }); - * video.play(); - * - * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0]; - * var publisher = this.OV.initPublisher( - * myHtmlTarget, - * { - * audioSource: false, - * videoSource: grayVideoTrack - * }); - * }); - * ``` - */ - OpenVidu.prototype.getUserMedia = function (options) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.generateMediaConstraints(options) - .then(function (constraints) { - navigator.mediaDevices.getUserMedia(constraints) - .then(function (mediaStream) { - resolve(mediaStream); - })["catch"](function (error) { - var errorName; - var errorMessage = error.toString(); - if (!(options.videoSource === 'screen')) { - errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED; - } - reject(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - })["catch"](function (error) { - reject(error); - }); - }); - }; - /* tslint:disable:no-empty */ - /** - * Disable all logging except error level - */ - OpenVidu.prototype.enableProdMode = function () { - console.log = function () { }; - console.debug = function () { }; - console.info = function () { }; - console.warn = function () { }; - }; - /* tslint:enable:no-empty */ - /** - * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details): - * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser - * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension) - * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature - */ - OpenVidu.prototype.setAdvancedConfiguration = function (configuration) { - this.advancedConfiguration = configuration; - }; - /* Hidden methods */ - /** - * @hidden - */ - OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) { - var _this = this; - return new Promise(function (resolve, reject) { - var audio, video; - if (publisherProperties.audioSource === null || publisherProperties.audioSource === false) { - audio = false; - } - else if (publisherProperties.audioSource === undefined) { - audio = true; - } - else { - audio = publisherProperties.audioSource; - } - if (publisherProperties.videoSource === null || publisherProperties.videoSource === false) { - video = false; - } - else { - video = { - height: { - ideal: 480 - }, - width: { - ideal: 640 - } - }; - } - var mediaConstraints = { - audio: audio, - video: video - }; - if (typeof mediaConstraints.audio === 'string') { - mediaConstraints.audio = { deviceId: { exact: mediaConstraints.audio } }; - } - if (mediaConstraints.video) { - if (!!publisherProperties.resolution) { - var widthAndHeight = publisherProperties.resolution.toLowerCase().split('x'); - var width = Number(widthAndHeight[0]); - var height = Number(widthAndHeight[1]); - mediaConstraints.video.width.ideal = width; - mediaConstraints.video.height.ideal = height; - } - if (!!publisherProperties.frameRate) { - mediaConstraints.video.frameRate = { ideal: publisherProperties.frameRate }; - } - if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') { - if (publisherProperties.videoSource === 'screen') { - if (platform.name !== 'Chrome' && platform.name !== 'Firefox') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name); - console.error(error); - reject(error); - } - else { - if (!!_this.advancedConfiguration.screenShareChromeExtension) { - // Custom screen sharing extension for Chrome - var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim(); - screenSharing.getChromeExtensionStatus(extensionId, function (status) { - if (status === 'installed-enabled') { - screenSharing.getScreenConstraints(function (error, screenConstraints) { - if (!!error && error === 'permission-denied') { - var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_1); - reject(error_1); - } - else { - mediaConstraints.video = screenConstraints; - resolve(mediaConstraints); - } - }); - } - if (status === 'installed-disabled') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error); - reject(error); - } - if (status === 'not-installed') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension); - console.error(error); - reject(error); - } - }); - } - else { - // Default screen sharing extension for Chrome - screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) { - if (!!error) { - if (error === 'not-installed') { - var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk'); - console.error(error_2); - reject(error_2); - } - else if (error === 'installed-disabled') { - var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error_3); - reject(error_3); - } - else if (error === 'permission-denied') { - var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_4); - reject(error_4); - } - } - else { - mediaConstraints.video = screenConstraints.video; - resolve(mediaConstraints); - } - }); - } - publisherProperties.videoSource = 'screen'; - } - } - else { - // tslint:disable-next-line:no-string-literal - mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource }; - resolve(mediaConstraints); - } - } - else { - resolve(mediaConstraints); - } - } - else { - resolve(mediaConstraints); - } - }); - }; - /** - * @hidden - */ - OpenVidu.prototype.startWs = function (onConnectSucces) { - var config = { - heartbeat: 5000, - sendCloseMessage: false, - ws: { - uri: this.wsUri, - useSockJS: false, - onconnected: onConnectSucces, - ondisconnect: this.disconnectCallback.bind(this), - onreconnecting: this.reconnectingCallback.bind(this), - onreconnected: this.reconnectedCallback.bind(this) - }, - rpc: { - requestTimeout: 15000, - participantJoined: this.session.onParticipantJoined.bind(this.session), - participantPublished: this.session.onParticipantPublished.bind(this.session), - participantUnpublished: this.session.onParticipantUnpublished.bind(this.session), - participantLeft: this.session.onParticipantLeft.bind(this.session), - participantEvicted: this.session.onParticipantEvicted.bind(this.session), - recordingStarted: this.session.onRecordingStarted.bind(this.session), - recordingStopped: this.session.onRecordingStopped.bind(this.session), - sendMessage: this.session.onNewMessage.bind(this.session), - iceCandidate: this.session.recvIceCandidate.bind(this.session), - mediaError: this.session.onMediaError.bind(this.session) - } - }; - this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config); - }; - /** - * @hidden - */ - OpenVidu.prototype.closeWs = function () { - this.jsonRpcClient.close(); - }; - /** - * @hidden - */ - OpenVidu.prototype.sendRequest = function (method, params, callback) { - if (params && params instanceof Function) { - callback = params; - params = {}; - } - console.debug('Sending request: {method:"' + method + '", params: ' + JSON.stringify(params) + '}'); - this.jsonRpcClient.send(method, params, callback); - }; - /** - * @hidden - */ - OpenVidu.prototype.isMediaStreamTrack = function (mediaSource) { - var is = (!!mediaSource && - mediaSource.enabled !== undefined && typeof mediaSource.enabled === 'boolean' && - mediaSource.id !== undefined && typeof mediaSource.id === 'string' && - mediaSource.kind !== undefined && typeof mediaSource.kind === 'string' && - mediaSource.label !== undefined && typeof mediaSource.label === 'string' && - mediaSource.muted !== undefined && typeof mediaSource.muted === 'boolean' && - mediaSource.readyState !== undefined && typeof mediaSource.readyState === 'string'); - return is; - }; - /** - * @hidden - */ - OpenVidu.prototype.getWsUri = function () { - return this.wsUri; - }; - /** - * @hidden - */ - OpenVidu.prototype.getSecret = function () { - return this.secret; - }; - /** - * @hidden - */ - OpenVidu.prototype.getRecorder = function () { - return this.recorder; - }; - /* Private methods */ - OpenVidu.prototype.disconnectCallback = function () { - console.warn('Websocket connection lost'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - OpenVidu.prototype.reconnectingCallback = function () { - console.warn('Websocket connection lost (reconnecting)'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - OpenVidu.prototype.reconnectedCallback = function () { - console.warn('Websocket reconnected'); - }; - OpenVidu.prototype.isRoomAvailable = function () { - if (this.session !== undefined && this.session instanceof Session_1.Session) { - return true; - } - else { - console.warn('Session instance not found'); - return false; - } - }; - return OpenVidu; -}()); -exports.OpenVidu = OpenVidu; -//# sourceMappingURL=OpenVidu.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/Publisher.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); -var Stream_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Stream.js"); -var StreamManager_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/StreamManager.js"); -var StreamEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js"); -var VideoElementEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js"); -var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); -/** - * Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method - */ -var Publisher = /** @class */ (function (_super) { - __extends(Publisher, _super); - /** - * @hidden - */ - function Publisher(targEl, properties, openvidu) { - var _this = _super.call(this, new Stream_1.Stream((!!openvidu.session) ? openvidu.session : new Session_1.Session(openvidu), { publisherProperties: properties, mediaConstraints: {} }), targEl) || this; - _this.openvidu = openvidu; - /** - * Whether the Publisher has been granted access to the requested input devices or not - */ - _this.accessAllowed = false; - /** - * Whether you have called [[Publisher.subscribeToRemote]] with value `true` or `false` (*false* by default) - */ - _this.isSubscribedToRemote = false; - _this.accessDenied = false; - _this.properties = properties; - _this.stream.ee.on('local-stream-destroyed-by-disconnect', function (reason) { - var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', _this.stream, reason); - _this.ee.emitEvent('streamDestroyed', [streamEvent]); - streamEvent.callDefaultBehaviour(); - }); - return _this; - } - /** - * Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to publish the audio stream, `false` to unpublish it - */ - Publisher.prototype.publishAudio = function (value) { - this.stream.getWebRtcPeer().audioEnabled = value; - console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its audio stream'); - }; - /** - * Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to publish the video stream, `false` to unpublish it - */ - Publisher.prototype.publishVideo = function (value) { - this.stream.getWebRtcPeer().videoEnabled = value; - console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its video stream'); - }; - /** - * Call this method before [[Session.publish]] to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do. - */ - Publisher.prototype.subscribeToRemote = function (value) { - value = (value !== undefined) ? value : true; - this.isSubscribedToRemote = value; - this.stream.subscribeToMyRemote(value); - }; - /** - * See [[EventDispatcher.on]] - */ - Publisher.prototype.on = function (type, handler) { - var _this = this; - _super.prototype.on.call(this, type, handler); - if (type === 'streamCreated') { - if (!!this.stream && this.stream.isLocalStreamPublished) { - this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]); - } - else { - this.stream.ee.on('stream-created-by-publisher', function () { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]); - }); - } - } - if (type === 'remoteVideoPlaying') { - if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]); - } - } - if (type === 'accessAllowed') { - if (this.accessAllowed) { - this.ee.emitEvent('accessAllowed'); - } - } - if (type === 'accessDenied') { - if (this.accessDenied) { - this.ee.emitEvent('accessDenied'); - } - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - Publisher.prototype.once = function (type, handler) { - var _this = this; - _super.prototype.once.call(this, type, handler); - if (type === 'streamCreated') { - if (!!this.stream && this.stream.isLocalStreamPublished) { - this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]); - } - else { - this.stream.ee.once('stream-created-by-publisher', function () { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]); - }); - } - } - if (type === 'remoteVideoPlaying') { - if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]); - } - } - if (type === 'accessAllowed') { - if (this.accessAllowed) { - this.ee.emitEvent('accessAllowed'); - } - } - if (type === 'accessDenied') { - if (this.accessDenied) { - this.ee.emitEvent('accessDenied'); - } - } - return this; - }; - /* Hidden methods */ - /** - * @hidden - */ - Publisher.prototype.initialize = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var errorCallback = function (openViduError) { - _this.accessDenied = true; - _this.accessAllowed = false; - reject(openViduError); - }; - var successCallback = function (mediaStream) { - _this.accessAllowed = true; - _this.accessDenied = false; - if (_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)) { - mediaStream.removeTrack(mediaStream.getAudioTracks()[0]); - mediaStream.addTrack(_this.properties.audioSource); - } - if (_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)) { - mediaStream.removeTrack(mediaStream.getVideoTracks()[0]); - mediaStream.addTrack(_this.properties.videoSource); - } - // Apply PublisherProperties.publishAudio and PublisherProperties.publishVideo - if (!!mediaStream.getAudioTracks()[0]) { - mediaStream.getAudioTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishAudio; - } - if (!!mediaStream.getVideoTracks()[0]) { - mediaStream.getVideoTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo; - } - _this.stream.setMediaStream(mediaStream); - if (!_this.stream.displayMyRemote()) { - // When we are subscribed to our remote we don't still set the MediaStream object in the video elements to - // avoid early 'streamPlaying' event - _this.stream.updateMediaStreamInVideos(); - } - _this.stream.isLocalStreamReadyToPublish = true; - _this.stream.ee.emitEvent('stream-ready-to-publish', []); - if (!!_this.firstVideoElement) { - _this.createVideoElement(_this.firstVideoElement.targetElement, _this.properties.insertMode); - } - delete _this.firstVideoElement; - resolve(); - }; - _this.openvidu.generateMediaConstraints(_this.properties) - .then(function (constraints) { - var outboundStreamOptions = { - mediaConstraints: constraints, - publisherProperties: _this.properties - }; - _this.stream.setOutboundStreamOptions(outboundStreamOptions); - var constraintsAux = {}; - var timeForDialogEvent = 1250; - if (_this.stream.isSendVideo() || _this.stream.isSendAudio()) { - var definedAudioConstraint_1 = ((constraints.audio === undefined) ? true : constraints.audio); - constraintsAux.audio = _this.stream.isSendScreen() ? false : definedAudioConstraint_1; - constraintsAux.video = constraints.video; - var startTime_1 = Date.now(); - _this.setPermissionDialogTimer(timeForDialogEvent); - navigator.mediaDevices.getUserMedia(constraintsAux) - .then(function (mediaStream) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - if (_this.stream.isSendScreen() && _this.stream.isSendAudio()) { - // When getting desktop as user media audio constraint must be false. Now we can ask for it if required - constraintsAux.audio = definedAudioConstraint_1; - constraintsAux.video = false; - startTime_1 = Date.now(); - _this.setPermissionDialogTimer(timeForDialogEvent); - navigator.mediaDevices.getUserMedia(constraintsAux) - .then(function (audioOnlyStream) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - mediaStream.addTrack(audioOnlyStream.getAudioTracks()[0]); - successCallback(mediaStream); - })["catch"](function (error) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - var errorName, errorMessage; - switch (error.name.toLowerCase()) { - case 'notfounderror': - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'notallowederror': - errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'overconstrainederror': - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = "Audio input device with deviceId '" + constraints.video.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Audio input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - } - }); - } - else { - successCallback(mediaStream); - } - })["catch"](function (error) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - var errorName, errorMessage; - switch (error.name.toLowerCase()) { - case 'notfounderror': - navigator.mediaDevices.getUserMedia({ - audio: false, - video: constraints.video - }) - .then(function (mediaStream) { - mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - })["catch"](function (e) { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - break; - case 'notallowederror': - errorName = _this.stream.isSendScreen() ? OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED : OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'overconstrainederror': - navigator.mediaDevices.getUserMedia({ - audio: false, - video: constraints.video - }) - .then(function (mediaStream) { - mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = "Audio input device with deviceId '" + constraints.audio.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Audio input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - })["catch"](function (e) { - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND; - errorMessage = "Video input device with deviceId '" + constraints.video.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Video input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - break; - } - }); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET, "Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'")); - } - })["catch"](function (error) { - errorCallback(error); - }); - }); - }; - /** - * @hidden - */ - Publisher.prototype.updateSession = function (session) { - this.session = session; - this.stream.session = session; - }; - /** - * @hidden - */ - Publisher.prototype.emitEvent = function (type, eventArray) { - this.ee.emitEvent(type, eventArray); - }; - /** - * @hidden - */ - Publisher.prototype.reestablishStreamPlayingEvent = function () { - if (this.ee.getListeners('streamPlaying').length > 0) { - this.addPlayEventToFirstVideo(); - } - }; - /* Private methods */ - Publisher.prototype.setPermissionDialogTimer = function (waitTime) { - var _this = this; - this.permissionDialogTimeout = setTimeout(function () { - _this.ee.emitEvent('accessDialogOpened', []); - }, waitTime); - }; - Publisher.prototype.clearPermissionDialogTimer = function (startTime, waitTime) { - clearTimeout(this.permissionDialogTimeout); - if ((Date.now() - startTime) > waitTime) { - // Permission dialog was shown and now is closed - this.ee.emitEvent('accessDialogClosed', []); - } - }; - return Publisher; -}(StreamManager_1.StreamManager)); -exports.Publisher = Publisher; -//# sourceMappingURL=Publisher.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/Session.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var Connection_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Connection.js"); -var Subscriber_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Subscriber.js"); -var ConnectionEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js"); -var RecordingEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js"); -var SessionDisconnectedEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js"); -var SignalEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js"); -var StreamEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js"); -var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); -var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -var platform = __webpack_require__("../../../../openvidu-browser/node_modules/platform/platform.js"); -var EventEmitter = __webpack_require__("../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js"); -/** - * Represents a video call. It can also be seen as a videoconference room where multiple users can connect. - * Participants who publish their videos to a session can be seen by the rest of users connected to that specific session. - * Initialized with [[OpenVidu.initSession]] method - */ -var Session = /** @class */ (function () { - /** - * @hidden - */ - function Session(openvidu) { - /** - * Collection of all StreamManagers of this Session ([[Publisher]] and [[Subscriber]]) - */ - this.streamManagers = []; - // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification - /** - * @hidden - */ - this.remoteStreamsCreated = {}; - /** - * @hidden - */ - this.remoteConnections = {}; - /** - * @hidden - */ - this.speakingEventsEnabled = false; - this.ee = new EventEmitter(); - this.openvidu = openvidu; - } - /** - * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when - * they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standarized format - * as JSON or XML is a good idea), the only restriction is a maximum length of 10000 chars. - * - * This metadata is not considered secure, as it is generated in the client side. To pass securized data, add it as a parameter in the - * token generation operation (through the API REST, openvidu-java-client or openvidu-node-client). - * - * Only after the returned Promise is successfully resolved [[Session.connection]] object will be available and properly defined. - * - * #### Events dispatched - * - * The [[Session]] object of the local participant will first dispatch one or more `connectionCreated` events upon successful termination of this method: - * - First one for your own local Connection object, so you can retrieve [[Session.connection]] property. - * - Then one for each remote Connection previously connected to the Session, if any. Any other remote user connecting to the Session after you have - * successfully connected will also dispatch a `connectionCreated` event when they do so. - * - * The [[Session]] object of the local participant will also dispatch a `streamCreated` event for each remote active [[Publisher]] that was already streaming - * when connecting, just after dispatching all remote `connectionCreated` events. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `connectionCreated` event. - * - * See [[ConnectionEvent]] and [[StreamEvent]] to learn more. - * - * @returns A Promise to which you must subscribe that is resolved if the the connection to the Session was successful and rejected with an Error object if not - * - */ - Session.prototype.connect = function (token, metadata) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.processToken(token); - if (_this.openvidu.checkSystemRequirements()) { - // Early configuration to deactivate automatic subscription to streams - _this.options = { - sessionId: _this.sessionId, - participantId: token, - metadata: !!metadata ? _this.stringClientMetadata(metadata) : '' - }; - _this.connectAux(token).then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu')); - } - }); - }; - /** - * Leaves the session, destroying all streams and deleting the user as a participant. - * - * #### Events dispatched - * - * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event. - * This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). - * For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event. - * Call `event.preventDefault()` uppon event `sessionDisconnected` to avoid this behaviour and take care of disposing and cleaning all the Subscriber objects yourself. - * See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more. - * - * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session. - * This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). - * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event. - * Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()` - * or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] and [[VideoElementEvent]] to learn more. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing. - * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). - * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event. - * Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself. - * See [[StreamEvent]] and [[VideoElementEvent]] to learn more. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more. - */ - Session.prototype.disconnect = function () { - this.leave(false, 'disconnect'); - }; - /** - * Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event. - * - * #### Events dispatched - * - * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. - * - * The [[Subscriber]] object will dispatch a `streamPlaying` event once the remote stream starts playing. See [[StreamManagerEvent]] to learn more. - * - * @param stream Stream object to subscribe to - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Subscriber. - * You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section) - * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails. - */ - Session.prototype.subscribe = function (stream, targetElement, param3, param4) { - var properties = {}; - if (!!param3 && typeof param3 !== 'function') { - properties = { - insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, - subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true, - subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true - }; - } - else { - properties = { - insertMode: VideoInsertMode_1.VideoInsertMode.APPEND, - subscribeToAudio: true, - subscribeToVideo: true - }; - } - var completionHandler; - if (!!param3 && (typeof param3 === 'function')) { - completionHandler = param3; - } - else if (!!param4) { - completionHandler = param4; - } - console.info('Subscribing to ' + stream.connection.connectionId); - stream.subscribe() - .then(function () { - console.info('Subscribed correctly to ' + stream.connection.connectionId); - if (completionHandler !== undefined) { - completionHandler(undefined); - } - })["catch"](function (error) { - if (completionHandler !== undefined) { - completionHandler(error); - } - }); - var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties); - if (!!subscriber.targetElement) { - stream.streamManager.createVideoElement(subscriber.targetElement, properties.insertMode); - } - return subscriber; - }; - Session.prototype.subscribeAsync = function (stream, targetElement, properties) { - var _this = this; - return new Promise(function (resolve, reject) { - var subscriber; - var callback = function (error) { - if (!!error) { - reject(error); - } - else { - resolve(subscriber); - } - }; - if (!!properties) { - subscriber = _this.subscribe(stream, targetElement, properties, callback); - } - else { - subscriber = _this.subscribe(stream, targetElement, callback); - } - }); - }; - /** - * Unsubscribes from `subscriber`, automatically removing its associated HTML video elements. - * - * #### Events dispatched - * - * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event for each video associated to it that was removed from DOM. - * Only videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed - * - * See [[VideoElementEvent]] to learn more - */ - Session.prototype.unsubscribe = function (subscriber) { - var connectionId = subscriber.stream.connection.connectionId; - console.info('Unsubscribing from ' + connectionId); - this.openvidu.sendRequest('unsubscribeFromVideo', { sender: subscriber.stream.connection.connectionId }, function (error, response) { - if (error) { - console.error('Error unsubscribing from ' + connectionId, error); - } - else { - console.info('Unsubscribed correctly from ' + connectionId); - } - subscriber.stream.disposeWebRtcPeer(); - subscriber.stream.disposeMediaStream(); - }); - subscriber.stream.streamManager.removeAllVideos(); - }; - /** - * Publishes to the Session the Publisher object - * - * #### Events dispatched - * - * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more. - * - * The local [[Publisher]] object will dispatch a `streamPlaying` once the media stream starts playing. See [[StreamManagerEvent]] to learn more. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved only after the publisher was successfully published and rejected with an Error object if not - */ - Session.prototype.publish = function (publisher) { - var _this = this; - return new Promise(function (resolve, reject) { - publisher.session = _this; - publisher.stream.session = _this; - if (!publisher.stream.isLocalStreamPublished) { - // 'Session.unpublish(Publisher)' has NOT been called - _this.connection.addStream(publisher.stream); - publisher.stream.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - // 'Session.unpublish(Publisher)' has been called. Must initialize again Publisher - publisher.initialize() - .then(function () { - _this.connection.addStream(publisher.stream); - publisher.reestablishStreamPlayingEvent(); - publisher.stream.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - })["catch"](function (error) { - reject(error); - }); - } - }); - }; - /** - * Unpublishes from the Session the Publisher object. - * - * #### Events dispatched - * - * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event. - * This event will automatically stop all media tracks and delete any HTML video element associated to this Publisher - * (only those videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). - * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event. - * Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event. - * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and - * delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). - * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event. - * Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object on your own. - * - * See [[StreamEvent]] and [[VideoElementEvent]] to learn more. - */ - Session.prototype.unpublish = function (publisher) { - var stream = publisher.stream; - if (!stream.connection) { - console.error('The associated Connection object of this Publisher is null', stream); - return; - } - else if (stream.connection !== this.connection) { - console.error('The associated Connection object of this Publisher is not your local Connection.' + - "Only moderators can force unpublish on remote Streams via 'forceUnpublish' method", stream); - return; - } - else { - console.info('Unpublishing local media (' + stream.connection.connectionId + ')'); - this.openvidu.sendRequest('unpublishVideo', function (error, response) { - if (error) { - console.error(error); - } - else { - console.info('Media unpublished correctly'); - } - }); - stream.disposeWebRtcPeer(); - delete stream.connection.stream; - var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish'); - publisher.emitEvent('streamDestroyed', [streamEvent]); - streamEvent.callDefaultBehaviour(); - } - }; - /** - * Sends one signal. `signal` object has the following optional properties: - * ```json - * {data:string, to:Connection[], type:string} - * ``` - * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local - * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't - * mean that openvidu-server could resend the message to all the listed receivers._ - */ - /* tslint:disable:no-string-literal */ - Session.prototype.signal = function (signal) { - var _this = this; - return new Promise(function (resolve, reject) { - var signalMessage = {}; - if (signal.to && signal.to.length > 0) { - var connectionIds_1 = []; - signal.to.forEach(function (connection) { - connectionIds_1.push(connection.connectionId); - }); - signalMessage['to'] = connectionIds_1; - } - else { - signalMessage['to'] = []; - } - signalMessage['data'] = signal.data ? signal.data : ''; - signalMessage['type'] = signal.type ? signal.type : ''; - _this.openvidu.sendRequest('sendMessage', { - message: JSON.stringify(signalMessage) - }, function (error, response) { - if (!!error) { - reject(error); - } - else { - resolve(); - } - }); - }); - }; - /* tslint:enable:no-string-literal */ - /** - * See [[EventDispatcher.on]] - */ - Session.prototype.on = function (type, handler) { - this.ee.on(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered by 'Session'", event); - } - else { - console.info("Event '" + type + "' triggered by 'Session'"); - } - handler(event); - }); - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = true; - // If there are already available remote streams, enable hark 'speaking' event in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str && !str.speechEvent && str.hasAudio) { - str.enableSpeakingEvents(); - } - } - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - Session.prototype.once = function (type, handler) { - this.ee.once(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered by 'Session'", event); - } - else { - console.info("Event '" + type + "' triggered by 'Session'"); - } - handler(event); - }); - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = true; - // If there are already available remote streams, enable hark in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str && !str.speechEvent && str.hasAudio) { - str.enableOnceSpeakingEvents(); - } - } - } - return this; - }; - /** - * See [[EventDispatcher.off]] - */ - Session.prototype.off = function (type, handler) { - if (!handler) { - this.ee.removeAllListeners(type); - } - else { - this.ee.off(type, handler); - } - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = false; - // If there are already available remote streams, disablae hark in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str && !!str.speechEvent) { - str.disableSpeakingEvents(); - } - } - } - return this; - }; - /* Hidden methods */ - /** - * @hidden - */ - Session.prototype.onParticipantJoined = function (response) { - var _this = this; - // Connection shouldn't exist - this.getConnection(response.id, '') - .then(function (connection) { - console.warn('Connection ' + response.id + ' already exists in connections list'); - })["catch"](function (openViduError) { - var connection = new Connection_1.Connection(_this, response); - _this.remoteConnections[response.id] = connection; - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantLeft = function (msg) { - var _this = this; - this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + " unknown when 'onParticipantLeft'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - .then(function (connection) { - if (!!connection.stream) { - var stream = connection.stream; - var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', stream, msg.reason); - _this.ee.emitEvent('streamDestroyed', [streamEvent]); - streamEvent.callDefaultBehaviour(); - delete _this.remoteStreamsCreated[stream.streamId]; - } - delete _this.remoteConnections[connection.connectionId]; - _this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionDestroyed', connection, msg.reason)]); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantPublished = function (response) { - var _this = this; - var afterConnectionFound = function (connection) { - _this.remoteConnections[connection.connectionId] = connection; - if (!_this.remoteStreamsCreated[connection.stream.streamId]) { - // Avoid race condition between stream.subscribe() in "onParticipantPublished" and in "joinRoom" rpc callback - // This condition is false if openvidu-server sends "participantPublished" event to a subscriber participant that has - // already subscribed to certain stream in the callback of "joinRoom" method - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', connection.stream, '')]); - } - _this.remoteStreamsCreated[connection.stream.streamId] = true; - }; - // Get the existing Connection created on 'onParticipantJoined' for - // existing participants or create a new one for new participants - var connection; - this.getRemoteConnection(response.id, "Remote connection '" + response.id + "' unknown when 'onParticipantPublished'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - .then(function (con) { - // Update existing Connection - connection = con; - response.metadata = con.data; - connection.options = response; - connection.initRemoteStreams(response.streams); - afterConnectionFound(connection); - })["catch"](function (openViduError) { - // Create new Connection - connection = new Connection_1.Connection(_this, response); - afterConnectionFound(connection); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantUnpublished = function (msg) { - var _this = this; - this.getRemoteConnection(msg.name, "Remote connection '" + msg.name + "' unknown when 'onParticipantUnpublished'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - .then(function (connection) { - var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason); - _this.ee.emitEvent('streamDestroyed', [streamEvent]); - streamEvent.callDefaultBehaviour(); - // Deleting the remote stream - var streamId = connection.stream.streamId; - delete _this.remoteStreamsCreated[streamId]; - connection.removeStream(streamId); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantEvicted = function (msg) { - /*this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + " unknown when 'onParticipantLeft'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - - .then(connection => { - if (!!connection.stream) { - const stream = connection.stream; - - const streamEvent = new StreamEvent(true, this, 'streamDestroyed', stream, 'forceDisconnect'); - this.ee.emitEvent('streamDestroyed', [streamEvent]); - streamEvent.callDefaultBehaviour(); - - delete this.remoteStreamsCreated[stream.streamId]; - } - connection.dispose(); - delete this.remoteConnections[connection.connectionId]; - this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent(false, this, 'connectionDestroyed', connection, 'forceDisconnect')]); - }) - .catch(openViduError => { - console.error(openViduError); - });*/ - }; - /** - * @hidden - */ - Session.prototype.onNewMessage = function (msg) { - var _this = this; - console.info('New signal: ' + JSON.stringify(msg)); - this.getConnection(msg.from, "Connection '" + msg.from + "' unknow when 'onNewMessage'. Existing remote connections: " - + JSON.stringify(Object.keys(this.remoteConnections)) + '. Existing local connection: ' + this.connection.connectionId) - .then(function (connection) { - _this.ee.emitEvent('signal', [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]); - _this.ee.emitEvent('signal:' + msg.type, [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.recvIceCandidate = function (msg) { - var candidate = { - candidate: msg.candidate, - sdpMid: msg.sdpMid, - sdpMLineIndex: msg.sdpMLineIndex - }; - this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate) - .then(function (connection) { - var stream = connection.stream; - stream.getWebRtcPeer().addIceCandidate(candidate, function (error) { - if (error) { - console.error('Error adding candidate for ' + stream.streamId - + ' stream of endpoint ' + msg.endpointName + ': ' + error); - } - }); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onSessionClosed = function (msg) { - console.info('Session closed: ' + JSON.stringify(msg)); - var s = msg.room; - if (s !== undefined) { - this.ee.emitEvent('session-closed', [{ - session: s - }]); - } - else { - console.warn('Session undefined on session closed', msg); - } - }; - /** - * @hidden - */ - Session.prototype.onLostConnection = function () { - if (!this.connection) { - console.warn('Not connected to session: if you are not debugging, this is probably a certificate error'); - var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0]; - if (window.confirm('If you are not debugging, this is probably a certificate error at \"' + url + '\"\n\nClick OK to navigate and accept it')) { - location.assign(url + '/accept-certificate'); - } - return; - } - console.warn('Lost connection in Session ' + this.sessionId); - if (!!this.sessionId && !this.connection.disposed) { - this.leave(true, 'networkDisconnect'); - } - }; - /** - * @hidden - */ - Session.prototype.onMediaError = function (params) { - console.error('Media error: ' + JSON.stringify(params)); - var err = params.error; - if (err) { - this.ee.emitEvent('error-media', [{ - error: err - }]); - } - else { - console.warn('Received undefined media error. Params:', params); - } - }; - /** - * @hidden - */ - Session.prototype.onRecordingStarted = function (response) { - this.ee.emitEvent('recordingStarted', [new RecordingEvent_1.RecordingEvent(this, 'recordingStarted', response.id, response.name)]); - }; - /** - * @hidden - */ - Session.prototype.onRecordingStopped = function (response) { - this.ee.emitEvent('recordingStopped', [new RecordingEvent_1.RecordingEvent(this, 'recordingStopped', response.id, response.name)]); - }; - /** - * @hidden - */ - Session.prototype.emitEvent = function (type, eventArray) { - this.ee.emitEvent(type, eventArray); - }; - /** - * @hidden - */ - Session.prototype.leave = function (forced, reason) { - var _this = this; - forced = !!forced; - console.info('Leaving Session (forced=' + forced + ')'); - if (!!this.connection) { - if (!this.connection.disposed && !forced) { - this.openvidu.sendRequest('leaveRoom', function (error, response) { - if (error) { - console.error(error); - } - _this.openvidu.closeWs(); - }); - } - else { - this.openvidu.closeWs(); - } - if (!!this.connection.stream) { - // Dispose Publisher's local stream - this.connection.stream.disposeWebRtcPeer(); - if (this.connection.stream.isLocalStreamPublished) { - // Make Publisher object dispatch 'streamDestroyed' event if the Stream was published - this.connection.stream.ee.emitEvent('local-stream-destroyed-by-disconnect', [reason]); - } - } - if (!this.connection.disposed) { - // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed) - var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason); - this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]); - sessionDisconnectEvent.callDefaultBehaviour(); - } - } - else { - console.warn('You were not connected to the session ' + this.sessionId); - } - }; - /* Private methods */ - Session.prototype.connectAux = function (token) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.openvidu.startWs(function (error) { - if (!!error) { - reject(error); - } - else { - var joinParams = { - token: (!!token) ? token : '', - session: _this.sessionId, - metadata: !!_this.options.metadata ? _this.options.metadata : '', - secret: _this.openvidu.getSecret(), - recorder: _this.openvidu.getRecorder() - }; - _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) { - if (!!error) { - reject(error); - } - else { - // Initialize local Connection object with values returned by openvidu-server - _this.connection = new Connection_1.Connection(_this); - _this.connection.connectionId = response.id; - _this.connection.data = response.metadata; - // Initialize remote Connections with value returned by openvidu-server - var events_1 = { - connections: new Array(), - streams: new Array() - }; - var existingParticipants = response.value; - existingParticipants.forEach(function (participant) { - var connection = new Connection_1.Connection(_this, participant); - _this.remoteConnections[connection.connectionId] = connection; - events_1.connections.push(connection); - if (!!connection.stream) { - _this.remoteStreamsCreated[connection.stream.streamId] = true; - events_1.streams.push(connection.stream); - } - }); - // Own 'connectionCreated' event - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); - // One 'connectionCreated' event for each existing connection in the session - events_1.connections.forEach(function (connection) { - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - // One 'streamCreated' event for each active stream in the session - events_1.streams.forEach(function (stream) { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); - }); - resolve(); - } - }); - } - }); - }); - }; - Session.prototype.stringClientMetadata = function (metadata) { - if (typeof metadata !== 'string') { - return JSON.stringify(metadata); - } - else { - return metadata; - } - }; - Session.prototype.getConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - // Resolve remote connection - resolve(connection); - } - else { - if (_this.connection.connectionId === connectionId) { - // Resolve local connection - resolve(_this.connection); - } - else { - // Connection not found. Reject with OpenViduError - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - } - }); - }; - Session.prototype.getRemoteConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - // Resolve remote connection - resolve(connection); - } - else { - // Remote connection not found. Reject with OpenViduError - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - }); - }; - Session.prototype.processToken = function (token) { - var url = new URL(token); - this.sessionId = url.searchParams.get('sessionId'); - var secret = url.searchParams.get('secret'); - var recorder = url.searchParams.get('recorder'); - if (!!secret) { - this.openvidu.secret = secret; - } - if (!!recorder) { - this.openvidu.recorder = true; - } - this.openvidu.wsUri = 'wss://' + url.host + '/openvidu'; - }; - return Session; -}()); -exports.Session = Session; -//# sourceMappingURL=Session.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/Stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var WebRtcStats_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js"); -var PublisherSpeakingEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js"); -var EventEmitter = __webpack_require__("../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js"); -var kurentoUtils = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js"); -/** - * Represents each one of the media streams available in OpenVidu Server for certain session. - * Each [[Publisher]] and [[Subscriber]] has an attribute of type Stream, as they give access - * to one of them (sending and receiving it, respectively) - */ -var Stream = /** @class */ (function () { - /** - * @hidden - */ - function Stream(session, options) { - var _this = this; - /** - * @hidden - */ - this.ee = new EventEmitter(); - this.isSubscribeToRemote = false; - /** - * @hidden - */ - this.isLocalStreamReadyToPublish = false; - /** - * @hidden - */ - this.isLocalStreamPublished = false; - this.session = session; - if (options.hasOwnProperty('id')) { - // InboundStreamOptions: stream belongs to a Subscriber - this.inboundStreamOpts = options; - this.streamId = this.inboundStreamOpts.id; - this.hasAudio = this.inboundStreamOpts.recvAudio; - this.hasVideo = this.inboundStreamOpts.recvVideo; - this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo; - this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate; - } - else { - // OutboundStreamOptions: stream belongs to a Publisher - this.outboundStreamOpts = options; - if (this.isSendVideo()) { - if (this.isSendScreen()) { - this.streamId = 'SCREEN'; - this.typeOfVideo = 'SCREEN'; - } - else { - this.streamId = 'CAMERA'; - this.typeOfVideo = 'CAMERA'; - } - this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate; - } - else { - this.streamId = 'MICRO'; - delete this.typeOfVideo; - } - this.hasAudio = this.isSendAudio(); - this.hasVideo = this.isSendVideo(); - } - this.ee.on('mediastream-updated', function () { - _this.streamManager.updateMediaStream(_this.mediaStream); - console.debug('Video srcObject [' + _this.mediaStream + '] updated in stream [' + _this.streamId + ']'); - }); - } - /* Hidden methods */ - /** - * @hidden - */ - Stream.prototype.getMediaStream = function () { - return this.mediaStream; - }; - /** - * @hidden - */ - Stream.prototype.setMediaStream = function (mediaStream) { - this.mediaStream = mediaStream; - }; - /** - * @hidden - */ - Stream.prototype.updateMediaStreamInVideos = function () { - this.ee.emitEvent('mediastream-updated'); - }; - /** - * @hidden - */ - Stream.prototype.getWebRtcPeer = function () { - return this.webRtcPeer; - }; - /** - * @hidden - */ - Stream.prototype.getRTCPeerConnection = function () { - return this.webRtcPeer.peerConnection; - }; - /** - * @hidden - */ - Stream.prototype.subscribeToMyRemote = function (value) { - this.isSubscribeToRemote = value; - }; - /** - * @hidden - */ - Stream.prototype.setOutboundStreamOptions = function (outboundStreamOpts) { - this.outboundStreamOpts = outboundStreamOpts; - }; - /** - * @hidden - */ - Stream.prototype.subscribe = function () { - var _this = this; - return new Promise(function (resolve, reject) { - _this.initWebRtcPeerReceive() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - }); - }; - /** - * @hidden - */ - Stream.prototype.publish = function () { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.isLocalStreamReadyToPublish) { - _this.initWebRtcPeerSend() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - _this.ee.once('stream-ready-to-publish', function () { - _this.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - }); - } - }); - }; - /** - * @hidden - */ - Stream.prototype.disposeWebRtcPeer = function () { - if (this.webRtcPeer) { - this.webRtcPeer.dispose(); - } - if (this.speechEvent) { - this.speechEvent.stop(); - } - this.stopWebRtcStats(); - console.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + "WebRTCPeer from 'Stream' with id [" + this.streamId + '] is now closed'); - }; - /** - * @hidden - */ - Stream.prototype.disposeMediaStream = function () { - if (this.mediaStream) { - this.mediaStream.getAudioTracks().forEach(function (track) { - track.stop(); - }); - this.mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - delete this.mediaStream; - } - console.info((!!this.outboundStreamOpts ? 'Local ' : 'Remote ') + "MediaStream from 'Stream' with id [" + this.streamId + '] is now disposed'); - }; - /** - * @hidden - */ - Stream.prototype.displayMyRemote = function () { - return this.isSubscribeToRemote; - }; - /** - * @hidden - */ - Stream.prototype.isSendAudio = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.audioSource !== null && - this.outboundStreamOpts.publisherProperties.audioSource !== false); - }; - /** - * @hidden - */ - Stream.prototype.isSendVideo = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.videoSource !== null && - this.outboundStreamOpts.publisherProperties.videoSource !== false); - }; - /** - * @hidden - */ - Stream.prototype.isSendScreen = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.videoSource === 'screen'); - }; - /** - * @hidden - */ - Stream.prototype.setSpeechEventIfNotExists = function () { - if (!this.speechEvent) { - var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {}; - harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50; - harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50; - this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.mediaStream, harkOptions); - } - }; - /** - * @hidden - */ - Stream.prototype.enableSpeakingEvents = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - this.speechEvent.on('speaking', function () { - _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]); - }); - this.speechEvent.on('stopped_speaking', function () { - _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]); - }); - }; - /** - * @hidden - */ - Stream.prototype.enableOnceSpeakingEvents = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - this.speechEvent.on('speaking', function () { - _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]); - _this.disableSpeakingEvents(); - }); - this.speechEvent.on('stopped_speaking', function () { - _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]); - _this.disableSpeakingEvents(); - }); - }; - /** - * @hidden - */ - Stream.prototype.disableSpeakingEvents = function () { - this.speechEvent.stop(); - this.speechEvent = undefined; - }; - /* Private methods */ - Stream.prototype.initWebRtcPeerSend = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var userMediaConstraints = { - audio: _this.isSendAudio(), - video: _this.isSendVideo() - }; - var options = { - videoStream: _this.mediaStream, - mediaConstraints: userMediaConstraints, - onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection), - iceServers: _this.session.openvidu.advancedConfiguration.iceServers - }; - var successCallback = function (error, sdpOfferParam, wp) { - if (error) { - reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error))); - } - console.debug('Sending SDP offer to publish as ' - + _this.streamId, sdpOfferParam); - _this.session.openvidu.sendRequest('publishVideo', { - sdpOffer: sdpOfferParam, - doLoopback: _this.displayMyRemote() || false, - audioActive: _this.isSendAudio(), - videoActive: _this.isSendVideo(), - typeOfVideo: ((_this.isSendVideo()) ? (_this.isSendScreen() ? 'SCREEN' : 'CAMERA') : ''), - frameRate: !!_this.frameRate ? _this.frameRate : -1 - }, function (error, response) { - if (error) { - reject('Error on publishVideo: ' + JSON.stringify(error)); - } - else { - _this.processSdpAnswer(response.sdpAnswer) - .then(function () { - _this.isLocalStreamPublished = true; - if (_this.displayMyRemote()) { - // If remote now we can set the srcObject value of video elements - // 'streamPlaying' event will be triggered - _this.updateMediaStreamInVideos(); - } - _this.ee.emitEvent('stream-created-by-publisher'); - resolve(); - })["catch"](function (error) { - reject(error); - }); - console.info("'Publisher' successfully published to session"); - } - }); - }; - if (_this.displayMyRemote()) { - _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (err) { - if (err) { - reject(err); - } - _this.webRtcPeer.generateOffer(successCallback); - }); - } - else { - _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) { - if (error) { - reject(error); - } - _this.webRtcPeer.generateOffer(successCallback); - }); - } - }); - }; - Stream.prototype.initWebRtcPeerReceive = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var offerConstraints = { - audio: _this.inboundStreamOpts.recvAudio, - video: _this.inboundStreamOpts.recvVideo - }; - console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer", offerConstraints); - var options = { - onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection), - mediaConstraints: offerConstraints - }; - var successCallback = function (error, sdpOfferParam, wp) { - if (error) { - reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error))); - } - console.debug('Sending SDP offer to subscribe to ' - + _this.streamId, sdpOfferParam); - _this.session.openvidu.sendRequest('receiveVideoFrom', { - sender: _this.streamId, - sdpOffer: sdpOfferParam - }, function (error, response) { - if (error) { - reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error))); - } - else { - _this.processSdpAnswer(response.sdpAnswer).then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - }); - }; - _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) { - if (error) { - reject(error); - } - _this.webRtcPeer.generateOffer(successCallback); - }); - }); - }; - Stream.prototype.processSdpAnswer = function (sdpAnswer) { - var _this = this; - return new Promise(function (resolve, reject) { - var answer = new RTCSessionDescription({ - type: 'answer', - sdp: sdpAnswer - }); - console.debug(_this.streamId + ': set peer connection with recvd SDP answer', sdpAnswer); - var streamId = _this.streamId; - var peerConnection = _this.webRtcPeer.peerConnection; - peerConnection.setRemoteDescription(answer, function () { - // Update remote MediaStream object except when local stream - if (!_this.isLocal() || _this.displayMyRemote()) { - _this.mediaStream = peerConnection.getRemoteStreams()[0]; - console.debug('Peer remote stream', _this.mediaStream); - if (!!_this.mediaStream) { - _this.ee.emitEvent('mediastream-updated'); - if (!!_this.mediaStream.getAudioTracks()[0] && _this.session.speakingEventsEnabled) { - _this.enableSpeakingEvents(); - } - } - } - _this.initWebRtcStats(); - resolve(); - }, function (error) { - reject(new Error(_this.streamId + ': Error setting SDP to the peer connection: ' + JSON.stringify(error))); - }); - }); - }; - Stream.prototype.initWebRtcStats = function () { - this.webRtcStats = new WebRtcStats_1.WebRtcStats(this); - this.webRtcStats.initWebRtcStats(); - }; - Stream.prototype.stopWebRtcStats = function () { - if (!!this.webRtcStats && this.webRtcStats.isEnabled()) { - this.webRtcStats.stopWebRtcStats(); - } - }; - /** - * @hidden - */ - Stream.prototype.isLocal = function () { - // inbound options undefined and outbound options defined - return (!this.inboundStreamOpts && !!this.outboundStreamOpts); - }; - return Stream; -}()); -exports.Stream = Stream; -//# sourceMappingURL=Stream.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/StreamManager.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var StreamManagerEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js"); -var VideoElementEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js"); -var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -var EventEmitter = __webpack_require__("../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js"); -/** - * Interface in charge of displaying the media streams in the HTML DOM. This wraps any [[Publisher]] and [[Subscriber]] object. - * You can insert as many video players fo the same Stream as you want by calling [[StreamManager.addVideoElement]] or - * [[StreamManager.createVideoElement]]. - * - * The use of StreamManager wrapper is particularly useful when you don't need to differentiate between Publisher or Subscriber streams or just - * want to directly manage your own video elements (even more than one video element per Stream). This scenario is pretty common in - * declarative, MVC frontend frameworks such as Angular, React or Vue.js - */ -var StreamManager = /** @class */ (function () { - /** - * @hidden - */ - function StreamManager(stream, targetElement) { - var _this = this; - /** - * All the videos displaying the Stream of this Publisher/Subscriber - */ - this.videos = []; - /** - * @hidden - */ - this.lazyLaunchVideoElementCreatedEvent = false; - /** - * @hidden - */ - this.ee = new EventEmitter(); - this.stream = stream; - this.stream.streamManager = this; - this.remote = !this.stream.isLocal(); - if (!!targetElement) { - var targEl = void 0; - if (typeof targetElement === 'string') { - targEl = document.getElementById(targetElement); - } - else if (targetElement instanceof HTMLElement) { - targEl = targetElement; - } - if (!!targEl) { - this.firstVideoElement = { - targetElement: targEl, - video: document.createElement('video'), - id: '' - }; - this.targetElement = targEl; - this.element = targEl; - } - } - this.canPlayListener = function () { - if (_this.stream.isLocal()) { - if (!_this.stream.displayMyRemote()) { - console.info("Your local 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]); - } - else { - console.info("Your own remote 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'remoteVideoPlaying')]); - } - } - else { - console.info("Remote 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]); - } - _this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(_this)]); - }; - } - /** - * See [[EventDispatcher.on]] - */ - StreamManager.prototype.on = function (type, handler) { - this.ee.on(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered", event); - } - else { - console.info("Event '" + type + "' triggered"); - } - handler(event); - }); - if (type === 'videoElementCreated') { - if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) { - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]); - this.lazyLaunchVideoElementCreatedEvent = false; - } - } - if (type === 'streamPlaying' || type === 'videoPlaying') { - if (this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this)]); - this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]); - } - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - StreamManager.prototype.once = function (type, handler) { - this.ee.once(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered once", event); - } - else { - console.info("Event '" + type + "' triggered once"); - } - handler(event); - }); - if (type === 'videoElementCreated') { - if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) { - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]); - } - } - if (type === 'streamPlaying' || type === 'videoPlaying') { - if (this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this)]); - this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]); - } - } - return this; - }; - /** - * See [[EventDispatcher.off]] - */ - StreamManager.prototype.off = function (type, handler) { - if (!handler) { - this.ee.removeAllListeners(type); - } - else { - this.ee.off(type, handler); - } - return this; - }; - /** - * Makes `video` element parameter display this [[stream]]. This is useful when you are - * [managing the video elements on your own](/docs/how-do-i/manage-videos/#you-take-care-of-the-video-players) - * - * Calling this method with a video already added to other Publisher/Subscriber will cause the video element to be - * disassociated from that previous Publisher/Subscriber and to be associated to this one. - * - * @returns 1 if the video wasn't associated to any other Publisher/Subscriber and has been successfully added to this one. - * 0 if the video was already added to this Publisher/Subscriber. -1 if the video was previously associated to any other - * Publisher/Subscriber and has been successfully disassociated from that one and properly added to this one. - */ - StreamManager.prototype.addVideoElement = function (video) { - this.initializeVideoProperties(video); - // If the video element is already part of this StreamManager do nothing - for (var _i = 0, _a = this.videos; _i < _a.length; _i++) { - var v = _a[_i]; - if (v.video === video) { - return 0; - } - } - var returnNumber = 1; - this.initializeVideoProperties(video); - for (var _b = 0, _c = this.stream.session.streamManagers; _b < _c.length; _b++) { - var streamManager = _c[_b]; - if (streamManager.disassociateVideo(video)) { - returnNumber = -1; - break; - } - } - this.stream.session.streamManagers.forEach(function (streamManager) { - streamManager.disassociateVideo(video); - }); - this.pushNewStreamManagerVideo({ - video: video, - id: video.id - }); - console.info('New video element associated to ', this); - return returnNumber; - }; - /** - * Creates a new video element displaying this [[stream]]. This allows you to have multiple video elements displaying the same media stream. - * - * #### Events dispatched - * - * The Publisher/Subscriber object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM. See [[VideoElementEvent]] - * - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher/Subscriber will be inserted - * @param insertMode How the video element will be inserted accordingly to `targetElemet` - */ - StreamManager.prototype.createVideoElement = function (targetElement, insertMode) { - var targEl; - if (typeof targetElement === 'string') { - targEl = document.getElementById(targEl); - if (!targEl) { - throw new Error("The provided 'targetElement' couldn't be resolved to any HTML element: " + targetElement); - } - } - else if (targetElement instanceof HTMLElement) { - targEl = targetElement; - } - else { - throw new Error("The provided 'targetElement' couldn't be resolved to any HTML element: " + targetElement); - } - var video = document.createElement('video'); - this.initializeVideoProperties(video); - var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND; - switch (insMode) { - case VideoInsertMode_1.VideoInsertMode.AFTER: - targEl.parentNode.insertBefore(video, targEl.nextSibling); - break; - case VideoInsertMode_1.VideoInsertMode.APPEND: - targEl.appendChild(video); - break; - case VideoInsertMode_1.VideoInsertMode.BEFORE: - targEl.parentNode.insertBefore(video, targEl); - break; - case VideoInsertMode_1.VideoInsertMode.PREPEND: - targEl.insertBefore(video, targEl.childNodes[0]); - break; - case VideoInsertMode_1.VideoInsertMode.REPLACE: - targEl.parentNode.replaceChild(video, targEl); - break; - default: - insMode = VideoInsertMode_1.VideoInsertMode.APPEND; - targEl.appendChild(video); - break; - } - var v = { - targetElement: targEl, - video: video, - insertMode: insMode, - id: video.id - }; - this.pushNewStreamManagerVideo(v); - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(v.video, this, 'videoElementCreated')]); - this.lazyLaunchVideoElementCreatedEvent = !!this.firstVideoElement; - return video; - }; - /** - * @hidden - */ - StreamManager.prototype.initializeVideoProperties = function (video) { - video.srcObject = this.stream.getMediaStream(); - video.autoplay = true; - video.controls = false; - if (!video.id) { - video.id = (this.remote ? 'remote-' : 'local-') + 'video-' + this.stream.streamId; - // DEPRECATED property: assign once the property id if the user provided a valid targetElement - if (!this.id && !!this.targetElement) { - this.id = video.id; - } - } - if (!this.remote && !this.stream.displayMyRemote()) { - video.muted = true; - if (this.stream.outboundStreamOpts.publisherProperties.mirror) { - this.mirrorVideo(video); - } - } - }; - /** - * @hidden - */ - StreamManager.prototype.removeAllVideos = function () { - var _this = this; - for (var i = this.stream.session.streamManagers.length - 1; i >= 0; --i) { - if (this.stream.session.streamManagers[i] === this) { - this.stream.session.streamManagers.splice(i, 1); - } - } - this.videos.slice().reverse().forEach(function (streamManagerVideo, index, videos) { - // Remove oncanplay event listener (only OpenVidu browser one, not the user ones) - streamManagerVideo.video.removeEventListener('canplay', _this.canPlayListener); - if (!!streamManagerVideo.targetElement) { - // Only remove videos created by OpenVidu Browser (those generated by passing a valid targetElement in OpenVidu.initPublisher and Session.subscribe - // or those created by StreamManager.createVideoElement). These are also the videos that triggered a videoElementCreated event - streamManagerVideo.video.parentNode.removeChild(streamManagerVideo.video); - _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(streamManagerVideo.video, _this, 'videoElementDestroyed')]); - _this.videos.splice(videos.length - 1 - index, 1); - } - else { - // Remove srcObject in all videos managed by the user - streamManagerVideo.video.srcObject = null; - } - }); - }; - /** - * @hidden - */ - StreamManager.prototype.disassociateVideo = function (video) { - var disassociated = false; - for (var i = 0; i < this.videos.length; i++) { - if (this.videos[i].video === video) { - this.videos.splice(i, 1); - disassociated = true; - console.info('Video element disassociated from ', this); - break; - } - } - return disassociated; - }; - /** - * @hidden - */ - StreamManager.prototype.addPlayEventToFirstVideo = function () { - if ((!!this.videos[0]) && (!!this.videos[0].video) && (this.videos[0].video.oncanplay === null)) { - this.videos[0].video.addEventListener('canplay', this.canPlayListener); - } - }; - /** - * @hidden - */ - StreamManager.prototype.updateMediaStream = function (mediaStream) { - this.videos.forEach(function (streamManagerVideo) { - streamManagerVideo.video.srcObject = mediaStream; - }); - }; - StreamManager.prototype.pushNewStreamManagerVideo = function (streamManagerVideo) { - this.videos.push(streamManagerVideo); - this.addPlayEventToFirstVideo(); - if (this.stream.session.streamManagers.indexOf(this) === -1) { - this.stream.session.streamManagers.push(this); - } - }; - StreamManager.prototype.mirrorVideo = function (video) { - video.style.transform = 'rotateY(180deg)'; - video.style.webkitTransform = 'rotateY(180deg)'; - }; - return StreamManager; -}()); -exports.StreamManager = StreamManager; -//# sourceMappingURL=StreamManager.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenVidu/Subscriber.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var StreamManager_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/StreamManager.js"); -/** - * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method - */ -var Subscriber = /** @class */ (function (_super) { - __extends(Subscriber, _super); - /** - * @hidden - */ - function Subscriber(stream, targEl, properties) { - var _this = _super.call(this, stream, targEl) || this; - _this.element = _this.targetElement; - _this.stream = stream; - _this.properties = properties; - return _this; - } - /** - * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it - */ - Subscriber.prototype.subscribeToAudio = function (value) { - this.stream.getMediaStream().getAudioTracks().forEach(function (track) { - track.enabled = value; - }); - console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its audio stream'); - return this; - }; - /** - * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it - */ - Subscriber.prototype.subscribeToVideo = function (value) { - this.stream.getMediaStream().getVideoTracks().forEach(function (track) { - track.enabled = value; - }); - console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its video stream'); - return this; - }; - return Subscriber; -}(StreamManager_1.StreamManager)); -exports.Subscriber = Subscriber; -//# sourceMappingURL=Subscriber.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var LocalRecorderState; -(function (LocalRecorderState) { - LocalRecorderState["READY"] = "READY"; - LocalRecorderState["RECORDING"] = "RECORDING"; - LocalRecorderState["PAUSED"] = "PAUSED"; - LocalRecorderState["FINISHED"] = "FINISHED"; -})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {})); -//# sourceMappingURL=LocalRecorderState.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -/** - * Defines property [[OpenViduError.name]] - */ -var OpenViduErrorName; -(function (OpenViduErrorName) { - /** - * Browser is not supported by OpenVidu. - * Returned uppon unsuccessful [[Session.connect]] - */ - OpenViduErrorName["BROWSER_NOT_SUPPORTED"] = "BROWSER_NOT_SUPPORTED"; - /** - * The user hasn't granted permissions to the required input device when the browser asked for them. - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]] - */ - OpenViduErrorName["DEVICE_ACCESS_DENIED"] = "DEVICE_ACCESS_DENIED"; - /** - * The user hasn't granted permissions to capture some desktop screen when the browser asked for them. - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]] - */ - OpenViduErrorName["SCREEN_CAPTURE_DENIED"] = "SCREEN_CAPTURE_DENIED"; - /** - * Browser does not support screen sharing. - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["SCREEN_SHARING_NOT_SUPPORTED"] = "SCREEN_SHARING_NOT_SUPPORTED"; - /** - * Only for Chrome, there's no screen sharing extension installed - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["SCREEN_EXTENSION_NOT_INSTALLED"] = "SCREEN_EXTENSION_NOT_INSTALLED"; - /** - * Only for Chrome, the screen sharing extension is installed but is disabled - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["SCREEN_EXTENSION_DISABLED"] = "SCREEN_EXTENSION_DISABLED"; - /** - * No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]]) - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["INPUT_VIDEO_DEVICE_NOT_FOUND"] = "INPUT_VIDEO_DEVICE_NOT_FOUND"; - /** - * No audio input device found with the provided deviceId (property [[PublisherProperties.audioSource]]) - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["INPUT_AUDIO_DEVICE_NOT_FOUND"] = "INPUT_AUDIO_DEVICE_NOT_FOUND"; - /** - * Method [[OpenVidu.initPublisher]] has been called with properties `videoSource` and `audioSource` of - * [[PublisherProperties]] parameter both set to *false* or *null* - */ - OpenViduErrorName["NO_INPUT_SOURCE_SET"] = "NO_INPUT_SOURCE_SET"; - /** - * Some media property of [[PublisherProperties]] such as `frameRate` or `resolution` is not supported - * by the input devices (whenever it is possible they are automatically adjusted to the most similar value). - * Returned uppon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["PUBLISHER_PROPERTIES_ERROR"] = "PUBLISHER_PROPERTIES_ERROR"; - /** - * _Not in use yet_ - */ - OpenViduErrorName["OPENVIDU_PERMISSION_DENIED"] = "OPENVIDU_PERMISSION_DENIED"; - /** - * _Not in use yet_ - */ - OpenViduErrorName["OPENVIDU_NOT_CONNECTED"] = "OPENVIDU_NOT_CONNECTED"; - /** - * _Not in use yet_ - */ - OpenViduErrorName["GENERIC_ERROR"] = "GENERIC_ERROR"; -})(OpenViduErrorName = exports.OpenViduErrorName || (exports.OpenViduErrorName = {})); -/** - * Simple object to identify runtime errors on the client side - */ -var OpenViduError = /** @class */ (function () { - /** - * @hidden - */ - function OpenViduError(name, message) { - this.name = name; - this.message = message; - } - return OpenViduError; -}()); -exports.OpenViduError = OpenViduError; -//# sourceMappingURL=OpenViduError.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -/** - * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]] - */ -var VideoInsertMode; -(function (VideoInsertMode) { - /** - * Video inserted after the target element (as next sibling) - */ - VideoInsertMode["AFTER"] = "AFTER"; - /** - * Video inserted as last child of the target element - */ - VideoInsertMode["APPEND"] = "APPEND"; - /** - * Video inserted before the target element (as previous sibling) - */ - VideoInsertMode["BEFORE"] = "BEFORE"; - /** - * Video inserted as first child of the target element - */ - VideoInsertMode["PREPEND"] = "PREPEND"; - /** - * Video replaces target element - */ - VideoInsertMode["REPLACE"] = "REPLACE"; -})(VideoInsertMode = exports.VideoInsertMode || (exports.VideoInsertMode = {})); -//# sourceMappingURL=VideoInsertMode.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `connectionCreated`: dispatched by [[Session]] - * - `connectionDestroyed`: dispatched by [[Session]] - */ -var ConnectionEvent = /** @class */ (function (_super) { - __extends(ConnectionEvent, _super); - /** - * @hidden - */ - function ConnectionEvent(cancelable, target, type, connection, reason) { - var _this = _super.call(this, cancelable, target, type) || this; - _this.connection = connection; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - ConnectionEvent.prototype.callDefaultBehaviour = function () { }; - return ConnectionEvent; -}(Event_1.Event)); -exports.ConnectionEvent = ConnectionEvent; -//# sourceMappingURL=ConnectionEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var Event = /** @class */ (function () { - /** - * @hidden - */ - function Event(cancelable, target, type) { - this.hasBeenPrevented = false; - this.cancelable = cancelable; - this.target = target; - this.type = type; - } - /** - * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it - */ - Event.prototype.isDefaultPrevented = function () { - return this.hasBeenPrevented; - }; - /** - * Prevents the default behaviour of the event. The following events have a default behaviour: - * - * - `sessionDisconnected`: dispatched by [[Session]] object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or - * by calling [[Subscriber.createVideoElement]]). For every video removed, each Subscriber object will also dispatch a `videoElementDestroyed` event. - * - * - `streamDestroyed`: - * - If dispatched by a [[Publisher]] (*you* have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` - * in method [[OpenVidu.initPublisher]] or by calling [[Publisher.createVideoElement]]). For every video removed, the Publisher object will also dispatch a `videoElementDestroyed` event. - * - If dispatched by [[Session]] (*other user* has unpublished): automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to that Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or - * by calling [[Subscriber.createVideoElement]]). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event. - */ - Event.prototype.preventDefault = function () { - // tslint:disable-next-line:no-empty - this.callDefaultBehaviour = function () { }; - this.hasBeenPrevented = true; - }; - return Event; -}()); -exports.Event = Event; -//# sourceMappingURL=Event.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `publisherStartSpeaking`: dispatched by [[Session]] - * - `publisherStopSpeaking`: dispatched by [[Session]] - * - * More information: - * - This events will only be triggered for **remote streams that have audio tracks** - * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`, - * keep in mind that this will also internally remove any 'publisherStartSpeaking' event - * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]] - */ -var PublisherSpeakingEvent = /** @class */ (function (_super) { - __extends(PublisherSpeakingEvent, _super); - /** - * @hidden - */ - function PublisherSpeakingEvent(target, type, connection, streamId) { - var _this = _super.call(this, false, target, type) || this; - _this.type = type; - _this.connection = connection; - _this.streamId = streamId; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - PublisherSpeakingEvent.prototype.callDefaultBehaviour = function () { }; - return PublisherSpeakingEvent; -}(Event_1.Event)); -exports.PublisherSpeakingEvent = PublisherSpeakingEvent; -//# sourceMappingURL=PublisherSpeakingEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `recordingStarted`: dispatched by [[Session]] - * - `recordingStopped`: dispatched by [[Session]] - */ -var RecordingEvent = /** @class */ (function (_super) { - __extends(RecordingEvent, _super); - /** - * @hidden - */ - function RecordingEvent(target, type, id, name) { - var _this = _super.call(this, false, target, type) || this; - _this.id = id; - if (name !== id) { - _this.name = name; - } - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - RecordingEvent.prototype.callDefaultBehaviour = function () { }; - return RecordingEvent; -}(Event_1.Event)); -exports.RecordingEvent = RecordingEvent; -//# sourceMappingURL=RecordingEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines event `sessionDisconnected` dispatched by [[Session]] - */ -var SessionDisconnectedEvent = /** @class */ (function (_super) { - __extends(SessionDisconnectedEvent, _super); - /** - * @hidden - */ - function SessionDisconnectedEvent(target, reason) { - var _this = _super.call(this, true, target, 'sessionDisconnected') || this; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - SessionDisconnectedEvent.prototype.callDefaultBehaviour = function () { - console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'"); - var session = this.target; - // Dispose and delete all remote Connections - for (var connectionId in session.remoteConnections) { - if (!!session.remoteConnections[connectionId].stream) { - session.remoteConnections[connectionId].stream.disposeWebRtcPeer(); - session.remoteConnections[connectionId].stream.disposeMediaStream(); - if (session.remoteConnections[connectionId].stream.streamManager) { - session.remoteConnections[connectionId].stream.streamManager.removeAllVideos(); - } - delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId]; - session.remoteConnections[connectionId].dispose(); - } - delete session.remoteConnections[connectionId]; - } - }; - return SessionDisconnectedEvent; -}(Event_1.Event)); -exports.SessionDisconnectedEvent = SessionDisconnectedEvent; -//# sourceMappingURL=SessionDisconnectedEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `signal`: dispatched by [[Session]] - * - `signal:TYPE`: dispatched by [[Session]] - */ -var SignalEvent = /** @class */ (function (_super) { - __extends(SignalEvent, _super); - /** - * @hidden - */ - function SignalEvent(target, type, data, from) { - var _this = _super.call(this, false, target, type) || this; - _this.type = type; - _this.data = data; - _this.from = from; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - SignalEvent.prototype.callDefaultBehaviour = function () { }; - return SignalEvent; -}(Event_1.Event)); -exports.SignalEvent = SignalEvent; -//# sourceMappingURL=SignalEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -var Publisher_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Publisher.js"); -var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); -/** - * Defines the following events: - * - `streamCreated`: dispatched by [[Session]] and [[Publisher]] - * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]] - */ -var StreamEvent = /** @class */ (function (_super) { - __extends(StreamEvent, _super); - /** - * @hidden - */ - function StreamEvent(cancelable, target, type, stream, reason) { - var _this = _super.call(this, cancelable, target, type) || this; - _this.stream = stream; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - StreamEvent.prototype.callDefaultBehaviour = function () { - if (this.type === 'streamDestroyed') { - if (this.target instanceof Session_1.Session) { - // Remote Stream - console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'"); - this.stream.disposeWebRtcPeer(); - } - else if (this.target instanceof Publisher_1.Publisher) { - // Local Stream - console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Publisher'"); - this.stream.isLocalStreamReadyToPublish = false; - } - // Dispose the MediaStream local object - this.stream.disposeMediaStream(); - // Remove from DOM all video elements associated to this Stream, if there's a StreamManager defined - // (method Session.subscribe must have been called) - if (this.stream.streamManager) - this.stream.streamManager.removeAllVideos(); - // Delete stream from Session.remoteStreamsCreated map - delete this.stream.session.remoteStreamsCreated[this.stream.streamId]; - // Delete StreamOptionsServer from remote Connection - var remoteConnection = this.stream.session.remoteConnections[this.stream.connection.connectionId]; - if (!!remoteConnection && !!remoteConnection.options) { - var streamOptionsServer = remoteConnection.options.streams; - for (var i = streamOptionsServer.length - 1; i >= 0; --i) { - if (streamOptionsServer[i].id === this.stream.streamId) { - streamOptionsServer.splice(i, 1); - } - } - } - } - }; - return StreamEvent; -}(Event_1.Event)); -exports.StreamEvent = StreamEvent; -//# sourceMappingURL=StreamEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `streamPlaying`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]]) - */ -var StreamManagerEvent = /** @class */ (function (_super) { - __extends(StreamManagerEvent, _super); - /** - * @hidden - */ - function StreamManagerEvent(target) { - return _super.call(this, false, target, 'streamPlaying') || this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - StreamManagerEvent.prototype.callDefaultBehaviour = function () { }; - return StreamManagerEvent; -}(Event_1.Event)); -exports.StreamManagerEvent = StreamManagerEvent; -//# sourceMappingURL=StreamManagerEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -/** - * Defines the following events: - * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]] whenever a new HTML video element has been inserted into DOM by OpenVidu Browser library. See - * [Manage video players](/docs/how-do-i/manage-videos) section. - * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]] whenever an HTML video element has been removed from DOM by OpenVidu Browser library. - */ -var VideoElementEvent = /** @class */ (function (_super) { - __extends(VideoElementEvent, _super); - /** - * @hidden - */ - function VideoElementEvent(element, target, type) { - var _this = _super.call(this, false, target, type) || this; - _this.element = element; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - VideoElementEvent.prototype.callDefaultBehaviour = function () { }; - return VideoElementEvent; -}(Event_1.Event)); -exports.VideoElementEvent = VideoElementEvent; -//# sourceMappingURL=VideoElementEvent.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js": -/***/ (function(module, exports) { - -function Mapper() { - var sources = {}; - this.forEach = function (callback) { - for (var key in sources) { - var source = sources[key]; - for (var key2 in source) - callback(source[key2]); - } - ; - }; - this.get = function (id, source) { - var ids = sources[source]; - if (ids == undefined) - return undefined; - return ids[id]; - }; - this.remove = function (id, source) { - var ids = sources[source]; - if (ids == undefined) - return; - delete ids[id]; - for (var i in ids) { - return false; - } - delete sources[source]; - }; - this.set = function (value, id, source) { - if (value == undefined) - return this.remove(id, source); - var ids = sources[source]; - if (ids == undefined) - sources[source] = ids = {}; - ids[id] = value; - }; -} -; -Mapper.prototype.pop = function (id, source) { - var value = this.get(id, source); - if (value == undefined) - return undefined; - this.remove(id, source); - return value; -}; -module.exports = Mapper; -//# sourceMappingURL=Mapper.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var JsonRpcClient = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js"); -exports.JsonRpcClient = JsonRpcClient; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js": -/***/ (function(module, exports, __webpack_require__) { - -var RpcBuilder = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js"); -var WebSocketWithReconnection = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js"); -Date.now = Date.now || function () { - return +new Date; -}; -var PING_INTERVAL = 5000; -var RECONNECTING = 'RECONNECTING'; -var CONNECTED = 'CONNECTED'; -var DISCONNECTED = 'DISCONNECTED'; -var Logger = console; -function JsonRpcClient(configuration) { - var self = this; - var wsConfig = configuration.ws; - var notReconnectIfNumLessThan = -1; - var pingNextNum = 0; - var enabledPings = true; - var pingPongStarted = false; - var pingInterval; - var status = DISCONNECTED; - var onreconnecting = wsConfig.onreconnecting; - var onreconnected = wsConfig.onreconnected; - var onconnected = wsConfig.onconnected; - var onerror = wsConfig.onerror; - configuration.rpc.pull = function (params, request) { - request.reply(null, "push"); - }; - wsConfig.onreconnecting = function () { - Logger.debug("--------- ONRECONNECTING -----------"); - if (status === RECONNECTING) { - Logger.error("Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it"); - return; - } - status = RECONNECTING; - if (onreconnecting) { - onreconnecting(); - } - }; - wsConfig.onreconnected = function () { - Logger.debug("--------- ONRECONNECTED -----------"); - if (status === CONNECTED) { - Logger.error("Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it"); - return; - } - status = CONNECTED; - enabledPings = true; - updateNotReconnectIfLessThan(); - usePing(); - if (onreconnected) { - onreconnected(); - } - }; - wsConfig.onconnected = function () { - Logger.debug("--------- ONCONNECTED -----------"); - if (status === CONNECTED) { - Logger.error("Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it"); - return; - } - status = CONNECTED; - enabledPings = true; - usePing(); - if (onconnected) { - onconnected(); - } - }; - wsConfig.onerror = function (error) { - Logger.debug("--------- ONERROR -----------"); - status = DISCONNECTED; - if (onerror) { - onerror(error); - } - }; - var ws = new WebSocketWithReconnection(wsConfig); - Logger.debug('Connecting websocket to URI: ' + wsConfig.uri); - var rpcBuilderOptions = { - request_timeout: configuration.rpc.requestTimeout, - ping_request_timeout: configuration.rpc.heartbeatRequestTimeout - }; - var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) { - Logger.debug('Received request: ' + JSON.stringify(request)); - try { - var func = configuration.rpc[request.method]; - if (func === undefined) { - Logger.error("Method " + request.method + " not registered in client"); - } - else { - func(request.params, request); - } - } - catch (err) { - Logger.error('Exception processing request: ' + JSON.stringify(request)); - Logger.error(err); - } - }); - this.send = function (method, params, callback) { - if (method !== 'ping') { - Logger.debug('Request: method:' + method + " params:" + JSON.stringify(params)); - } - var requestTime = Date.now(); - rpc.encode(method, params, function (error, result) { - if (error) { - try { - Logger.error("ERROR:" + error.message + " in Request: method:" + - method + " params:" + JSON.stringify(params) + " request:" + - error.request); - if (error.data) { - Logger.error("ERROR DATA:" + JSON.stringify(error.data)); - } - } - catch (e) { } - error.requestTime = requestTime; - } - if (callback) { - if (result != undefined && result.value !== 'pong') { - Logger.debug('Response: ' + JSON.stringify(result)); - } - callback(error, result); - } - }); - }; - function updateNotReconnectIfLessThan() { - Logger.debug("notReconnectIfNumLessThan = " + pingNextNum + ' (old=' + - notReconnectIfNumLessThan + ')'); - notReconnectIfNumLessThan = pingNextNum; - } - function sendPing() { - if (enabledPings) { - var params = null; - if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) { - params = { - interval: configuration.heartbeat || PING_INTERVAL - }; - } - pingNextNum++; - self.send('ping', params, (function (pingNum) { - return function (error, result) { - if (error) { - Logger.debug("Error in ping request #" + pingNum + " (" + - error.message + ")"); - if (pingNum > notReconnectIfNumLessThan) { - enabledPings = false; - updateNotReconnectIfLessThan(); - Logger.debug("Server did not respond to ping message #" + - pingNum + ". Reconnecting... "); - ws.reconnectWs(); - } - } - }; - })(pingNextNum)); - } - else { - Logger.debug("Trying to send ping, but ping is not enabled"); - } - } - function usePing() { - if (!pingPongStarted) { - Logger.debug("Starting ping (if configured)"); - pingPongStarted = true; - if (configuration.heartbeat != undefined) { - pingInterval = setInterval(sendPing, configuration.heartbeat); - sendPing(); - } - } - } - this.close = function () { - Logger.debug("Closing jsonRpcClient explicitly by client"); - if (pingInterval != undefined) { - Logger.debug("Clearing ping interval"); - clearInterval(pingInterval); - } - pingPongStarted = false; - enabledPings = false; - if (configuration.sendCloseMessage) { - Logger.debug("Sending close message"); - this.send('closeSession', null, function (error, result) { - if (error) { - Logger.error("Error sending close message: " + JSON.stringify(error)); - } - ws.close(); - }); - } - else { - ws.close(); - } - }; - this.forceClose = function (millis) { - ws.forceClose(millis); - }; - this.reconnect = function () { - ws.reconnectWs(); - }; -} -module.exports = JsonRpcClient; -//# sourceMappingURL=jsonrpcclient.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var WebSocketWithReconnection = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js"); -exports.WebSocketWithReconnection = WebSocketWithReconnection; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) { -var BrowserWebSocket = global.WebSocket || global.MozWebSocket; -var Logger = console; -var MAX_RETRIES = 2000; -var RETRY_TIME_MS = 3000; -var CONNECTING = 0; -var OPEN = 1; -var CLOSING = 2; -var CLOSED = 3; -function WebSocketWithReconnection(config) { - var closing = false; - var registerMessageHandler; - var wsUri = config.uri; - var useSockJS = config.useSockJS; - var reconnecting = false; - var forcingDisconnection = false; - var ws; - if (useSockJS) { - ws = new SockJS(wsUri); - } - else { - ws = new WebSocket(wsUri); - } - ws.onopen = function () { - logConnected(ws, wsUri); - if (config.onconnected) { - config.onconnected(); - } - }; - ws.onerror = function (error) { - Logger.error("Could not connect to " + wsUri + " (invoking onerror if defined)", error); - if (config.onerror) { - config.onerror(error); - } - }; - function logConnected(ws, wsUri) { - try { - Logger.debug("WebSocket connected to " + wsUri); - } - catch (e) { - Logger.error(e); - } - } - var reconnectionOnClose = function () { - if (ws.readyState === CLOSED) { - if (closing) { - Logger.debug("Connection closed by user"); - } - else { - Logger.debug("Connection closed unexpectecly. Reconnecting..."); - reconnectToSameUri(MAX_RETRIES, 1); - } - } - else { - Logger.debug("Close callback from previous websocket. Ignoring it"); - } - }; - ws.onclose = reconnectionOnClose; - function reconnectToSameUri(maxRetries, numRetries) { - Logger.debug("reconnectToSameUri (attempt #" + numRetries + ", max=" + maxRetries + ")"); - if (numRetries === 1) { - if (reconnecting) { - Logger.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection."); - return; - } - else { - reconnecting = true; - } - if (config.onreconnecting) { - config.onreconnecting(); - } - } - if (forcingDisconnection) { - reconnectToNewUri(maxRetries, numRetries, wsUri); - } - else { - if (config.newWsUriOnReconnection) { - config.newWsUriOnReconnection(function (error, newWsUri) { - if (error) { - Logger.debug(error); - setTimeout(function () { - reconnectToSameUri(maxRetries, numRetries + 1); - }, RETRY_TIME_MS); - } - else { - reconnectToNewUri(maxRetries, numRetries, newWsUri); - } - }); - } - else { - reconnectToNewUri(maxRetries, numRetries, wsUri); - } - } - } - function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) { - Logger.debug("Reconnection attempt #" + numRetries); - ws.close(); - wsUri = reconnectWsUri || wsUri; - var newWs; - if (useSockJS) { - newWs = new SockJS(wsUri); - } - else { - newWs = new WebSocket(wsUri); - } - newWs.onopen = function () { - Logger.debug("Reconnected after " + numRetries + " attempts..."); - logConnected(newWs, wsUri); - reconnecting = false; - registerMessageHandler(); - if (config.onreconnected()) { - config.onreconnected(); - } - newWs.onclose = reconnectionOnClose; - }; - var onErrorOrClose = function (error) { - Logger.warn("Reconnection error: ", error); - if (numRetries === maxRetries) { - if (config.ondisconnect) { - config.ondisconnect(); - } - } - else { - setTimeout(function () { - reconnectToSameUri(maxRetries, numRetries + 1); - }, RETRY_TIME_MS); - } - }; - newWs.onerror = onErrorOrClose; - ws = newWs; - } - this.close = function () { - closing = true; - ws.close(); - }; - this.forceClose = function (millis) { - Logger.debug("Testing: Force WebSocket close"); - if (millis) { - Logger.debug("Testing: Change wsUri for " + millis + " millis to simulate net failure"); - var goodWsUri = wsUri; - wsUri = "wss://21.234.12.34.4:443/"; - forcingDisconnection = true; - setTimeout(function () { - Logger.debug("Testing: Recover good wsUri " + goodWsUri); - wsUri = goodWsUri; - forcingDisconnection = false; - }, millis); - } - ws.close(); - }; - this.reconnectWs = function () { - Logger.debug("reconnectWs"); - reconnectToSameUri(MAX_RETRIES, 1, wsUri); - }; - this.send = function (message) { - ws.send(message); - }; - this.addEventListener = function (type, callback) { - registerMessageHandler = function () { - ws.addEventListener(type, callback); - }; - registerMessageHandler(); - }; -} -module.exports = WebSocketWithReconnection; -//# sourceMappingURL=webSocketWithReconnection.js.map -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var defineProperty_IE8 = false; -if (Object.defineProperty) { - try { - Object.defineProperty({}, "x", {}); - } - catch (e) { - defineProperty_IE8 = true; - } -} -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () { - return fToBind.apply(this instanceof fNOP && oThis - ? this - : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); - }; - fNOP.prototype = this.prototype; - fBound.prototype = new fNOP(); - return fBound; - }; -} -var EventEmitter = __webpack_require__("./node_modules/events/events.js").EventEmitter; -var inherits = __webpack_require__("../../../../openvidu-browser/node_modules/inherits/inherits_browser.js"); -var packers = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js"); -var Mapper = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js"); -var BASE_TIMEOUT = 5000; -function unifyResponseMethods(responseMethods) { - if (!responseMethods) - return {}; - for (var key in responseMethods) { - var value = responseMethods[key]; - if (typeof value == 'string') - responseMethods[key] = - { - response: value - }; - } - ; - return responseMethods; -} -; -function unifyTransport(transport) { - if (!transport) - return; - if (transport instanceof Function) - return { send: transport }; - if (transport.send instanceof Function) - return transport; - if (transport.postMessage instanceof Function) { - transport.send = transport.postMessage; - return transport; - } - if (transport.write instanceof Function) { - transport.send = transport.write; - return transport; - } - if (transport.onmessage !== undefined) - return; - if (transport.pause instanceof Function) - return; - throw new SyntaxError("Transport is not a function nor a valid object"); -} -; -function RpcNotification(method, params) { - if (defineProperty_IE8) { - this.method = method; - this.params = params; - } - else { - Object.defineProperty(this, 'method', { value: method, enumerable: true }); - Object.defineProperty(this, 'params', { value: params, enumerable: true }); - } -} -; -function RpcBuilder(packer, options, transport, onRequest) { - var self = this; - if (!packer) - throw new SyntaxError('Packer is not defined'); - if (!packer.pack || !packer.unpack) - throw new SyntaxError('Packer is invalid'); - var responseMethods = unifyResponseMethods(packer.responseMethods); - if (options instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after onRequest"); - onRequest = options; - transport = undefined; - options = undefined; - } - ; - if (options && options.send instanceof Function) { - if (transport && !(transport instanceof Function)) - throw new SyntaxError("Only a function can be after transport"); - onRequest = transport; - transport = options; - options = undefined; - } - ; - if (transport instanceof Function) { - if (onRequest != undefined) - throw new SyntaxError("There can't be parameters after onRequest"); - onRequest = transport; - transport = undefined; - } - ; - if (transport && transport.send instanceof Function) - if (onRequest && !(onRequest instanceof Function)) - throw new SyntaxError("Only a function can be after transport"); - options = options || {}; - EventEmitter.call(this); - if (onRequest) - this.on('request', onRequest); - if (defineProperty_IE8) - this.peerID = options.peerID; - else - Object.defineProperty(this, 'peerID', { value: options.peerID }); - var max_retries = options.max_retries || 0; - function transportMessage(event) { - self.decode(event.data || event); - } - ; - this.getTransport = function () { - return transport; - }; - this.setTransport = function (value) { - if (transport) { - if (transport.removeEventListener) - transport.removeEventListener('message', transportMessage); - else if (transport.removeListener) - transport.removeListener('data', transportMessage); - } - ; - if (value) { - if (value.addEventListener) - value.addEventListener('message', transportMessage); - else if (value.addListener) - value.addListener('data', transportMessage); - } - ; - transport = unifyTransport(value); - }; - if (!defineProperty_IE8) - Object.defineProperty(this, 'transport', { - get: this.getTransport.bind(this), - set: this.setTransport.bind(this) - }); - this.setTransport(transport); - var request_timeout = options.request_timeout || BASE_TIMEOUT; - var ping_request_timeout = options.ping_request_timeout || request_timeout; - var response_timeout = options.response_timeout || BASE_TIMEOUT; - var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT; - var requestID = 0; - var requests = new Mapper(); - var responses = new Mapper(); - var processedResponses = new Mapper(); - var message2Key = {}; - function storeResponse(message, id, dest) { - var response = { - message: message, - timeout: setTimeout(function () { - responses.remove(id, dest); - }, response_timeout) - }; - responses.set(response, id, dest); - } - ; - function storeProcessedResponse(ack, from) { - var timeout = setTimeout(function () { - processedResponses.remove(ack, from); - }, duplicates_timeout); - processedResponses.set(timeout, ack, from); - } - ; - function RpcRequest(method, params, id, from, transport) { - RpcNotification.call(this, method, params); - this.getTransport = function () { - return transport; - }; - this.setTransport = function (value) { - transport = unifyTransport(value); - }; - if (!defineProperty_IE8) - Object.defineProperty(this, 'transport', { - get: this.getTransport.bind(this), - set: this.setTransport.bind(this) - }); - var response = responses.get(id, from); - if (!(transport || self.getTransport())) { - if (defineProperty_IE8) - this.duplicated = Boolean(response); - else - Object.defineProperty(this, 'duplicated', { - value: Boolean(response) - }); - } - var responseMethod = responseMethods[method]; - this.pack = packer.pack.bind(packer, this, id); - this.reply = function (error, result, transport) { - if (error instanceof Function || error && error.send instanceof Function) { - if (result != undefined) - throw new SyntaxError("There can't be parameters after callback"); - transport = error; - result = null; - error = undefined; - } - else if (result instanceof Function - || result && result.send instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after callback"); - transport = result; - result = null; - } - ; - transport = unifyTransport(transport); - if (response) - clearTimeout(response.timeout); - if (from != undefined) { - if (error) - error.dest = from; - if (result) - result.dest = from; - } - ; - var message; - if (error || result != undefined) { - if (self.peerID != undefined) { - if (error) - error.from = self.peerID; - else - result.from = self.peerID; - } - if (responseMethod) { - if (responseMethod.error == undefined && error) - message = - { - error: error - }; - else { - var method = error - ? responseMethod.error - : responseMethod.response; - message = - { - method: method, - params: error || result - }; - } - } - else - message = - { - error: error, - result: result - }; - message = packer.pack(message, id); - } - else if (response) - message = response.message; - else - message = packer.pack({ result: null }, id); - storeResponse(message, id, from); - transport = transport || this.getTransport() || self.getTransport(); - if (transport) - return transport.send(message); - return message; - }; - } - ; - inherits(RpcRequest, RpcNotification); - function cancel(message) { - var key = message2Key[message]; - if (!key) - return; - delete message2Key[message]; - var request = requests.pop(key.id, key.dest); - if (!request) - return; - clearTimeout(request.timeout); - storeProcessedResponse(key.id, key.dest); - } - ; - this.cancel = function (message) { - if (message) - return cancel(message); - for (var message in message2Key) - cancel(message); - }; - this.close = function () { - var transport = this.getTransport(); - if (transport && transport.close) - transport.close(); - this.cancel(); - processedResponses.forEach(clearTimeout); - responses.forEach(function (response) { - clearTimeout(response.timeout); - }); - }; - this.encode = function (method, params, dest, transport, callback) { - if (params instanceof Function) { - if (dest != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = params; - transport = undefined; - dest = undefined; - params = undefined; - } - else if (dest instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = dest; - transport = undefined; - dest = undefined; - } - else if (transport instanceof Function) { - if (callback != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = transport; - transport = undefined; - } - ; - if (self.peerID != undefined) { - params = params || {}; - params.from = self.peerID; - } - ; - if (dest != undefined) { - params = params || {}; - params.dest = dest; - } - ; - var message = { - method: method, - params: params - }; - if (callback) { - var id = requestID++; - var retried = 0; - message = packer.pack(message, id); - function dispatchCallback(error, result) { - self.cancel(message); - callback(error, result); - } - ; - var request = { - message: message, - callback: dispatchCallback, - responseMethods: responseMethods[method] || {} - }; - var encode_transport = unifyTransport(transport); - function sendRequest(transport) { - var rt = (method === 'ping' ? ping_request_timeout : request_timeout); - request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++)); - message2Key[message] = { id: id, dest: dest }; - requests.set(request, id, dest); - transport = transport || encode_transport || self.getTransport(); - if (transport) - return transport.send(message); - return message; - } - ; - function retry(transport) { - transport = unifyTransport(transport); - console.warn(retried + ' retry for request message:', message); - var timeout = processedResponses.pop(id, dest); - clearTimeout(timeout); - return sendRequest(transport); - } - ; - function timeout() { - if (retried < max_retries) - return retry(transport); - var error = new Error('Request has timed out'); - error.request = message; - error.retry = retry; - dispatchCallback(error); - } - ; - return sendRequest(transport); - } - ; - message = packer.pack(message); - transport = transport || this.getTransport(); - if (transport) - return transport.send(message); - return message; - }; - this.decode = function (message, transport) { - if (!message) - throw new TypeError("Message is not defined"); - try { - message = packer.unpack(message); - } - catch (e) { - return console.debug(e, message); - } - ; - var id = message.id; - var ack = message.ack; - var method = message.method; - var params = message.params || {}; - var from = params.from; - var dest = params.dest; - if (self.peerID != undefined && from == self.peerID) - return; - if (id == undefined && ack == undefined) { - var notification = new RpcNotification(method, params); - if (self.emit('request', notification)) - return; - return notification; - } - ; - function processRequest() { - transport = unifyTransport(transport) || self.getTransport(); - if (transport) { - var response = responses.get(id, from); - if (response) - return transport.send(response.message); - } - ; - var idAck = (id != undefined) ? id : ack; - var request = new RpcRequest(method, params, idAck, from, transport); - if (self.emit('request', request)) - return; - return request; - } - ; - function processResponse(request, error, result) { - request.callback(error, result); - } - ; - function duplicatedResponse(timeout) { - console.warn("Response already processed", message); - clearTimeout(timeout); - storeProcessedResponse(ack, from); - } - ; - if (method) { - if (dest == undefined || dest == self.peerID) { - var request = requests.get(ack, from); - if (request) { - var responseMethods = request.responseMethods; - if (method == responseMethods.error) - return processResponse(request, params); - if (method == responseMethods.response) - return processResponse(request, null, params); - return processRequest(); - } - var processed = processedResponses.get(ack, from); - if (processed) - return duplicatedResponse(processed); - } - return processRequest(); - } - ; - var error = message.error; - var result = message.result; - if (error && error.dest && error.dest != self.peerID) - return; - if (result && result.dest && result.dest != self.peerID) - return; - var request = requests.get(ack, from); - if (!request) { - var processed = processedResponses.get(ack, from); - if (processed) - return duplicatedResponse(processed); - return console.warn("No callback was defined for this message", message); - } - ; - processResponse(request, error, result); - }; -} -; -inherits(RpcBuilder, EventEmitter); -RpcBuilder.RpcNotification = RpcNotification; -module.exports = RpcBuilder; -var clients = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js"); -var transports = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js"); -RpcBuilder.clients = clients; -RpcBuilder.clients.transports = transports; -RpcBuilder.packers = packers; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js": -/***/ (function(module, exports) { - -function pack(message, id) { - var result = { - jsonrpc: "2.0" - }; - if (message.method) { - result.method = message.method; - if (message.params) - result.params = message.params; - if (id != undefined) - result.id = id; - } - else if (id != undefined) { - if (message.error) { - if (message.result !== undefined) - throw new TypeError("Both result and error are defined"); - result.error = message.error; - } - else if (message.result !== undefined) - result.result = message.result; - else - throw new TypeError("No result or error is defined"); - result.id = id; - } - ; - return JSON.stringify(result); -} -; -function unpack(message) { - var result = message; - if (typeof message === 'string' || message instanceof String) { - result = JSON.parse(message); - } - var version = result.jsonrpc; - if (version !== '2.0') - throw new TypeError("Invalid JsonRPC version '" + version + "': " + message); - if (result.method == undefined) { - if (result.id == undefined) - throw new TypeError("Invalid message: " + message); - var result_defined = result.result !== undefined; - var error_defined = result.error !== undefined; - if (result_defined && error_defined) - throw new TypeError("Both result and error are defined: " + message); - if (!result_defined && !error_defined) - throw new TypeError("No result or error is defined: " + message); - result.ack = result.id; - delete result.id; - } - return result; -} -; -exports.pack = pack; -exports.unpack = unpack; -//# sourceMappingURL=JsonRPC.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js": -/***/ (function(module, exports) { - -function pack(message) { - throw new TypeError("Not yet implemented"); -} -; -function unpack(message) { - throw new TypeError("Not yet implemented"); -} -; -exports.pack = pack; -exports.unpack = unpack; -//# sourceMappingURL=XmlRPC.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var JsonRPC = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js"); -var XmlRPC = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js"); -exports.JsonRPC = JsonRPC; -exports.XmlRPC = XmlRPC; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js": -/***/ (function(module, exports, __webpack_require__) { - -var freeice = __webpack_require__("../../../../openvidu-browser/node_modules/freeice/index.js"); -var inherits = __webpack_require__("../../../../openvidu-browser/node_modules/inherits/inherits_browser.js"); -var UAParser = __webpack_require__("../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js"); -var uuid = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/index.js"); -var hark = __webpack_require__("../../../../openvidu-browser/node_modules/hark/hark.js"); -var EventEmitter = __webpack_require__("./node_modules/events/events.js").EventEmitter; -var recursive = __webpack_require__("../../../../openvidu-browser/node_modules/merge/merge.js").recursive.bind(undefined, true); -var sdpTranslator = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js"); -var logger = window.Logger || console; -var MEDIA_CONSTRAINTS = { - audio: true, - video: { - width: 640, - framerate: 15 - } -}; -var ua = (window && window.navigator) ? window.navigator.userAgent : ''; -var parser = new UAParser(ua); -var browser = parser.getBrowser(); -var usePlanB = false; -if (browser.name === 'Chrome' || browser.name === 'Chromium') { - logger.debug(browser.name + ": using SDP PlanB"); - usePlanB = true; -} -function noop(error) { - if (error) - logger.error(error); -} -function trackStop(track) { - track.stop && track.stop(); -} -function streamStop(stream) { - stream.getTracks().forEach(trackStop); -} -var dumpSDP = function (description) { - if (typeof description === 'undefined' || description === null) { - return ''; - } - return 'type: ' + description.type + '\r\n' + description.sdp; -}; -function bufferizeCandidates(pc, onerror) { - var candidatesQueue = []; - pc.addEventListener('signalingstatechange', function () { - if (this.signalingState === 'stable') { - while (candidatesQueue.length) { - var entry = candidatesQueue.shift(); - pc.addIceCandidate(entry.candidate, entry.callback, entry.callback); - } - } - }); - return function (candidate, callback) { - callback = callback || onerror; - switch (pc.signalingState) { - case 'closed': - callback(new Error('PeerConnection object is closed')); - break; - case 'stable': - if (pc.remoteDescription) { - pc.addIceCandidate(candidate, callback, callback); - } - break; - default: - candidatesQueue.push({ - candidate: candidate, - callback: callback - }); - } - }; -} -function removeFIDFromOffer(sdp) { - var n = sdp.indexOf("a=ssrc-group:FID"); - if (n > 0) { - return sdp.slice(0, n); - } - else { - return sdp; - } -} -function getSimulcastInfo(videoStream) { - var videoTracks = videoStream.getVideoTracks(); - if (!videoTracks.length) { - logger.warn('No video tracks available in the video stream'); - return ''; - } - var lines = [ - 'a=x-google-flag:conference', - 'a=ssrc-group:SIM 1 2 3', - 'a=ssrc:1 cname:localVideo', - 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id, - 'a=ssrc:1 mslabel:' + videoStream.id, - 'a=ssrc:1 label:' + videoTracks[0].id, - 'a=ssrc:2 cname:localVideo', - 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id, - 'a=ssrc:2 mslabel:' + videoStream.id, - 'a=ssrc:2 label:' + videoTracks[0].id, - 'a=ssrc:3 cname:localVideo', - 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id, - 'a=ssrc:3 mslabel:' + videoStream.id, - 'a=ssrc:3 label:' + videoTracks[0].id - ]; - lines.push(''); - return lines.join('\n'); -} -function WebRtcPeer(mode, options, callback) { - if (!(this instanceof WebRtcPeer)) { - return new WebRtcPeer(mode, options, callback); - } - WebRtcPeer.super_.call(this); - if (options instanceof Function) { - callback = options; - options = undefined; - } - options = options || {}; - callback = (callback || noop).bind(this); - var self = this; - var localVideo = options.localVideo; - var remoteVideo = options.remoteVideo; - var videoStream = options.videoStream; - var audioStream = options.audioStream; - var mediaConstraints = options.mediaConstraints; - var connectionConstraints = options.connectionConstraints; - var pc = options.peerConnection; - var sendSource = options.sendSource || 'webcam'; - var guid = uuid.v4(); - var configuration = recursive({ - iceServers: (!!options.iceServers && options.iceServers.length > 0) ? options.iceServers : freeice() - }, options.configuration); - var onicecandidate = options.onicecandidate; - if (onicecandidate) - this.on('icecandidate', onicecandidate); - var oncandidategatheringdone = options.oncandidategatheringdone; - if (oncandidategatheringdone) { - this.on('candidategatheringdone', oncandidategatheringdone); - } - var simulcast = options.simulcast; - var multistream = options.multistream; - var interop = new sdpTranslator.Interop(); - var candidatesQueueOut = []; - var candidategatheringdone = false; - Object.defineProperties(this, { - 'peerConnection': { - get: function () { - return pc; - } - }, - 'id': { - value: options.id || guid, - writable: false - }, - 'remoteVideo': { - get: function () { - return remoteVideo; - } - }, - 'localVideo': { - get: function () { - return localVideo; - } - }, - 'currentFrame': { - get: function () { - if (!remoteVideo) - return; - if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA) - throw new Error('No video stream data available'); - var canvas = document.createElement('canvas'); - canvas.width = remoteVideo.videoWidth; - canvas.height = remoteVideo.videoHeight; - canvas.getContext('2d').drawImage(remoteVideo, 0, 0); - return canvas; - } - } - }); - if (!pc) { - pc = new RTCPeerConnection(configuration); - } - pc.addEventListener('icecandidate', function (event) { - var candidate = event.candidate; - if (EventEmitter.listenerCount(self, 'icecandidate') || - EventEmitter.listenerCount(self, 'candidategatheringdone')) { - if (candidate) { - var cand; - if (multistream && usePlanB) { - cand = interop.candidateToUnifiedPlan(candidate); - } - else { - cand = candidate; - } - self.emit('icecandidate', cand); - candidategatheringdone = false; - } - else if (!candidategatheringdone) { - self.emit('candidategatheringdone'); - candidategatheringdone = true; - } - } - else if (!candidategatheringdone) { - candidatesQueueOut.push(candidate); - if (!candidate) - candidategatheringdone = true; - } - }); - pc.onaddstream = options.onaddstream; - pc.onnegotiationneeded = options.onnegotiationneeded; - this.on('newListener', function (event, listener) { - if (event === 'icecandidate' || event === 'candidategatheringdone') { - while (candidatesQueueOut.length) { - var candidate = candidatesQueueOut.shift(); - if (!candidate === (event === 'candidategatheringdone')) { - listener(candidate); - } - } - } - }); - var addIceCandidate = bufferizeCandidates(pc); - this.addIceCandidate = function (iceCandidate, callback) { - var candidate; - if (multistream && usePlanB) { - candidate = interop.candidateToPlanB(iceCandidate); - } - else { - candidate = new RTCIceCandidate(iceCandidate); - } - logger.debug('Remote ICE candidate received', iceCandidate); - callback = (callback || noop).bind(this); - addIceCandidate(candidate, callback); - }; - this.generateOffer = function (callback) { - callback = callback.bind(this); - var offerAudio = true; - var offerVideo = true; - if (mediaConstraints) { - offerAudio = (typeof mediaConstraints.audio === 'boolean') ? - mediaConstraints.audio : true; - offerVideo = (typeof mediaConstraints.video === 'boolean') ? - mediaConstraints.video : true; - } - var browserDependantConstraints = { - offerToReceiveAudio: (mode !== 'sendonly' && offerAudio), - offerToReceiveVideo: (mode !== 'sendonly' && offerVideo) - }; - var constraints = browserDependantConstraints; - logger.debug('constraints: ' + JSON.stringify(constraints)); - pc.createOffer(constraints).then(function (offer) { - logger.debug('Created SDP offer'); - offer = mangleSdpToAddSimulcast(offer); - return pc.setLocalDescription(offer); - }).then(function () { - var localDescription = pc.localDescription; - logger.debug('Local description set', localDescription.sdp); - if (multistream && usePlanB) { - localDescription = interop.toUnifiedPlan(localDescription); - logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription)); - } - callback(null, localDescription.sdp, self.processAnswer.bind(self)); - }).catch(callback); - }; - this.getLocalSessionDescriptor = function () { - return pc.localDescription; - }; - this.getRemoteSessionDescriptor = function () { - return pc.remoteDescription; - }; - function setRemoteVideo() { - if (remoteVideo) { - remoteVideo.pause(); - var stream = pc.getRemoteStreams()[0]; - remoteVideo.srcObject = stream; - logger.debug('Remote stream:', stream); - remoteVideo.load(); - } - } - this.showLocalVideo = function () { - localVideo.srcObject = videoStream; - localVideo.muted = true; - }; - this.processAnswer = function (sdpAnswer, callback) { - callback = (callback || noop).bind(this); - var answer = new RTCSessionDescription({ - type: 'answer', - sdp: sdpAnswer - }); - if (multistream && usePlanB) { - var planBAnswer = interop.toPlanB(answer); - logger.debug('asnwer::planB', dumpSDP(planBAnswer)); - answer = planBAnswer; - } - logger.debug('SDP answer received, setting remote description'); - if (pc.signalingState === 'closed') { - return callback('PeerConnection is closed'); - } - pc.setRemoteDescription(answer, function () { - setRemoteVideo(); - callback(); - }, callback); - }; - this.processOffer = function (sdpOffer, callback) { - callback = callback.bind(this); - var offer = new RTCSessionDescription({ - type: 'offer', - sdp: sdpOffer - }); - if (multistream && usePlanB) { - var planBOffer = interop.toPlanB(offer); - logger.debug('offer::planB', dumpSDP(planBOffer)); - offer = planBOffer; - } - logger.debug('SDP offer received, setting remote description'); - if (pc.signalingState === 'closed') { - return callback('PeerConnection is closed'); - } - pc.setRemoteDescription(offer).then(function () { - return setRemoteVideo(); - }).then(function () { - return pc.createAnswer(); - }).then(function (answer) { - answer = mangleSdpToAddSimulcast(answer); - logger.debug('Created SDP answer'); - return pc.setLocalDescription(answer); - }).then(function () { - var localDescription = pc.localDescription; - if (multistream && usePlanB) { - localDescription = interop.toUnifiedPlan(localDescription); - logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription)); - } - logger.debug('Local description set', localDescription.sdp); - callback(null, localDescription.sdp); - }).catch(callback); - }; - function mangleSdpToAddSimulcast(answer) { - if (simulcast) { - if (browser.name === 'Chrome' || browser.name === 'Chromium') { - logger.debug('Adding multicast info'); - answer = new RTCSessionDescription({ - 'type': answer.type, - 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream) - }); - } - else { - logger.warn('Simulcast is only available in Chrome browser.'); - } - } - return answer; - } - function start() { - if (pc.signalingState === 'closed') { - callback('The peer connection object is in "closed" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue'); - } - if (videoStream && localVideo) { - self.showLocalVideo(); - } - if (videoStream) { - pc.addStream(videoStream); - } - if (audioStream) { - pc.addStream(audioStream); - } - var browser = parser.getBrowser(); - if (mode === 'sendonly' && - (browser.name === 'Chrome' || browser.name === 'Chromium') && - browser.major === 39) { - mode = 'sendrecv'; - } - callback(); - } - if (mode !== 'recvonly' && !videoStream && !audioStream) { - function getMedia(constraints) { - if (constraints === undefined) { - constraints = MEDIA_CONSTRAINTS; - } - navigator.mediaDevices.getUserMedia(constraints).then(function (stream) { - videoStream = stream; - start(); - }).catch(callback); - } - if (sendSource === 'webcam') { - getMedia(mediaConstraints); - } - else { - getScreenConstraints(sendSource, function (error, constraints_) { - if (error) - return callback(error); - constraints = [mediaConstraints]; - constraints.unshift(constraints_); - getMedia(recursive.apply(undefined, constraints)); - }, guid); - } - } - else { - setTimeout(start, 0); - } - this.on('_dispose', function () { - if (localVideo) { - localVideo.pause(); - localVideo.srcObject = null; - localVideo.load(); - localVideo.muted = false; - } - if (remoteVideo) { - remoteVideo.pause(); - remoteVideo.srcObject = null; - remoteVideo.load(); - } - self.removeAllListeners(); - if (window.cancelChooseDesktopMedia !== undefined) { - window.cancelChooseDesktopMedia(guid); - } - }); -} -inherits(WebRtcPeer, EventEmitter); -function createEnableDescriptor(type) { - var method = 'get' + type + 'Tracks'; - return { - enumerable: true, - get: function () { - if (!this.peerConnection) - return; - var streams = this.peerConnection.getLocalStreams(); - if (!streams.length) - return; - for (var i = 0, stream; stream = streams[i]; i++) { - var tracks = stream[method](); - for (var j = 0, track; track = tracks[j]; j++) - if (!track.enabled) - return false; - } - return true; - }, - set: function (value) { - function trackSetEnable(track) { - track.enabled = value; - } - this.peerConnection.getLocalStreams().forEach(function (stream) { - stream[method]().forEach(trackSetEnable); - }); - } - }; -} -Object.defineProperties(WebRtcPeer.prototype, { - 'enabled': { - enumerable: true, - get: function () { - return this.audioEnabled && this.videoEnabled; - }, - set: function (value) { - this.audioEnabled = this.videoEnabled = value; - } - }, - 'audioEnabled': createEnableDescriptor('Audio'), - 'videoEnabled': createEnableDescriptor('Video') -}); -WebRtcPeer.prototype.getLocalStream = function (index) { - if (this.peerConnection) { - return this.peerConnection.getLocalStreams()[index || 0]; - } -}; -WebRtcPeer.prototype.getRemoteStream = function (index) { - if (this.peerConnection) { - return this.peerConnection.getRemoteStreams()[index || 0]; - } -}; -WebRtcPeer.prototype.dispose = function () { - logger.debug('Disposing WebRtcPeer'); - var pc = this.peerConnection; - try { - if (pc) { - if (pc.signalingState === 'closed') - return; - pc.getLocalStreams().forEach(streamStop); - pc.close(); - } - } - catch (err) { - logger.warn('Exception disposing webrtc peer ' + err); - } - this.emit('_dispose'); -}; -function WebRtcPeerRecvonly(options, callback) { - if (!(this instanceof WebRtcPeerRecvonly)) { - return new WebRtcPeerRecvonly(options, callback); - } - WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback); -} -inherits(WebRtcPeerRecvonly, WebRtcPeer); -function WebRtcPeerSendonly(options, callback) { - if (!(this instanceof WebRtcPeerSendonly)) { - return new WebRtcPeerSendonly(options, callback); - } - WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback); -} -inherits(WebRtcPeerSendonly, WebRtcPeer); -function WebRtcPeerSendrecv(options, callback) { - if (!(this instanceof WebRtcPeerSendrecv)) { - return new WebRtcPeerSendrecv(options, callback); - } - WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback); -} -inherits(WebRtcPeerSendrecv, WebRtcPeer); -function harkUtils(stream, options) { - return hark(stream, options); -} -exports.bufferizeCandidates = bufferizeCandidates; -exports.WebRtcPeerRecvonly = WebRtcPeerRecvonly; -exports.WebRtcPeerSendonly = WebRtcPeerSendonly; -exports.WebRtcPeerSendrecv = WebRtcPeerSendrecv; -exports.hark = harkUtils; -//# sourceMappingURL=WebRtcPeer.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var WebRtcPeer = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js"); -exports.WebRtcPeer = WebRtcPeer; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js": -/***/ (function(module, exports) { - -window.getScreenId = function (callback) { - if (!!navigator.mozGetUserMedia) { - callback(null, 'firefox', { - video: { - mozMediaSource: 'window', - mediaSource: 'window' - } - }); - return; - } - window.addEventListener('message', onIFrameCallback); - function onIFrameCallback(event) { - if (!event.data) - return; - if (event.data.chromeMediaSourceId) { - if (event.data.chromeMediaSourceId === 'PermissionDeniedError') { - callback('permission-denied'); - } - else { - callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId)); - } - window.removeEventListener('message', onIFrameCallback); - } - if (event.data.chromeExtensionStatus) { - callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus)); - window.removeEventListener('message', onIFrameCallback); - } - } - setTimeout(postGetSourceIdMessage, 100); -}; -function getScreenConstraints(error, sourceId) { - var screen_constraints = { - audio: false, - video: { - mandatory: { - chromeMediaSource: error ? 'screen' : 'desktop', - maxWidth: window.screen.width > 1920 ? window.screen.width : 1920, - maxHeight: window.screen.height > 1080 ? window.screen.height : 1080 - }, - optional: [] - } - }; - if (sourceId) { - screen_constraints.video.mandatory.chromeMediaSourceId = sourceId; - } - return screen_constraints; -} -var iframe; -function postGetSourceIdMessage() { - if (!iframe) { - loadIFrame(postGetSourceIdMessage); - return; - } - if (!iframe.isLoaded) { - setTimeout(postGetSourceIdMessage, 100); - return; - } - iframe.contentWindow.postMessage({ - captureSourceId: true - }, '*'); -} -function loadIFrame(loadCallback) { - if (iframe) { - loadCallback(); - return; - } - iframe = document.createElement('iframe'); - iframe.onload = function () { - iframe.isLoaded = true; - loadCallback(); - }; - iframe.src = 'https://www.webrtc-experiment.com/getSourceId/'; - iframe.style.display = 'none'; - (document.body || document.documentElement).appendChild(iframe); -} -window.getChromeExtensionStatus = function (callback) { - if (!!navigator.mozGetUserMedia) { - callback('installed-enabled'); - return; - } - window.addEventListener('message', onIFrameCallback); - function onIFrameCallback(event) { - if (!event.data) - return; - if (event.data.chromeExtensionStatus) { - callback(event.data.chromeExtensionStatus); - } - window.removeEventListener('message', onIFrameCallback); - } - setTimeout(postGetChromeExtensionStatusMessage, 100); -}; -function postGetChromeExtensionStatusMessage() { - if (!iframe) { - loadIFrame(postGetChromeExtensionStatusMessage); - return; - } - if (!iframe.isLoaded) { - setTimeout(postGetChromeExtensionStatusMessage, 100); - return; - } - iframe.contentWindow.postMessage({ - getChromeExtensionStatus: true - }, '*'); -} -exports.getScreenId = getScreenId; -//# sourceMappingURL=Screen-Capturing-Auto.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js": -/***/ (function(module, exports) { - -var chromeMediaSource = 'screen'; -var screenCallback; -var isFirefox = typeof window.InstallTrigger !== 'undefined'; -var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; -var isChrome = !!window.chrome && !isOpera; -window.addEventListener('message', function (event) { - if (event.origin != window.location.origin) { - return; - } - onMessageCallback(event.data); -}); -function onMessageCallback(data) { - if (data == 'PermissionDeniedError') { - chromeMediaSource = 'PermissionDeniedError'; - if (screenCallback) - return screenCallback('PermissionDeniedError'); - else - throw new Error('PermissionDeniedError'); - } - if (data == 'rtcmulticonnection-extension-loaded') { - chromeMediaSource = 'desktop'; - } - if (data.sourceId && screenCallback) { - screenCallback(sourceId = data.sourceId); - } -} -function isChromeExtensionAvailable(callback) { - if (isFirefox) - return callback(false); - if (chromeMediaSource == 'desktop') - return callback('isFirefox'); - window.postMessage('are-you-there', '*'); - setTimeout(function () { - if (chromeMediaSource == 'screen') { - callback('unavailable'); - } - else - callback('available'); - }, 2000); -} -function getSourceId(callback) { - if (!callback) - throw '"callback" parameter is mandatory.'; - if (sourceId) - return callback(sourceId); - screenCallback = callback; - window.postMessage('get-sourceId', '*'); -} -function getChromeExtensionStatus(extensionid, callback) { - if (isFirefox) - return callback('not-chrome'); - if (arguments.length != 2) { - callback = extensionid; - extensionid = 'ajhifddimkapgcifgcodmmfdlknahffk'; - } - var image = document.createElement('img'); - image.src = 'chrome-extension://' + extensionid + '/icon.png'; - image.onload = function () { - chromeMediaSource = 'screen'; - window.postMessage('are-you-there', '*'); - setTimeout(function () { - if (chromeMediaSource == 'screen') { - callback(extensionid == extensionid ? 'installed-enabled' : 'installed-disabled'); - } - else - callback('installed-enabled'); - }, 2000); - }; - image.onerror = function () { - callback('not-installed'); - }; -} -function getScreenConstraints(callback) { - sourceId = ''; - var firefoxScreenConstraints = { - mozMediaSource: 'window', - mediaSource: 'window' - }; - if (isFirefox) - return callback(null, firefoxScreenConstraints); - var screen_constraints = { - mandatory: { - chromeMediaSource: chromeMediaSource, - maxWidth: screen.width > 1920 ? screen.width : 1920, - maxHeight: screen.height > 1080 ? screen.height : 1080 - }, - optional: [] - }; - if (chromeMediaSource == 'desktop' && !sourceId) { - getSourceId(function () { - screen_constraints.mandatory.chromeMediaSourceId = sourceId; - callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints); - }); - return; - } - if (chromeMediaSource == 'desktop') { - screen_constraints.mandatory.chromeMediaSourceId = sourceId; - } - callback(null, screen_constraints); -} -exports.getScreenConstraints = getScreenConstraints; -exports.isChromeExtensionAvailable = isChromeExtensionAvailable; -exports.getChromeExtensionStatus = getChromeExtensionStatus; -exports.getSourceId = getSourceId; -//# sourceMappingURL=Screen-Capturing.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var platform = __webpack_require__("../../../../openvidu-browser/node_modules/platform/platform.js"); -var WebRtcStats = /** @class */ (function () { - function WebRtcStats(stream) { - this.stream = stream; - this.webRtcStatsEnabled = false; - this.statsInterval = 1; - this.stats = { - inbound: { - audio: { - bytesReceived: 0, - packetsReceived: 0, - packetsLost: 0 - }, - video: { - bytesReceived: 0, - packetsReceived: 0, - packetsLost: 0, - framesDecoded: 0, - nackCount: 0 - } - }, - outbound: { - audio: { - bytesSent: 0, - packetsSent: 0 - }, - video: { - bytesSent: 0, - packetsSent: 0, - framesEncoded: 0, - nackCount: 0 - } - } - }; - } - WebRtcStats.prototype.isEnabled = function () { - return this.webRtcStatsEnabled; - }; - WebRtcStats.prototype.initWebRtcStats = function () { - var _this = this; - var elastestInstrumentation = localStorage.getItem('elastest-instrumentation'); - if (elastestInstrumentation) { - // ElasTest instrumentation object found in local storage - console.warn('WebRtc stats enabled for stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId); - this.webRtcStatsEnabled = true; - var instrumentation_1 = JSON.parse(elastestInstrumentation); - this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds - console.warn('localStorage item: ' + JSON.stringify(instrumentation_1)); - this.webRtcStatsIntervalId = setInterval(function () { - _this.sendStatsToHttpEndpoint(instrumentation_1); - }, this.statsInterval * 1000); - return; - } - console.debug('WebRtc stats not enabled'); - }; - WebRtcStats.prototype.stopWebRtcStats = function () { - if (this.webRtcStatsEnabled) { - clearInterval(this.webRtcStatsIntervalId); - console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId); - } - }; - WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) { - var _this = this; - var sendPost = function (json) { - var http = new XMLHttpRequest(); - var url = instrumentation.webrtc.httpEndpoint; - http.open('POST', url, true); - http.setRequestHeader('Content-type', 'application/json'); - http.onreadystatechange = function () { - if (http.readyState === 4 && http.status === 200) { - console.log('WebRtc stats successfully sent to ' + url + ' for stream ' + _this.stream.streamId + ' of connection ' + _this.stream.connection.connectionId); - } - }; - http.send(json); - }; - var f = function (stats) { - if (platform.name.indexOf('Firefox') !== -1) { - stats.forEach(function (stat) { - var json = {}; - if ((stat.type === 'inbound-rtp') && - ( - // Avoid firefox empty outbound-rtp statistics - stat.nackCount !== null && - stat.isRemote === false && - stat.id.startsWith('inbound') && - stat.remoteId.startsWith('inbound'))) { - var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc; - var jit = stat.jitter * 1000; - var metrics = { - bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval, - jitter: jit, - packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval, - packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval - }; - var units = { - bytesReceived: 'bytes', - jitter: 'ms', - packetsReceived: 'packets', - packetsLost: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval; - metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval; - units['framesDecoded'] = 'frames'; - units['nackCount'] = 'packets'; - _this.stats.inbound.video.framesDecoded = stat.framesDecoded; - _this.stats.inbound.video.nackCount = stat.nackCount; - } - _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived; - _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived; - _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - else if ((stat.type === 'outbound-rtp') && - ( - // Avoid firefox empty inbound-rtp statistics - stat.isRemote === false && - stat.id.toLowerCase().includes('outbound'))) { - var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval, - packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval - }; - var units = { - bytesSent: 'bytes', - packetsSent: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval; - units['framesEncoded'] = 'frames'; - _this.stats.outbound.video.framesEncoded = stat.framesEncoded; - } - _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent; - _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - }); - } - else if (platform.name.indexOf('Chrome') !== -1) { - for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) { - var key = _a[_i]; - var stat = stats[key]; - if (stat.type === 'ssrc') { - var json = {}; - if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) || - (stat.mediaType === 'video' && 'qpSum' in stat))) { - // inbound-rtp - var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval, - jitter: stat.googJitterBufferMs, - packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval, - packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval - }; - var units = { - bytesReceived: 'bytes', - jitter: 'ms', - packetsReceived: 'packets', - packetsLost: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval; - metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval; - units['framesDecoded'] = 'frames'; - units['nackCount'] = 'packets'; - _this.stats.inbound.video.framesDecoded = stat.framesDecoded; - _this.stats.inbound.video.nackCount = stat.googNacksSent; - } - _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived; - _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived; - _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - else if ('bytesSent' in stat) { - // outbound-rtp - var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval, - packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval - }; - var units = { - bytesSent: 'bytes', - packetsSent: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval; - units['framesEncoded'] = 'frames'; - _this.stats.outbound.video.framesEncoded = stat.framesEncoded; - } - _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent; - _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - } - } - } - }; - this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); }); - }; - WebRtcStats.prototype.standardizeReport = function (response) { - if (platform.name.indexOf('Firefox') !== -1) { - return response; - } - var standardReport = {}; - response.result().forEach(function (report) { - var standardStats = { - id: report.id, - timestamp: report.timestamp, - type: report.type - }; - report.names().forEach(function (name) { - standardStats[name] = report.stat(name); - }); - standardReport[standardStats.id] = standardStats; - }); - return standardReport; - }; - WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) { - var _this = this; - if (platform.name.indexOf('Firefox') !== -1) { - // getStats takes args in different order in Chrome and Firefox - return pc.getStats(null, function (response) { - var report = _this.standardizeReport(response); - successCb(report); - }, failureCb); - } - else if (platform.name.indexOf('Chrome') !== -1) { - // In Chrome, the first two arguments are reversed - return pc.getStats(function (response) { - var report = _this.standardizeReport(response); - successCb(report); - }, null, failureCb); - } - }; - return WebRtcStats; -}()); -exports.WebRtcStats = WebRtcStats; -//# sourceMappingURL=WebRtcStats.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -exports.__esModule = true; -var OpenVidu_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js"); -exports.OpenVidu = OpenVidu_1.OpenVidu; -var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); -exports.Session = Session_1.Session; -var Publisher_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Publisher.js"); -exports.Publisher = Publisher_1.Publisher; -var Subscriber_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Subscriber.js"); -exports.Subscriber = Subscriber_1.Subscriber; -var StreamManager_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/StreamManager.js"); -exports.StreamManager = StreamManager_1.StreamManager; -var Stream_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Stream.js"); -exports.Stream = Stream_1.Stream; -var Connection_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Connection.js"); -exports.Connection = Connection_1.Connection; -var LocalRecorder_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js"); -exports.LocalRecorder = LocalRecorder_1.LocalRecorder; -var LocalRecorderState_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js"); -exports.LocalRecorderState = LocalRecorderState_1.LocalRecorderState; -var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); -exports.OpenViduError = OpenViduError_1.OpenViduError; -var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -exports.VideoInsertMode = VideoInsertMode_1.VideoInsertMode; -var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -exports.Event = Event_1.Event; -var ConnectionEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js"); -exports.ConnectionEvent = ConnectionEvent_1.ConnectionEvent; -var PublisherSpeakingEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js"); -exports.PublisherSpeakingEvent = PublisherSpeakingEvent_1.PublisherSpeakingEvent; -var RecordingEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js"); -exports.RecordingEvent = RecordingEvent_1.RecordingEvent; -var SessionDisconnectedEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js"); -exports.SessionDisconnectedEvent = SessionDisconnectedEvent_1.SessionDisconnectedEvent; -var SignalEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js"); -exports.SignalEvent = SignalEvent_1.SignalEvent; -var StreamEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js"); -exports.StreamEvent = StreamEvent_1.StreamEvent; -var StreamManagerEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js"); -exports.StreamManagerEvent = StreamManagerEvent_1.StreamManagerEvent; -var VideoElementEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js"); -exports.VideoElementEvent = VideoElementEvent_1.VideoElementEvent; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/freeice/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* jshint node: true */ - - -var normalice = __webpack_require__("../../../../openvidu-browser/node_modules/normalice/index.js"); - -/** - # freeice - - The `freeice` module is a simple way of getting random STUN or TURN server - for your WebRTC application. The list of servers (just STUN at this stage) - were sourced from this [gist](https://gist.github.com/zziuni/3741933). - - ## Example Use - - The following demonstrates how you can use `freeice` with - [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect): - - <<< examples/quickconnect.js - - As the `freeice` module generates ice servers in a list compliant with the - WebRTC spec you will be able to use it with raw `RTCPeerConnection` - constructors and other WebRTC libraries. - - ## Hey, don't use my STUN/TURN server! - - If for some reason your free STUN or TURN server ends up in the - list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or - [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json)) - that is used in this module, you can feel - free to open an issue on this repository and those servers will be removed - within 24 hours (or sooner). This is the quickest and probably the most - polite way to have something removed (and provides us some visibility - if someone opens a pull request requesting that a server is added). - - ## Please add my server! - - If you have a server that you wish to add to the list, that's awesome! I'm - sure I speak on behalf of a whole pile of WebRTC developers who say thanks. - To get it into the list, feel free to either open a pull request or if you - find that process a bit daunting then just create an issue requesting - the addition of the server (make sure you provide all the details, and if - you have a Terms of Service then including that in the PR/issue would be - awesome). - - ## I know of a free server, can I add it? - - Sure, if you do your homework and make sure it is ok to use (I'm currently - in the process of reviewing the terms of those STUN servers included from - the original list). If it's ok to go, then please see the previous entry - for how to add it. - - ## Current List of Servers - - * current as at the time of last `README.md` file generation - - ### STUN - - <<< stun.json - - ### TURN - - <<< turn.json - -**/ - -var freeice = module.exports = function(opts) { - // if a list of servers has been provided, then use it instead of defaults - var servers = { - stun: (opts || {}).stun || __webpack_require__("../../../../openvidu-browser/node_modules/freeice/stun.json"), - turn: (opts || {}).turn || __webpack_require__("../../../../openvidu-browser/node_modules/freeice/turn.json") - }; - - var stunCount = (opts || {}).stunCount || 2; - var turnCount = (opts || {}).turnCount || 0; - var selected; - - function getServers(type, count) { - var out = []; - var input = [].concat(servers[type]); - var idx; - - while (input.length && out.length < count) { - idx = (Math.random() * input.length) | 0; - out = out.concat(input.splice(idx, 1)); - } - - return out.map(function(url) { - //If it's a not a string, don't try to "normalice" it otherwise using type:url will screw it up - if ((typeof url !== 'string') && (! (url instanceof String))) { - return url; - } else { - return normalice(type + ':' + url); - } - }); - } - - // add stun servers - selected = [].concat(getServers('stun', stunCount)); - - if (turnCount) { - selected = selected.concat(getServers('turn', turnCount)); - } - - return selected; -}; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/freeice/stun.json": -/***/ (function(module, exports) { - -module.exports = ["stun.l.google.com:19302","stun1.l.google.com:19302","stun2.l.google.com:19302","stun3.l.google.com:19302","stun4.l.google.com:19302","stun.ekiga.net","stun.ideasip.com","stun.schlund.de","stun.stunprotocol.org:3478","stun.voiparound.com","stun.voipbuster.com","stun.voipstunt.com","stun.voxgratia.org","stun.services.mozilla.com"] - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/freeice/turn.json": -/***/ (function(module, exports) { - -module.exports = [] - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/hark/hark.js": -/***/ (function(module, exports, __webpack_require__) { - -var WildEmitter = __webpack_require__("../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js"); - -function getMaxVolume (analyser, fftBins) { - var maxVolume = -Infinity; - analyser.getFloatFrequencyData(fftBins); - - for(var i=4, ii=fftBins.length; i < ii; i++) { - if (fftBins[i] > maxVolume && fftBins[i] < 0) { - maxVolume = fftBins[i]; - } - }; - - return maxVolume; -} - - -var audioContextType; -if (typeof window !== 'undefined') { - audioContextType = window.AudioContext || window.webkitAudioContext; -} -// use a single audio context due to hardware limits -var audioContext = null; -module.exports = function(stream, options) { - var harker = new WildEmitter(); - - - // make it not break in non-supported browsers - if (!audioContextType) return harker; - - //Config - var options = options || {}, - smoothing = (options.smoothing || 0.1), - interval = (options.interval || 50), - threshold = options.threshold, - play = options.play, - history = options.history || 10, - running = true; - - //Setup Audio Context - if (!audioContext) { - audioContext = new audioContextType(); - } - var sourceNode, fftBins, analyser; - - analyser = audioContext.createAnalyser(); - analyser.fftSize = 512; - analyser.smoothingTimeConstant = smoothing; - fftBins = new Float32Array(analyser.frequencyBinCount); - - if (stream.jquery) stream = stream[0]; - if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) { - //Audio Tag - sourceNode = audioContext.createMediaElementSource(stream); - if (typeof play === 'undefined') play = true; - threshold = threshold || -50; - } else { - //WebRTC Stream - sourceNode = audioContext.createMediaStreamSource(stream); - threshold = threshold || -50; - } - - sourceNode.connect(analyser); - if (play) analyser.connect(audioContext.destination); - - harker.speaking = false; - - harker.suspend = function() { - audioContext.suspend(); - } - harker.resume = function() { - audioContext.resume(); - } - Object.defineProperty(harker, 'state', { get: function() { - return audioContext.state; - }}); - audioContext.onstatechange = function() { - harker.emit('state_change', audioContext.state); - } - - harker.setThreshold = function(t) { - threshold = t; - }; - - harker.setInterval = function(i) { - interval = i; - }; - - harker.stop = function() { - running = false; - harker.emit('volume_change', -100, threshold); - if (harker.speaking) { - harker.speaking = false; - harker.emit('stopped_speaking'); - } - analyser.disconnect(); - sourceNode.disconnect(); - }; - harker.speakingHistory = []; - for (var i = 0; i < history; i++) { - harker.speakingHistory.push(0); - } - - // Poll the analyser node to determine if speaking - // and emit events if changed - var looper = function() { - setTimeout(function() { - - //check if stop has been called - if(!running) { - return; - } - - var currentVolume = getMaxVolume(analyser, fftBins); - - harker.emit('volume_change', currentVolume, threshold); - - var history = 0; - if (currentVolume > threshold && !harker.speaking) { - // trigger quickly, short history - for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) { - history += harker.speakingHistory[i]; - } - if (history >= 2) { - harker.speaking = true; - harker.emit('speaking'); - } - } else if (currentVolume < threshold && harker.speaking) { - for (var i = 0; i < harker.speakingHistory.length; i++) { - history += harker.speakingHistory[i]; - } - if (history == 0) { - harker.speaking = false; - harker.emit('stopped_speaking'); - } - } - harker.speakingHistory.shift(); - harker.speakingHistory.push(0 + (currentVolume > threshold)); - - looper(); - }, interval); - }; - looper(); - - - return harker; -} - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/inherits/inherits_browser.js": -/***/ (function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/merge/merge.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {/*! - * @name JavaScript/NodeJS Merge v1.2.0 - * @author yeikos - * @repository https://github.com/yeikos/js.merge - - * Copyright 2014 yeikos - MIT license - * https://raw.github.com/yeikos/js.merge/master/LICENSE - */ - -;(function(isNode) { - - /** - * Merge one or more objects - * @param bool? clone - * @param mixed,... arguments - * @return object - */ - - var Public = function(clone) { - - return merge(clone === true, false, arguments); - - }, publicName = 'merge'; - - /** - * Merge two or more objects recursively - * @param bool? clone - * @param mixed,... arguments - * @return object - */ - - Public.recursive = function(clone) { - - return merge(clone === true, true, arguments); - - }; - - /** - * Clone the input removing any reference - * @param mixed input - * @return mixed - */ - - Public.clone = function(input) { - - var output = input, - type = typeOf(input), - index, size; - - if (type === 'array') { - - output = []; - size = input.length; - - for (index=0;index 1) { - url = parts[1]; - parts = parts[0].split(':'); - - // add the output credential and username - output.username = parts[0]; - output.credential = (input || {}).credential || parts[1] || ''; - } - - output.url = protocol + url; - output.urls = [ output.url ]; - - return output; -}; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/platform/platform.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Platform.js - * Copyright 2014-2018 Benjamin Tan - * Copyright 2011-2013 John-David Dalton - * Available under MIT license - */ -;(function() { - 'use strict'; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used as a reference to the global object. */ - var root = (objectTypes[typeof window] && window) || this; - - /** Backup possible global object. */ - var oldRoot = root; - - /** Detect free variable `exports`. */ - var freeExports = objectTypes[typeof exports] && exports; - - /** Detect free variable `module`. */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { - root = freeGlobal; - } - - /** - * Used as the maximum length of an array-like object. - * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. - */ - var maxSafeInteger = Math.pow(2, 53) - 1; - - /** Regular expression to detect Opera. */ - var reOpera = /\bOpera/; - - /** Possible global object. */ - var thisBinding = this; - - /** Used for native method references. */ - var objectProto = Object.prototype; - - /** Used to check for own properties of an object. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to resolve the internal `[[Class]]` of values. */ - var toString = objectProto.toString; - - /*--------------------------------------------------------------------------*/ - - /** - * Capitalizes a string value. - * - * @private - * @param {string} string The string to capitalize. - * @returns {string} The capitalized string. - */ - function capitalize(string) { - string = String(string); - return string.charAt(0).toUpperCase() + string.slice(1); - } - - /** - * A utility function to clean up the OS name. - * - * @private - * @param {string} os The OS name to clean up. - * @param {string} [pattern] A `RegExp` pattern matching the OS name. - * @param {string} [label] A label for the OS. - */ - function cleanupOS(os, pattern, label) { - // Platform tokens are defined at: - // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx - // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx - var data = { - '10.0': '10', - '6.4': '10 Technical Preview', - '6.3': '8.1', - '6.2': '8', - '6.1': 'Server 2008 R2 / 7', - '6.0': 'Server 2008 / Vista', - '5.2': 'Server 2003 / XP 64-bit', - '5.1': 'XP', - '5.01': '2000 SP1', - '5.0': '2000', - '4.0': 'NT', - '4.90': 'ME' - }; - // Detect Windows version from platform tokens. - if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) && - (data = data[/[\d.]+$/.exec(os)])) { - os = 'Windows ' + data; - } - // Correct character case and cleanup string. - os = String(os); - - if (pattern && label) { - os = os.replace(RegExp(pattern, 'i'), label); - } - - os = format( - os.replace(/ ce$/i, ' CE') - .replace(/\bhpw/i, 'web') - .replace(/\bMacintosh\b/, 'Mac OS') - .replace(/_PowerPC\b/i, ' OS') - .replace(/\b(OS X) [^ \d]+/i, '$1') - .replace(/\bMac (OS X)\b/, '$1') - .replace(/\/(\d)/, ' $1') - .replace(/_/g, '.') - .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '') - .replace(/\bx86\.64\b/gi, 'x86_64') - .replace(/\b(Windows Phone) OS\b/, '$1') - .replace(/\b(Chrome OS \w+) [\d.]+\b/, '$1') - .split(' on ')[0] - ); - - return os; - } - - /** - * An iteration utility for arrays and objects. - * - * @private - * @param {Array|Object} object The object to iterate over. - * @param {Function} callback The function called per iteration. - */ - function each(object, callback) { - var index = -1, - length = object ? object.length : 0; - - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { - while (++index < length) { - callback(object[index], index, object); - } - } else { - forOwn(object, callback); - } - } - - /** - * Trim and conditionally capitalize string values. - * - * @private - * @param {string} string The string to format. - * @returns {string} The formatted string. - */ - function format(string) { - string = trim(string); - return /^(?:webOS|i(?:OS|P))/.test(string) - ? string - : capitalize(string); - } - - /** - * Iterates over an object's own properties, executing the `callback` for each. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} callback The function executed per own property. - */ - function forOwn(object, callback) { - for (var key in object) { - if (hasOwnProperty.call(object, key)) { - callback(object[key], key, object); - } - } - } - - /** - * Gets the internal `[[Class]]` of a value. - * - * @private - * @param {*} value The value. - * @returns {string} The `[[Class]]`. - */ - function getClassOf(value) { - return value == null - ? capitalize(value) - : toString.call(value).slice(8, -1); - } - - /** - * Host objects can return type values that are different from their actual - * data type. The objects we are concerned with usually return non-primitive - * types of "object", "function", or "unknown". - * - * @private - * @param {*} object The owner of the property. - * @param {string} property The property to check. - * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. - */ - function isHostType(object, property) { - var type = object != null ? typeof object[property] : 'number'; - return !/^(?:boolean|number|string|undefined)$/.test(type) && - (type == 'object' ? !!object[property] : true); - } - - /** - * Prepares a string for use in a `RegExp` by making hyphens and spaces optional. - * - * @private - * @param {string} string The string to qualify. - * @returns {string} The qualified string. - */ - function qualify(string) { - return String(string).replace(/([ -])(?!$)/g, '$1?'); - } - - /** - * A bare-bones `Array#reduce` like utility function. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function called per iteration. - * @returns {*} The accumulated result. - */ - function reduce(array, callback) { - var accumulator = null; - each(array, function(value, index) { - accumulator = callback(accumulator, value, index, array); - }); - return accumulator; - } - - /** - * Removes leading and trailing whitespace from a string. - * - * @private - * @param {string} string The string to trim. - * @returns {string} The trimmed string. - */ - function trim(string) { - return String(string).replace(/^ +| +$/g, ''); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a new platform object. - * - * @memberOf platform - * @param {Object|string} [ua=navigator.userAgent] The user agent string or - * context object. - * @returns {Object} A platform object. - */ - function parse(ua) { - - /** The environment context object. */ - var context = root; - - /** Used to flag when a custom context is provided. */ - var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String'; - - // Juggle arguments. - if (isCustomContext) { - context = ua; - ua = null; - } - - /** Browser navigator object. */ - var nav = context.navigator || {}; - - /** Browser user agent string. */ - var userAgent = nav.userAgent || ''; - - ua || (ua = userAgent); - - /** Used to flag when `thisBinding` is the [ModuleScope]. */ - var isModuleScope = isCustomContext || thisBinding == oldRoot; - - /** Used to detect if browser is like Chrome. */ - var likeChrome = isCustomContext - ? !!nav.likeChrome - : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString()); - - /** Internal `[[Class]]` value shortcuts. */ - var objectClass = 'Object', - airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject', - enviroClass = isCustomContext ? objectClass : 'Environment', - javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java), - phantomClass = isCustomContext ? objectClass : 'RuntimeObject'; - - /** Detect Java environments. */ - var java = /\bJava/.test(javaClass) && context.java; - - /** Detect Rhino. */ - var rhino = java && getClassOf(context.environment) == enviroClass; - - /** A character to represent alpha. */ - var alpha = java ? 'a' : '\u03b1'; - - /** A character to represent beta. */ - var beta = java ? 'b' : '\u03b2'; - - /** Browser document object. */ - var doc = context.document || {}; - - /** - * Detect Opera browser (Presto-based). - * http://www.howtocreate.co.uk/operaStuff/operaObject.html - * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini - */ - var opera = context.operamini || context.opera; - - /** Opera `[[Class]]`. */ - var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera)) - ? operaClass - : (opera = null); - - /*------------------------------------------------------------------------*/ - - /** Temporary variable used over the script's lifetime. */ - var data; - - /** The CPU architecture. */ - var arch = ua; - - /** Platform description array. */ - var description = []; - - /** Platform alpha/beta indicator. */ - var prerelease = null; - - /** A flag to indicate that environment features should be used to resolve the platform. */ - var useFeatures = ua == userAgent; - - /** The browser/environment version. */ - var version = useFeatures && opera && typeof opera.version == 'function' && opera.version(); - - /** A flag to indicate if the OS ends with "/ Version" */ - var isSpecialCasedOS; - - /* Detectable layout engines (order is important). */ - var layout = getLayout([ - { 'label': 'EdgeHTML', 'pattern': 'Edge' }, - 'Trident', - { 'label': 'WebKit', 'pattern': 'AppleWebKit' }, - 'iCab', - 'Presto', - 'NetFront', - 'Tasman', - 'KHTML', - 'Gecko' - ]); - - /* Detectable browser names (order is important). */ - var name = getName([ - 'Adobe AIR', - 'Arora', - 'Avant Browser', - 'Breach', - 'Camino', - 'Electron', - 'Epiphany', - 'Fennec', - 'Flock', - 'Galeon', - 'GreenBrowser', - 'iCab', - 'Iceweasel', - 'K-Meleon', - 'Konqueror', - 'Lunascape', - 'Maxthon', - { 'label': 'Microsoft Edge', 'pattern': 'Edge' }, - 'Midori', - 'Nook Browser', - 'PaleMoon', - 'PhantomJS', - 'Raven', - 'Rekonq', - 'RockMelt', - { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' }, - 'SeaMonkey', - { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, - 'Sleipnir', - 'SlimBrowser', - { 'label': 'SRWare Iron', 'pattern': 'Iron' }, - 'Sunrise', - 'Swiftfox', - 'Waterfox', - 'WebPositive', - 'Opera Mini', - { 'label': 'Opera Mini', 'pattern': 'OPiOS' }, - 'Opera', - { 'label': 'Opera', 'pattern': 'OPR' }, - 'Chrome', - { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' }, - { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' }, - { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' }, - { 'label': 'IE', 'pattern': 'IEMobile' }, - { 'label': 'IE', 'pattern': 'MSIE' }, - 'Safari' - ]); - - /* Detectable products (order is important). */ - var product = getProduct([ - { 'label': 'BlackBerry', 'pattern': 'BB10' }, - 'BlackBerry', - { 'label': 'Galaxy S', 'pattern': 'GT-I9000' }, - { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' }, - { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' }, - { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' }, - { 'label': 'Galaxy S5', 'pattern': 'SM-G900' }, - { 'label': 'Galaxy S6', 'pattern': 'SM-G920' }, - { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' }, - { 'label': 'Galaxy S7', 'pattern': 'SM-G930' }, - { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' }, - 'Google TV', - 'Lumia', - 'iPad', - 'iPod', - 'iPhone', - 'Kindle', - { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, - 'Nexus', - 'Nook', - 'PlayBook', - 'PlayStation Vita', - 'PlayStation', - 'TouchPad', - 'Transformer', - { 'label': 'Wii U', 'pattern': 'WiiU' }, - 'Wii', - 'Xbox One', - { 'label': 'Xbox 360', 'pattern': 'Xbox' }, - 'Xoom' - ]); - - /* Detectable manufacturers. */ - var manufacturer = getManufacturer({ - 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 }, - 'Archos': {}, - 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 }, - 'Asus': { 'Transformer': 1 }, - 'Barnes & Noble': { 'Nook': 1 }, - 'BlackBerry': { 'PlayBook': 1 }, - 'Google': { 'Google TV': 1, 'Nexus': 1 }, - 'HP': { 'TouchPad': 1 }, - 'HTC': {}, - 'LG': {}, - 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 }, - 'Motorola': { 'Xoom': 1 }, - 'Nintendo': { 'Wii U': 1, 'Wii': 1 }, - 'Nokia': { 'Lumia': 1 }, - 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 }, - 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 } - }); - - /* Detectable operating systems (order is important). */ - var os = getOS([ - 'Windows Phone', - 'Android', - 'CentOS', - { 'label': 'Chrome OS', 'pattern': 'CrOS' }, - 'Debian', - 'Fedora', - 'FreeBSD', - 'Gentoo', - 'Haiku', - 'Kubuntu', - 'Linux Mint', - 'OpenBSD', - 'Red Hat', - 'SuSE', - 'Ubuntu', - 'Xubuntu', - 'Cygwin', - 'Symbian OS', - 'hpwOS', - 'webOS ', - 'webOS', - 'Tablet OS', - 'Tizen', - 'Linux', - 'Mac OS X', - 'Macintosh', - 'Mac', - 'Windows 98;', - 'Windows ' - ]); - - /*------------------------------------------------------------------------*/ - - /** - * Picks the layout engine from an array of guesses. - * - * @private - * @param {Array} guesses An array of guesses. - * @returns {null|string} The detected layout engine. - */ - function getLayout(guesses) { - return reduce(guesses, function(result, guess) { - return result || RegExp('\\b' + ( - guess.pattern || qualify(guess) - ) + '\\b', 'i').exec(ua) && (guess.label || guess); - }); - } - - /** - * Picks the manufacturer from an array of guesses. - * - * @private - * @param {Array} guesses An object of guesses. - * @returns {null|string} The detected manufacturer. - */ - function getManufacturer(guesses) { - return reduce(guesses, function(result, value, key) { - // Lookup the manufacturer by product or scan the UA for the manufacturer. - return result || ( - value[product] || - value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] || - RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua) - ) && key; - }); - } - - /** - * Picks the browser name from an array of guesses. - * - * @private - * @param {Array} guesses An array of guesses. - * @returns {null|string} The detected browser name. - */ - function getName(guesses) { - return reduce(guesses, function(result, guess) { - return result || RegExp('\\b' + ( - guess.pattern || qualify(guess) - ) + '\\b', 'i').exec(ua) && (guess.label || guess); - }); - } - - /** - * Picks the OS name from an array of guesses. - * - * @private - * @param {Array} guesses An array of guesses. - * @returns {null|string} The detected OS name. - */ - function getOS(guesses) { - return reduce(guesses, function(result, guess) { - var pattern = guess.pattern || qualify(guess); - if (!result && (result = - RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua) - )) { - result = cleanupOS(result, pattern, guess.label || guess); - } - return result; - }); - } - - /** - * Picks the product name from an array of guesses. - * - * @private - * @param {Array} guesses An array of guesses. - * @returns {null|string} The detected product name. - */ - function getProduct(guesses) { - return reduce(guesses, function(result, guess) { - var pattern = guess.pattern || qualify(guess); - if (!result && (result = - RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) || - RegExp('\\b' + pattern + ' *\\w+-[\\w]*', 'i').exec(ua) || - RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua) - )) { - // Split by forward slash and append product version if needed. - if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) { - result[0] += ' ' + result[1]; - } - // Correct character case and cleanup string. - guess = guess.label || guess; - result = format(result[0] - .replace(RegExp(pattern, 'i'), guess) - .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ') - .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2')); - } - return result; - }); - } - - /** - * Resolves the version using an array of UA patterns. - * - * @private - * @param {Array} patterns An array of UA patterns. - * @returns {null|string} The detected version. - */ - function getVersion(patterns) { - return reduce(patterns, function(result, pattern) { - return result || (RegExp(pattern + - '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null; - }); - } - - /** - * Returns `platform.description` when the platform object is coerced to a string. - * - * @name toString - * @memberOf platform - * @returns {string} Returns `platform.description` if available, else an empty string. - */ - function toStringPlatform() { - return this.description || ''; - } - - /*------------------------------------------------------------------------*/ - - // Convert layout to an array so we can add extra details. - layout && (layout = [layout]); - - // Detect product names that contain their manufacturer's name. - if (manufacturer && !product) { - product = getProduct([manufacturer]); - } - // Clean up Google TV. - if ((data = /\bGoogle TV\b/.exec(product))) { - product = data[0]; - } - // Detect simulators. - if (/\bSimulator\b/i.test(ua)) { - product = (product ? product + ' ' : '') + 'Simulator'; - } - // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS. - if (name == 'Opera Mini' && /\bOPiOS\b/.test(ua)) { - description.push('running in Turbo/Uncompressed mode'); - } - // Detect IE Mobile 11. - if (name == 'IE' && /\blike iPhone OS\b/.test(ua)) { - data = parse(ua.replace(/like iPhone OS/, '')); - manufacturer = data.manufacturer; - product = data.product; - } - // Detect iOS. - else if (/^iP/.test(product)) { - name || (name = 'Safari'); - os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua)) - ? ' ' + data[1].replace(/_/g, '.') - : ''); - } - // Detect Kubuntu. - else if (name == 'Konqueror' && !/buntu/i.test(os)) { - os = 'Kubuntu'; - } - // Detect Android browsers. - else if ((manufacturer && manufacturer != 'Google' && - ((/Chrome/.test(name) && !/\bMobile Safari\b/i.test(ua)) || /\bVita\b/.test(product))) || - (/\bAndroid\b/.test(os) && /^Chrome/.test(name) && /\bVersion\//i.test(ua))) { - name = 'Android Browser'; - os = /\bAndroid\b/.test(os) ? os : 'Android'; - } - // Detect Silk desktop/accelerated modes. - else if (name == 'Silk') { - if (!/\bMobi/i.test(ua)) { - os = 'Android'; - description.unshift('desktop mode'); - } - if (/Accelerated *= *true/i.test(ua)) { - description.unshift('accelerated'); - } - } - // Detect PaleMoon identifying as Firefox. - else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) { - description.push('identifying as Firefox ' + data[1]); - } - // Detect Firefox OS and products running Firefox. - else if (name == 'Firefox' && (data = /\b(Mobile|Tablet|TV)\b/i.exec(ua))) { - os || (os = 'Firefox OS'); - product || (product = data[1]); - } - // Detect false positives for Firefox/Safari. - else if (!name || (data = !/\bMinefield\b/i.test(ua) && /\b(?:Firefox|Safari)\b/.exec(name))) { - // Escape the `/` for Firefox 1. - if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) { - // Clear name of false positives. - name = null; - } - // Reassign a generic name. - if ((data = product || manufacturer || os) && - (product || manufacturer || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))) { - name = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os) ? os : data) + ' Browser'; - } - } - // Add Chrome version to description for Electron. - else if (name == 'Electron' && (data = (/\bChrome\/([\d.]+)\b/.exec(ua) || 0)[1])) { - description.push('Chromium ' + data); - } - // Detect non-Opera (Presto-based) versions (order is important). - if (!version) { - version = getVersion([ - '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))', - 'Version', - qualify(name), - '(?:Firefox|Minefield|NetFront)' - ]); - } - // Detect stubborn layout engines. - if ((data = - layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' || - /\bOpera\b/.test(name) && (/\bOPR\b/.test(ua) ? 'Blink' : 'Presto') || - /\b(?:Midori|Nook|Safari)\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' || - !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') || - layout == 'WebKit' && /\bPlayStation\b(?! Vita\b)/i.test(name) && 'NetFront' - )) { - layout = [data]; - } - // Detect Windows Phone 7 desktop mode. - if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { - name += ' Mobile'; - os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x'); - description.unshift('desktop mode'); - } - // Detect Windows Phone 8.x desktop mode. - else if (/\bWPDesktop\b/i.test(ua)) { - name = 'IE Mobile'; - os = 'Windows Phone 8.x'; - description.unshift('desktop mode'); - version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); - } - // Detect IE 11 identifying as other browsers. - else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) { - if (name) { - description.push('identifying as ' + name + (version ? ' ' + version : '')); - } - name = 'IE'; - version = data[1]; - } - // Leverage environment features. - if (useFeatures) { - // Detect server-side environments. - // Rhino has a global function while others have a global object. - if (isHostType(context, 'global')) { - if (java) { - data = java.lang.System; - arch = data.getProperty('os.arch'); - os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version'); - } - if (rhino) { - try { - version = context.require('ringo/engine').version.join('.'); - name = 'RingoJS'; - } catch(e) { - if ((data = context.system) && data.global.system == context.system) { - name = 'Narwhal'; - os || (os = data[0].os || null); - } - } - if (!name) { - name = 'Rhino'; - } - } - else if ( - typeof context.process == 'object' && !context.process.browser && - (data = context.process) - ) { - if (typeof data.versions == 'object') { - if (typeof data.versions.electron == 'string') { - description.push('Node ' + data.versions.node); - name = 'Electron'; - version = data.versions.electron; - } else if (typeof data.versions.nw == 'string') { - description.push('Chromium ' + version, 'Node ' + data.versions.node); - name = 'NW.js'; - version = data.versions.nw; - } - } - if (!name) { - name = 'Node.js'; - arch = data.arch; - os = data.platform; - version = /[\d.]+/.exec(data.version); - version = version ? version[0] : null; - } - } - } - // Detect Adobe AIR. - else if (getClassOf((data = context.runtime)) == airRuntimeClass) { - name = 'Adobe AIR'; - os = data.flash.system.Capabilities.os; - } - // Detect PhantomJS. - else if (getClassOf((data = context.phantom)) == phantomClass) { - name = 'PhantomJS'; - version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch); - } - // Detect IE compatibility modes. - else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) { - // We're in compatibility mode when the Trident version + 4 doesn't - // equal the document mode. - version = [version, doc.documentMode]; - if ((data = +data[1] + 4) != version[1]) { - description.push('IE ' + version[1] + ' mode'); - layout && (layout[1] = ''); - version[1] = data; - } - version = name == 'IE' ? String(version[1].toFixed(1)) : version[0]; - } - // Detect IE 11 masking as other browsers. - else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\b/.test(name)) { - description.push('masking as ' + name + ' ' + version); - name = 'IE'; - version = '11.0'; - layout = ['Trident']; - os = 'Windows'; - } - os = os && format(os); - } - // Detect prerelease phases. - if (version && (data = - /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) || - /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) || - /\bMinefield\b/i.test(ua) && 'a' - )) { - prerelease = /b/i.test(data) ? 'beta' : 'alpha'; - version = version.replace(RegExp(data + '\\+?$'), '') + - (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || ''); - } - // Detect Firefox Mobile. - if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS)\b/.test(os)) { - name = 'Firefox Mobile'; - } - // Obscure Maxthon's unreliable version. - else if (name == 'Maxthon' && version) { - version = version.replace(/\.[\d.]+/, '.x'); - } - // Detect Xbox 360 and Xbox One. - else if (/\bXbox\b/i.test(product)) { - if (product == 'Xbox 360') { - os = null; - } - if (product == 'Xbox 360' && /\bIEMobile\b/.test(ua)) { - description.unshift('mobile mode'); - } - } - // Add mobile postfix. - else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) && - (os == 'Windows CE' || /Mobi/i.test(ua))) { - name += ' Mobile'; - } - // Detect IE platform preview. - else if (name == 'IE' && useFeatures) { - try { - if (context.external === null) { - description.unshift('platform preview'); - } - } catch(e) { - description.unshift('embedded'); - } - } - // Detect BlackBerry OS version. - // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp - else if ((/\bBlackBerry\b/.test(product) || /\bBB10\b/.test(ua)) && (data = - (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] || - version - )) { - data = [data, /BB10/.test(ua)]; - os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0]; - version = null; - } - // Detect Opera identifying/masking itself as another browser. - // http://www.opera.com/support/kb/view/843/ - else if (this != forOwn && product != 'Wii' && ( - (useFeatures && opera) || - (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) || - (name == 'Firefox' && /\bOS X (?:\d+\.){2,}/.test(os)) || - (name == 'IE' && ( - (os && !/^Win/.test(os) && version > 5.5) || - /\bWindows XP\b/.test(os) && version > 8 || - version == 8 && !/\bTrident\b/.test(ua) - )) - ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) { - // When "identifying", the UA contains both Opera and the other browser's name. - data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : ''); - if (reOpera.test(name)) { - if (/\bIE\b/.test(data) && os == 'Mac OS') { - os = null; - } - data = 'identify' + data; - } - // When "masking", the UA contains only the other browser's name. - else { - data = 'mask' + data; - if (operaClass) { - name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2')); - } else { - name = 'Opera'; - } - if (/\bIE\b/.test(data)) { - os = null; - } - if (!useFeatures) { - version = null; - } - } - layout = ['Presto']; - description.push(data); - } - // Detect WebKit Nightly and approximate Chrome/Safari versions. - if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { - // Correct build number for numeric comparison. - // (e.g. "532.5" becomes "532.05") - data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data]; - // Nightly builds are postfixed with a "+". - if (name == 'Safari' && data[1].slice(-1) == '+') { - name = 'WebKit Nightly'; - prerelease = 'alpha'; - version = data[1].slice(0, -1); - } - // Clear incorrect browser versions. - else if (version == data[1] || - version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { - version = null; - } - // Use the full Chrome version when available. - data[1] = (/\bChrome\/([\d.]+)/i.exec(ua) || 0)[1]; - // Detect Blink layout engine. - if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') { - layout = ['Blink']; - } - // Detect JavaScriptCore. - // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi - if (!useFeatures || (!likeChrome && !data[1])) { - layout && (layout[1] = 'like Safari'); - data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8'); - } else { - layout && (layout[1] = 'like Chrome'); - data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28'); - } - // Add the postfix of ".x" or "+" for approximate versions. - layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+')); - // Obscure version for some Safari 1-2 releases. - if (name == 'Safari' && (!version || parseInt(version) > 45)) { - version = data; - } - } - // Detect Opera desktop modes. - if (name == 'Opera' && (data = /\bzbov|zvav$/.exec(os))) { - name += ' '; - description.unshift('desktop mode'); - if (data == 'zvav') { - name += 'Mini'; - version = null; - } else { - name += 'Mobile'; - } - os = os.replace(RegExp(' *' + data + '$'), ''); - } - // Detect Chrome desktop mode. - else if (name == 'Safari' && /\bChrome\b/.exec(layout && layout[1])) { - description.unshift('desktop mode'); - name = 'Chrome Mobile'; - version = null; - - if (/\bOS X\b/.test(os)) { - manufacturer = 'Apple'; - os = 'iOS 4.3+'; - } else { - os = null; - } - } - // Strip incorrect OS versions. - if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 && - ua.indexOf('/' + data + '-') > -1) { - os = trim(os.replace(data, '')); - } - // Add layout engine. - if (layout && !/\b(?:Avant|Nook)\b/.test(name) && ( - /Browser|Lunascape|Maxthon/.test(name) || - name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) || - /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) { - // Don't add layout details to description if they are falsey. - (data = layout[layout.length - 1]) && description.push(data); - } - // Combine contextual information. - if (description.length) { - description = ['(' + description.join('; ') + ')']; - } - // Append manufacturer to description. - if (manufacturer && product && product.indexOf(manufacturer) < 0) { - description.push('on ' + manufacturer); - } - // Append product to description. - if (product) { - description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product); - } - // Parse the OS into an object. - if (os) { - data = / ([\d.+]+)$/.exec(os); - isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/'; - os = { - 'architecture': 32, - 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os, - 'version': data ? data[1] : null, - 'toString': function() { - var version = this.version; - return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : ''); - } - }; - } - // Add browser/OS architecture. - if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) { - if (os) { - os.architecture = 64; - os.family = os.family.replace(RegExp(' *' + data), ''); - } - if ( - name && (/\bWOW64\b/i.test(ua) || - (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\bWin64; x64\b/i.test(ua))) - ) { - description.unshift('32-bit'); - } - } - // Chrome 39 and above on OS X is always 64-bit. - else if ( - os && /^OS X/.test(os.family) && - name == 'Chrome' && parseFloat(version) >= 39 - ) { - os.architecture = 64; - } - - ua || (ua = null); - - /*------------------------------------------------------------------------*/ - - /** - * The platform object. - * - * @name platform - * @type Object - */ - var platform = {}; - - /** - * The platform description. - * - * @memberOf platform - * @type string|null - */ - platform.description = ua; - - /** - * The name of the browser's layout engine. - * - * The list of common layout engines include: - * "Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit" - * - * @memberOf platform - * @type string|null - */ - platform.layout = layout && layout[0]; - - /** - * The name of the product's manufacturer. - * - * The list of manufacturers include: - * "Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry", - * "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo", - * "Nokia", "Samsung" and "Sony" - * - * @memberOf platform - * @type string|null - */ - platform.manufacturer = manufacturer; - - /** - * The name of the browser/environment. - * - * The list of common browser names include: - * "Chrome", "Electron", "Firefox", "Firefox for iOS", "IE", - * "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk", - * "Opera Mini" and "Opera" - * - * Mobile versions of some browsers have "Mobile" appended to their name: - * eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile" - * - * @memberOf platform - * @type string|null - */ - platform.name = name; - - /** - * The alpha/beta release indicator. - * - * @memberOf platform - * @type string|null - */ - platform.prerelease = prerelease; - - /** - * The name of the product hosting the browser. - * - * The list of common products include: - * - * "BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle", - * "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer" - * - * @memberOf platform - * @type string|null - */ - platform.product = product; - - /** - * The browser's user agent string. - * - * @memberOf platform - * @type string|null - */ - platform.ua = ua; - - /** - * The browser/environment version. - * - * @memberOf platform - * @type string|null - */ - platform.version = name && version; - - /** - * The name of the operating system. - * - * @memberOf platform - * @type Object - */ - platform.os = os || { - - /** - * The CPU architecture the OS is built for. - * - * @memberOf platform.os - * @type number|null - */ - 'architecture': null, - - /** - * The family of the OS. - * - * Common values include: - * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista", - * "Windows XP", "OS X", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE", - * "Android", "iOS" and "Windows Phone" - * - * @memberOf platform.os - * @type string|null - */ - 'family': null, - - /** - * The version of the OS. - * - * @memberOf platform.os - * @type string|null - */ - 'version': null, - - /** - * Returns the OS string. - * - * @memberOf platform.os - * @returns {string} The OS string. - */ - 'toString': function() { return 'null'; } - }; - - platform.parse = parse; - platform.toString = toStringPlatform; - - if (platform.version) { - description.unshift(version); - } - if (platform.name) { - description.unshift(name); - } - if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) { - description.push(product ? '(' + os + ')' : 'on ' + os); - } - if (description.length) { - platform.description = description.join(' '); - } - return platform; - } - - /*--------------------------------------------------------------------------*/ - - // Export platform. - var platform = parse(); - - // Some AMD build optimizers, like r.js, check for condition patterns like the following: - if (true) { - // Expose platform on the global object to prevent errors when platform is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - root.platform = platform; - - // Define as an anonymous module so platform can be aliased through path mapping. - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return platform; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { - // Export for CommonJS support. - forOwn(platform, function(value, key) { - freeExports[key] = value; - }); - } - else { - // Export to the global object. - root.platform = platform; - } -}.call(this)); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("./node_modules/webpack/buildin/module.js")(module), __webpack_require__("./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js": -/***/ (function(module, exports) { - -var grammar = module.exports = { - v: [{ - name: 'version', - reg: /^(\d*)$/ - }], - o: [{ //o=- 20518 0 IN IP4 203.0.113.1 - // NB: sessionId will be a String in most cases because it is huge - name: 'origin', - reg: /^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/, - names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'], - format: "%s %s %d %s IP%d %s" - }], - // default parsing of these only (though some of these feel outdated) - s: [{ name: 'name' }], - i: [{ name: 'description' }], - u: [{ name: 'uri' }], - e: [{ name: 'email' }], - p: [{ name: 'phone' }], - z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly.. - r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly - //k: [{}], // outdated thing ignored - t: [{ //t=0 0 - name: 'timing', - reg: /^(\d*) (\d*)/, - names: ['start', 'stop'], - format: "%d %d" - }], - c: [{ //c=IN IP4 10.47.197.26 - name: 'connection', - reg: /^IN IP(\d) (\S*)/, - names: ['version', 'ip'], - format: "IN IP%d %s" - }], - b: [{ //b=AS:4000 - push: 'bandwidth', - reg: /^(TIAS|AS|CT|RR|RS):(\d*)/, - names: ['type', 'limit'], - format: "%s:%s" - }], - m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31 - // NB: special - pushes to session - // TODO: rtp/fmtp should be filtered by the payloads found here? - reg: /^(\w*) (\d*) ([\w\/]*)(?: (.*))?/, - names: ['type', 'port', 'protocol', 'payloads'], - format: "%s %d %s %s" - }], - a: [ - { //a=rtpmap:110 opus/48000/2 - push: 'rtp', - reg: /^rtpmap:(\d*) ([\w\-]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/, - names: ['payload', 'codec', 'rate', 'encoding'], - format: function (o) { - return (o.encoding) ? - "rtpmap:%d %s/%s/%s": - o.rate ? - "rtpmap:%d %s/%s": - "rtpmap:%d %s"; - } - }, - { - //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000 - //a=fmtp:111 minptime=10; useinbandfec=1 - push: 'fmtp', - reg: /^fmtp:(\d*) ([\S| ]*)/, - names: ['payload', 'config'], - format: "fmtp:%d %s" - }, - { //a=control:streamid=0 - name: 'control', - reg: /^control:(.*)/, - format: "control:%s" - }, - { //a=rtcp:65179 IN IP4 193.84.77.194 - name: 'rtcp', - reg: /^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/, - names: ['port', 'netType', 'ipVer', 'address'], - format: function (o) { - return (o.address != null) ? - "rtcp:%d %s IP%d %s": - "rtcp:%d"; - } - }, - { //a=rtcp-fb:98 trr-int 100 - push: 'rtcpFbTrrInt', - reg: /^rtcp-fb:(\*|\d*) trr-int (\d*)/, - names: ['payload', 'value'], - format: "rtcp-fb:%d trr-int %d" - }, - { //a=rtcp-fb:98 nack rpsi - push: 'rtcpFb', - reg: /^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/, - names: ['payload', 'type', 'subtype'], - format: function (o) { - return (o.subtype != null) ? - "rtcp-fb:%s %s %s": - "rtcp-fb:%s %s"; - } - }, - { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset - //a=extmap:1/recvonly URI-gps-string - push: 'ext', - reg: /^extmap:([\w_\/]*) (\S*)(?: (\S*))?/, - names: ['value', 'uri', 'config'], // value may include "/direction" suffix - format: function (o) { - return (o.config != null) ? - "extmap:%s %s %s": - "extmap:%s %s"; - } - }, - { - //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32 - push: 'crypto', - reg: /^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/, - names: ['id', 'suite', 'config', 'sessionConfig'], - format: function (o) { - return (o.sessionConfig != null) ? - "crypto:%d %s %s %s": - "crypto:%d %s %s"; - } - }, - { //a=setup:actpass - name: 'setup', - reg: /^setup:(\w*)/, - format: "setup:%s" - }, - { //a=mid:1 - name: 'mid', - reg: /^mid:([^\s]*)/, - format: "mid:%s" - }, - { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a - name: 'msid', - reg: /^msid:(.*)/, - format: "msid:%s" - }, - { //a=ptime:20 - name: 'ptime', - reg: /^ptime:(\d*)/, - format: "ptime:%d" - }, - { //a=maxptime:60 - name: 'maxptime', - reg: /^maxptime:(\d*)/, - format: "maxptime:%d" - }, - { //a=sendrecv - name: 'direction', - reg: /^(sendrecv|recvonly|sendonly|inactive)/ - }, - { //a=ice-lite - name: 'icelite', - reg: /^(ice-lite)/ - }, - { //a=ice-ufrag:F7gI - name: 'iceUfrag', - reg: /^ice-ufrag:(\S*)/, - format: "ice-ufrag:%s" - }, - { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g - name: 'icePwd', - reg: /^ice-pwd:(\S*)/, - format: "ice-pwd:%s" - }, - { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33 - name: 'fingerprint', - reg: /^fingerprint:(\S*) (\S*)/, - names: ['type', 'hash'], - format: "fingerprint:%s %s" - }, - { - //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host - //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0 - //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0 - //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0 - //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0 - push:'candidates', - reg: /^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?/, - names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'], - format: function (o) { - var str = "candidate:%s %d %s %d %s %d typ %s"; - - str += (o.raddr != null) ? " raddr %s rport %d" : "%v%v"; - - // NB: candidate has three optional chunks, so %void middles one if it's missing - str += (o.tcptype != null) ? " tcptype %s" : "%v"; - - if (o.generation != null) { - str += " generation %d"; - } - return str; - } - }, - { //a=end-of-candidates (keep after the candidates line for readability) - name: 'endOfCandidates', - reg: /^(end-of-candidates)/ - }, - { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ... - name: 'remoteCandidates', - reg: /^remote-candidates:(.*)/, - format: "remote-candidates:%s" - }, - { //a=ice-options:google-ice - name: 'iceOptions', - reg: /^ice-options:(\S*)/, - format: "ice-options:%s" - }, - { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1 - push: "ssrcs", - reg: /^ssrc:(\d*) ([\w_]*):(.*)/, - names: ['id', 'attribute', 'value'], - format: "ssrc:%d %s:%s" - }, - { //a=ssrc-group:FEC 1 2 - push: "ssrcGroups", - reg: /^ssrc-group:(\w*) (.*)/, - names: ['semantics', 'ssrcs'], - format: "ssrc-group:%s %s" - }, - { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV - name: "msidSemantic", - reg: /^msid-semantic:\s?(\w*) (\S*)/, - names: ['semantic', 'token'], - format: "msid-semantic: %s %s" // space after ":" is not accidental - }, - { //a=group:BUNDLE audio video - push: 'groups', - reg: /^group:(\w*) (.*)/, - names: ['type', 'mids'], - format: "group:%s %s" - }, - { //a=rtcp-mux - name: 'rtcpMux', - reg: /^(rtcp-mux)/ - }, - { //a=rtcp-rsize - name: 'rtcpRsize', - reg: /^(rtcp-rsize)/ - }, - { // any a= that we don't understand is kepts verbatim on media.invalid - push: 'invalid', - names: ["value"] - } - ] -}; - -// set sensible defaults to avoid polluting the grammar with boring details -Object.keys(grammar).forEach(function (key) { - var objs = grammar[key]; - objs.forEach(function (obj) { - if (!obj.reg) { - obj.reg = /(.*)/; - } - if (!obj.format) { - obj.format = "%s"; - } - }); -}); - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var parser = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js"); -var writer = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js"); - -exports.write = writer; -exports.parse = parser.parse; -exports.parseFmtpConfig = parser.parseFmtpConfig; -exports.parsePayloads = parser.parsePayloads; -exports.parseRemoteCandidates = parser.parseRemoteCandidates; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js": -/***/ (function(module, exports, __webpack_require__) { - -var toIntIfInt = function (v) { - return String(Number(v)) === v ? Number(v) : v; -}; - -var attachProperties = function (match, location, names, rawName) { - if (rawName && !names) { - location[rawName] = toIntIfInt(match[1]); - } - else { - for (var i = 0; i < names.length; i += 1) { - if (match[i+1] != null) { - location[names[i]] = toIntIfInt(match[i+1]); - } - } - } -}; - -var parseReg = function (obj, location, content) { - var needsBlank = obj.name && obj.names; - if (obj.push && !location[obj.push]) { - location[obj.push] = []; - } - else if (needsBlank && !location[obj.name]) { - location[obj.name] = {}; - } - var keyLocation = obj.push ? - {} : // blank object that will be pushed - needsBlank ? location[obj.name] : location; // otherwise, named location or root - - attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name); - - if (obj.push) { - location[obj.push].push(keyLocation); - } -}; - -var grammar = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js"); -var validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/); - -exports.parse = function (sdp) { - var session = {} - , media = [] - , location = session; // points at where properties go under (one of the above) - - // parse lines we understand - sdp.split(/(\r\n|\r|\n)/).filter(validLine).forEach(function (l) { - var type = l[0]; - var content = l.slice(2); - if (type === 'm') { - media.push({rtp: [], fmtp: []}); - location = media[media.length-1]; // point at latest media line - } - - for (var j = 0; j < (grammar[type] || []).length; j += 1) { - var obj = grammar[type][j]; - if (obj.reg.test(content)) { - return parseReg(obj, location, content); - } - } - }); - - session.media = media; // link it up - return session; -}; - -var fmtpReducer = function (acc, expr) { - var s = expr.split('='); - if (s.length === 2) { - acc[s[0]] = toIntIfInt(s[1]); - } - return acc; -}; - -exports.parseFmtpConfig = function (str) { - return str.split(/\;\s?/).reduce(fmtpReducer, {}); -}; - -exports.parsePayloads = function (str) { - return str.split(' ').map(Number); -}; - -exports.parseRemoteCandidates = function (str) { - var candidates = []; - var parts = str.split(' ').map(toIntIfInt); - for (var i = 0; i < parts.length; i += 3) { - candidates.push({ - component: parts[i], - ip: parts[i + 1], - port: parts[i + 2] - }); - } - return candidates; -}; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js": -/***/ (function(module, exports, __webpack_require__) { - -var grammar = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js"); - -// customized util.format - discards excess arguments and can void middle ones -var formatRegExp = /%[sdv%]/g; -var format = function (formatStr) { - var i = 1; - var args = arguments; - var len = args.length; - return formatStr.replace(formatRegExp, function (x) { - if (i >= len) { - return x; // missing argument - } - var arg = args[i]; - i += 1; - switch (x) { - case '%%': - return '%'; - case '%s': - return String(arg); - case '%d': - return Number(arg); - case '%v': - return ''; - } - }); - // NB: we discard excess arguments - they are typically undefined from makeLine -}; - -var makeLine = function (type, obj, location) { - var str = obj.format instanceof Function ? - (obj.format(obj.push ? location : location[obj.name])) : - obj.format; - - var args = [type + '=' + str]; - if (obj.names) { - for (var i = 0; i < obj.names.length; i += 1) { - var n = obj.names[i]; - if (obj.name) { - args.push(location[obj.name][n]); - } - else { // for mLine and push attributes - args.push(location[obj.names[i]]); - } - } - } - else { - args.push(location[obj.name]); - } - return format.apply(null, args); -}; - -// RFC specified order -// TODO: extend this with all the rest -var defaultOuterOrder = [ - 'v', 'o', 's', 'i', - 'u', 'e', 'p', 'c', - 'b', 't', 'r', 'z', 'a' -]; -var defaultInnerOrder = ['i', 'c', 'b', 'a']; - - -module.exports = function (session, opts) { - opts = opts || {}; - // ensure certain properties exist - if (session.version == null) { - session.version = 0; // "v=0" must be there (only defined version atm) - } - if (session.name == null) { - session.name = " "; // "s= " must be there if no meaningful name set - } - session.media.forEach(function (mLine) { - if (mLine.payloads == null) { - mLine.payloads = ""; - } - }); - - var outerOrder = opts.outerOrder || defaultOuterOrder; - var innerOrder = opts.innerOrder || defaultInnerOrder; - var sdp = []; - - // loop through outerOrder for matching properties on session - outerOrder.forEach(function (type) { - grammar[type].forEach(function (obj) { - if (obj.name in session && session[obj.name] != null) { - sdp.push(makeLine(type, obj, session)); - } - else if (obj.push in session && session[obj.push] != null) { - session[obj.push].forEach(function (el) { - sdp.push(makeLine(type, obj, el)); - }); - } - }); - }); - - // then for each media line, follow the innerOrder - session.media.forEach(function (mLine) { - sdp.push(makeLine('m', grammar.m[0], mLine)); - - innerOrder.forEach(function (type) { - grammar[type].forEach(function (obj) { - if (obj.name in mLine && mLine[obj.name] != null) { - sdp.push(makeLine(type, obj, mLine)); - } - else if (obj.push in mLine && mLine[obj.push] != null) { - mLine[obj.push].forEach(function (el) { - sdp.push(makeLine(type, obj, el)); - }); - } - }); - }); - }); - - return sdp.join('\r\n') + '\r\n'; -}; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js": -/***/ (function(module, exports) { - -/* Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -module.exports = function arrayEquals(array) { - // if the other array is a falsy value, return - if (!array) - return false; - - // compare lengths - can save a lot of time - if (this.length != array.length) - return false; - - for (var i = 0, l = this.length; i < l; i++) { - // Check if we have nested arrays - if (this[i] instanceof Array && array[i] instanceof Array) { - // recurse into the nested arrays - if (!arrayEquals.apply(this[i], [array[i]])) - return false; - } else if (this[i] != array[i]) { - // Warning - two different object instances will never be equal: - // {x:20} != {x:20} - return false; - } - } - return true; -}; - - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -/* Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -exports.Interop = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js"); - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* global RTCSessionDescription */ -/* global RTCIceCandidate */ -/* jshint -W097 */ - - -var transform = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js"); -var arrayEquals = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js"); - -function Interop() { - - /** - * This map holds the most recent Unified Plan offer/answer SDP that was - * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and - * the SDP string as values. - * - * @type {{}} - */ - this.cache = { - mlB2UMap : {}, - mlU2BMap : {} - }; -} - -module.exports = Interop; - -/** - * Changes the candidate args to match with the related Unified Plan - */ -Interop.prototype.candidateToUnifiedPlan = function(candidate) { - var cand = new RTCIceCandidate(candidate); - - cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex]; - /* TODO: change sdpMid to (audio|video)-SSRC */ - - return cand; -}; - -/** - * Changes the candidate args to match with the related Plan B - */ -Interop.prototype.candidateToPlanB = function(candidate) { - var cand = new RTCIceCandidate(candidate); - - if (cand.sdpMid.indexOf('audio') === 0) { - cand.sdpMid = 'audio'; - } else if (cand.sdpMid.indexOf('video') === 0) { - cand.sdpMid = 'video'; - } else { - throw new Error('candidate with ' + cand.sdpMid + ' not allowed'); - } - - cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex]; - - return cand; -}; - -/** - * Returns the index of the first m-line with the given media type and with a - * direction which allows sending, in the last Unified Plan description with - * type "answer" converted to Plan B. Returns {null} if there is no saved - * answer, or if none of its m-lines with the given type allow sending. - * @param type the media type ("audio" or "video"). - * @returns {*} - */ -Interop.prototype.getFirstSendingIndexFromAnswer = function(type) { - if (!this.cache.answer) { - return null; - } - - var session = transform.parse(this.cache.answer); - if (session && session.media && Array.isArray(session.media)){ - for (var i = 0; i < session.media.length; i++) { - if (session.media[i].type == type && - (!session.media[i].direction /* default to sendrecv */ || - session.media[i].direction === 'sendrecv' || - session.media[i].direction === 'sendonly')){ - return i; - } - } - } - - return null; -}; - -/** - * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A - * PeerConnection wrapper transforms the SDP to Plan B before passing it to the - * application. - * - * @param desc - * @returns {*} - */ -Interop.prototype.toPlanB = function(desc) { - var self = this; - //#region Preliminary input validation. - - if (typeof desc !== 'object' || desc === null || - typeof desc.sdp !== 'string') { - console.warn('An empty description was passed as an argument.'); - return desc; - } - - // Objectify the SDP for easier manipulation. - var session = transform.parse(desc.sdp); - - // If the SDP contains no media, there's nothing to transform. - if (typeof session.media === 'undefined' || - !Array.isArray(session.media) || session.media.length === 0) { - console.warn('The description has no media.'); - return desc; - } - - // Try some heuristics to "make sure" this is a Unified Plan SDP. Plan B - // SDP has a video, an audio and a data "channel" at most. - if (session.media.length <= 3 && session.media.every(function(m) { - return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; - })) { - console.warn('This description does not look like Unified Plan.'); - return desc; - } - - //#endregion - - // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443 - var sdp = desc.sdp; - var rewrite = false; - for (var i = 0; i < session.media.length; i++) { - var uLine = session.media[i]; - uLine.rtp.forEach(function(rtp) { - if (rtp.codec === 'NULL') - { - rewrite = true; - var offer = transform.parse(self.cache.offer); - rtp.codec = offer.media[i].rtp[0].codec; - } - }); - } - if (rewrite) { - sdp = transform.write(session); - } - - // Unified Plan SDP is our "precious". Cache it for later use in the Plan B - // -> Unified Plan transformation. - this.cache[desc.type] = sdp; - - //#region Convert from Unified Plan to Plan B. - - // We rebuild the session.media array. - var media = session.media; - session.media = []; - - // Associative array that maps channel types to channel objects for fast - // access to channel objects by their type, e.g. type2bl['audio']->channel - // obj. - var type2bl = {}; - - // Used to build the group:BUNDLE value after the channels construction - // loop. - var types = []; - - media.forEach(function(uLine) { - // rtcp-mux is required in the Plan B SDP. - if ((typeof uLine.rtcpMux !== 'string' || - uLine.rtcpMux !== 'rtcp-mux') && - uLine.direction !== 'inactive') { - throw new Error('Cannot convert to Plan B because m-lines ' + - 'without the rtcp-mux attribute were found.'); - } - - // If we don't have a channel for this uLine.type OR the selected is - // inactive, then select this uLine as the channel basis. - if (typeof type2bl[uLine.type] === 'undefined' || - type2bl[uLine.type].direction === 'inactive') { - type2bl[uLine.type] = uLine; - } - - if (uLine.protocol != type2bl[uLine.type].protocol) { - throw new Error('Cannot convert to Plan B because m-lines ' + - 'have different protocols and this library does not have ' + - 'support for that'); - } - - if (uLine.payloads != type2bl[uLine.type].payloads) { - throw new Error('Cannot convert to Plan B because m-lines ' + - 'have different payloads and this library does not have ' + - 'support for that'); - } - - }); - - // Implode the Unified Plan m-lines/tracks into Plan B channels. - media.forEach(function(uLine) { - if (uLine.type === 'application') { - session.media.push(uLine); - types.push(uLine.mid); - return; - } - - // Add sources to the channel and handle a=msid. - if (typeof uLine.sources === 'object') { - Object.keys(uLine.sources).forEach(function(ssrc) { - if (typeof type2bl[uLine.type].sources !== 'object') - type2bl[uLine.type].sources = {}; - - // Assign the sources to the channel. - type2bl[uLine.type].sources[ssrc] = - uLine.sources[ssrc]; - - if (typeof uLine.msid !== 'undefined') { - // In Plan B the msid is an SSRC attribute. Also, we don't - // care about the obsolete label and mslabel attributes. - // - // Note that it is not guaranteed that the uLine will - // have an msid. recvonly channels in particular don't have - // one. - type2bl[uLine.type].sources[ssrc].msid = - uLine.msid; - } - // NOTE ssrcs in ssrc groups will share msids, as - // draft-uberti-rtcweb-plan-00 mandates. - }); - } - - // Add ssrc groups to the channel. - if (typeof uLine.ssrcGroups !== 'undefined' && - Array.isArray(uLine.ssrcGroups)) { - - // Create the ssrcGroups array, if it's not defined. - if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' || - !Array.isArray(type2bl[uLine.type].ssrcGroups)) { - type2bl[uLine.type].ssrcGroups = []; - } - - type2bl[uLine.type].ssrcGroups = - type2bl[uLine.type].ssrcGroups.concat( - uLine.ssrcGroups); - } - - if (type2bl[uLine.type] === uLine) { - // Plan B mids are in ['audio', 'video', 'data'] - uLine.mid = uLine.type; - - // Plan B doesn't support/need the bundle-only attribute. - delete uLine.bundleOnly; - - // In Plan B the msid is an SSRC attribute. - delete uLine.msid; - - if (uLine.type == media[0].type) { - types.unshift(uLine.type); - // Add the channel to the new media array. - session.media.unshift(uLine); - } else { - types.push(uLine.type); - // Add the channel to the new media array. - session.media.push(uLine); - } - } - }); - - if (typeof session.groups !== 'undefined') { - // We regenerate the BUNDLE group with the new mids. - session.groups.some(function(group) { - if (group.type === 'BUNDLE') { - group.mids = types.join(' '); - return true; - } - }); - } - - // msid semantic - session.msidSemantic = { - semantic: 'WMS', - token: '*' - }; - - var resStr = transform.write(session); - - return new RTCSessionDescription({ - type: desc.type, - sdp: resStr - }); - - //#endregion -}; - -/* follow rules defined in RFC4145 */ -function addSetupAttr(uLine) { - if (typeof uLine.setup === 'undefined') { - return; - } - - if (uLine.setup === "active") { - uLine.setup = "passive"; - } else if (uLine.setup === "passive") { - uLine.setup = "active"; - } -} - -/** - * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A - * PeerConnection wrapper transforms the SDP to Unified Plan before passing it - * to FF. - * - * @param desc - * @returns {*} - */ -Interop.prototype.toUnifiedPlan = function(desc) { - var self = this; - //#region Preliminary input validation. - - if (typeof desc !== 'object' || desc === null || - typeof desc.sdp !== 'string') { - console.warn('An empty description was passed as an argument.'); - return desc; - } - - var session = transform.parse(desc.sdp); - - // If the SDP contains no media, there's nothing to transform. - if (typeof session.media === 'undefined' || - !Array.isArray(session.media) || session.media.length === 0) { - console.warn('The description has no media.'); - return desc; - } - - // Try some heuristics to "make sure" this is a Plan B SDP. Plan B SDP has - // a video, an audio and a data "channel" at most. - if (session.media.length > 3 || !session.media.every(function(m) { - return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; - })) { - console.warn('This description does not look like Plan B.'); - return desc; - } - - // Make sure this Plan B SDP can be converted to a Unified Plan SDP. - var mids = []; - session.media.forEach(function(m) { - mids.push(m.mid); - }); - - var hasBundle = false; - if (typeof session.groups !== 'undefined' && - Array.isArray(session.groups)) { - hasBundle = session.groups.every(function(g) { - return g.type !== 'BUNDLE' || - arrayEquals.apply(g.mids.sort(), [mids.sort()]); - }); - } - - if (!hasBundle) { - var mustBeBundle = false; - - session.media.forEach(function(m) { - if (m.direction !== 'inactive') { - mustBeBundle = true; - } - }); - - if (mustBeBundle) { - throw new Error("Cannot convert to Unified Plan because m-lines that" + - " are not bundled were found."); - } - } - - //#endregion - - - //#region Convert from Plan B to Unified Plan. - - // Unfortunately, a Plan B offer/answer doesn't have enough information to - // rebuild an equivalent Unified Plan offer/answer. - // - // For example, if this is a local answer (in Unified Plan style) that we - // convert to Plan B prior to handing it over to the application (the - // PeerConnection wrapper called us, for instance, after a successful - // createAnswer), we want to remember the m-line at which we've seen the - // (local) SSRC. That's because when the application wants to do call the - // SLD method, forcing us to do the inverse transformation (from Plan B to - // Unified Plan), we need to know to which m-line to assign the (local) - // SSRC. We also need to know all the other m-lines that the original - // answer had and include them in the transformed answer as well. - // - // Another example is if this is a remote offer that we convert to Plan B - // prior to giving it to the application, we want to remember the mid at - // which we've seen the (remote) SSRC. - // - // In the iteration that follows, we use the cached Unified Plan (if it - // exists) to assign mids to ssrcs. - - var type; - if (desc.type === 'answer') { - type = 'offer'; - } else if (desc.type === 'offer') { - type = 'answer'; - } else { - throw new Error("Type '" + desc.type + "' not supported."); - } - - var cached; - if (typeof this.cache[type] !== 'undefined') { - cached = transform.parse(this.cache[type]); - } - - var recvonlySsrcs = { - audio: {}, - video: {} - }; - - // A helper map that sends mids to m-line objects. We use it later to - // rebuild the Unified Plan style session.media array. - var mid2ul = {}; - var bIdx = 0; - var uIdx = 0; - - var sources2ul = {}; - - var candidates; - var iceUfrag; - var icePwd; - var fingerprint; - var payloads = {}; - var rtcpFb = {}; - var rtp = {}; - - session.media.forEach(function(bLine) { - if ((typeof bLine.rtcpMux !== 'string' || - bLine.rtcpMux !== 'rtcp-mux') && - bLine.direction !== 'inactive') { - throw new Error("Cannot convert to Unified Plan because m-lines " + - "without the rtcp-mux attribute were found."); - } - - if (bLine.type === 'application') { - mid2ul[bLine.mid] = bLine; - return; - } - - // With rtcp-mux and bundle all the channels should have the same ICE - // stuff. - var sources = bLine.sources; - var ssrcGroups = bLine.ssrcGroups; - var port = bLine.port; - - /* Chrome adds different candidates even using bundle, so we concat the candidates list */ - if (typeof bLine.candidates != 'undefined') { - if (typeof candidates != 'undefined') { - candidates = candidates.concat(bLine.candidates); - } else { - candidates = bLine.candidates; - } - } - - if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) { - throw new Error("Only BUNDLE supported, iceUfrag must be the same for all m-lines.\n" + - "\tLast iceUfrag: " + iceUfrag + "\n" + - "\tNew iceUfrag: " + bLine.iceUfrag - ); - } - - if (typeof bLine.iceUfrag != 'undefined') { - iceUfrag = bLine.iceUfrag; - } - - if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) { - throw new Error("Only BUNDLE supported, icePwd must be the same for all m-lines.\n" + - "\tLast icePwd: " + icePwd + "\n" + - "\tNew icePwd: " + bLine.icePwd - ); - } - - if (typeof bLine.icePwd != 'undefined') { - icePwd = bLine.icePwd; - } - - if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') && - (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) { - throw new Error("Only BUNDLE supported, fingerprint must be the same for all m-lines.\n" + - "\tLast fingerprint: " + JSON.stringify(fingerprint) + "\n" + - "\tNew fingerprint: " + JSON.stringify(bLine.fingerprint) - ); - } - - if (typeof bLine.fingerprint != 'undefined') { - fingerprint = bLine.fingerprint; - } - - payloads[bLine.type] = bLine.payloads; - rtcpFb[bLine.type] = bLine.rtcpFb; - rtp[bLine.type] = bLine.rtp; - - // inverted ssrc group map - var ssrc2group = {}; - if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) { - ssrcGroups.forEach(function (ssrcGroup) { - // XXX This might brake if an SSRC is in more than one group - // for some reason. - if (typeof ssrcGroup.ssrcs !== 'undefined' && - Array.isArray(ssrcGroup.ssrcs)) { - ssrcGroup.ssrcs.forEach(function (ssrc) { - if (typeof ssrc2group[ssrc] === 'undefined') { - ssrc2group[ssrc] = []; - } - - ssrc2group[ssrc].push(ssrcGroup); - }); - } - }); - } - - // ssrc to m-line index. - var ssrc2ml = {}; - - if (typeof sources === 'object') { - - // We'll use the "bLine" object as a prototype for each new "mLine" - // that we create, but first we need to clean it up a bit. - delete bLine.sources; - delete bLine.ssrcGroups; - delete bLine.candidates; - delete bLine.iceUfrag; - delete bLine.icePwd; - delete bLine.fingerprint; - delete bLine.port; - delete bLine.mid; - - // Explode the Plan B channel sources with one m-line per source. - Object.keys(sources).forEach(function(ssrc) { - - // The (unified) m-line for this SSRC. We either create it from - // scratch or, if it's a grouped SSRC, we re-use a related - // mline. In other words, if the source is grouped with another - // source, put the two together in the same m-line. - var uLine; - - // We assume here that we are the answerer in the O/A, so any - // offers which we translate come from the remote side, while - // answers are local. So the check below is to make that we - // handle receive-only SSRCs in a special way only if they come - // from the remote side. - if (desc.type==='offer') { - // We want to detect SSRCs which are used by a remote peer - // in an m-line with direction=recvonly (i.e. they are - // being used for RTCP only). - // This information would have gotten lost if the remote - // peer used Unified Plan and their local description was - // translated to Plan B. So we use the lack of an MSID - // attribute to deduce a "receive only" SSRC. - if (!sources[ssrc].msid) { - recvonlySsrcs[bLine.type][ssrc] = sources[ssrc]; - // Receive-only SSRCs must not create new m-lines. We - // will assign them to an existing m-line later. - return; - } - } - - if (typeof ssrc2group[ssrc] !== 'undefined' && - Array.isArray(ssrc2group[ssrc])) { - ssrc2group[ssrc].some(function (ssrcGroup) { - // ssrcGroup.ssrcs *is* an Array, no need to check - // again here. - return ssrcGroup.ssrcs.some(function (related) { - if (typeof ssrc2ml[related] === 'object') { - uLine = ssrc2ml[related]; - return true; - } - }); - }); - } - - if (typeof uLine === 'object') { - // the m-line already exists. Just add the source. - uLine.sources[ssrc] = sources[ssrc]; - delete sources[ssrc].msid; - } else { - // Use the "bLine" as a prototype for the "uLine". - uLine = Object.create(bLine); - ssrc2ml[ssrc] = uLine; - - if (typeof sources[ssrc].msid !== 'undefined') { - // Assign the msid of the source to the m-line. Note - // that it is not guaranteed that the source will have - // msid. In particular "recvonly" sources don't have an - // msid. Note that "recvonly" is a term only defined - // for m-lines. - uLine.msid = sources[ssrc].msid; - delete sources[ssrc].msid; - } - - // We assign one SSRC per media line. - uLine.sources = {}; - uLine.sources[ssrc] = sources[ssrc]; - uLine.ssrcGroups = ssrc2group[ssrc]; - - // Use the cached Unified Plan SDP (if it exists) to assign - // SSRCs to mids. - if (typeof cached !== 'undefined' && - typeof cached.media !== 'undefined' && - Array.isArray(cached.media)) { - - cached.media.forEach(function (m) { - if (typeof m.sources === 'object') { - Object.keys(m.sources).forEach(function (s) { - if (s === ssrc) { - uLine.mid = m.mid; - } - }); - } - }); - } - - if (typeof uLine.mid === 'undefined') { - - // If this is an SSRC that we see for the first time - // assign it a new mid. This is typically the case when - // this method is called to transform a remote - // description for the first time or when there is a - // new SSRC in the remote description because a new - // peer has joined the conference. Local SSRCs should - // have already been added to the map in the toPlanB - // method. - // - // Because FF generates answers in Unified Plan style, - // we MUST already have a cached answer with all the - // local SSRCs mapped to some m-line/mid. - - uLine.mid = [bLine.type, '-', ssrc].join(''); - } - - // Include the candidates in the 1st media line. - uLine.candidates = candidates; - uLine.iceUfrag = iceUfrag; - uLine.icePwd = icePwd; - uLine.fingerprint = fingerprint; - uLine.port = port; - - mid2ul[uLine.mid] = uLine; - sources2ul[uIdx] = uLine.sources; - - self.cache.mlU2BMap[uIdx] = bIdx; - if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') { - self.cache.mlB2UMap[bIdx] = uIdx; - } - uIdx++; - } - }); - } else { - var uLine = bLine; - - uLine.candidates = candidates; - uLine.iceUfrag = iceUfrag; - uLine.icePwd = icePwd; - uLine.fingerprint = fingerprint; - uLine.port = port; - - mid2ul[uLine.mid] = uLine; - - self.cache.mlU2BMap[uIdx] = bIdx; - if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') { - self.cache.mlB2UMap[bIdx] = uIdx; - } - } - - bIdx++; - }); - - // Rebuild the media array in the right order and add the missing mLines - // (missing from the Plan B SDP). - session.media = []; - mids = []; // reuse - - if (desc.type === 'answer') { - - // The media lines in the answer must match the media lines in the - // offer. The order is important too. Here we assume that Firefox is - // the answerer, so we merely have to use the reconstructed (unified) - // answer to update the cached (unified) answer accordingly. - // - // In the general case, one would have to use the cached (unified) - // offer to find the m-lines that are missing from the reconstructed - // answer, potentially grabbing them from the cached (unified) answer. - // One has to be careful with this approach because inactive m-lines do - // not always have an mid, making it tricky (impossible?) to find where - // exactly and which m-lines are missing from the reconstructed answer. - - for (var i = 0; i < cached.media.length; i++) { - var uLine = cached.media[i]; - - delete uLine.msid; - delete uLine.sources; - delete uLine.ssrcGroups; - - if (typeof sources2ul[i] === 'undefined') { - if (!uLine.direction - || uLine.direction === 'sendrecv') - uLine.direction = 'recvonly'; - else if (uLine.direction === 'sendonly') - uLine.direction = 'inactive'; - } else { - if (!uLine.direction - || uLine.direction === 'sendrecv') - uLine.direction = 'sendrecv'; - else if (uLine.direction === 'recvonly') - uLine.direction = 'sendonly'; - } - - uLine.sources = sources2ul[i]; - uLine.candidates = candidates; - uLine.iceUfrag = iceUfrag; - uLine.icePwd = icePwd; - uLine.fingerprint = fingerprint; - - uLine.rtp = rtp[uLine.type]; - uLine.payloads = payloads[uLine.type]; - uLine.rtcpFb = rtcpFb[uLine.type]; - - session.media.push(uLine); - - if (typeof uLine.mid === 'string') { - // inactive lines don't/may not have an mid. - mids.push(uLine.mid); - } - } - } else { - - // SDP offer/answer (and the JSEP spec) forbids removing an m-section - // under any circumstances. If we are no longer interested in sending a - // track, we just remove the msid and ssrc attributes and set it to - // either a=recvonly (as the reofferer, we must use recvonly if the - // other side was previously sending on the m-section, but we can also - // leave the possibility open if it wasn't previously in use), or - // a=inactive. - - if (typeof cached !== 'undefined' && - typeof cached.media !== 'undefined' && - Array.isArray(cached.media)) { - cached.media.forEach(function(uLine) { - mids.push(uLine.mid); - if (typeof mid2ul[uLine.mid] !== 'undefined') { - session.media.push(mid2ul[uLine.mid]); - } else { - delete uLine.msid; - delete uLine.sources; - delete uLine.ssrcGroups; - - if (!uLine.direction - || uLine.direction === 'sendrecv') { - uLine.direction = 'sendonly'; - } - if (!uLine.direction - || uLine.direction === 'recvonly') { - uLine.direction = 'inactive'; - } - - addSetupAttr (uLine); - session.media.push(uLine); - } - }); - } - - // Add all the remaining (new) m-lines of the transformed SDP. - Object.keys(mid2ul).forEach(function(mid) { - if (mids.indexOf(mid) === -1) { - mids.push(mid); - if (mid2ul[mid].direction === 'recvonly') { - // This is a remote recvonly channel. Add its SSRC to the - // appropriate sendrecv or sendonly channel. - // TODO(gp) what if we don't have sendrecv/sendonly - // channel? - - var done = false; - - session.media.some(function (uLine) { - if ((uLine.direction === 'sendrecv' || - uLine.direction === 'sendonly') && - uLine.type === mid2ul[mid].type) { - // mid2ul[mid] shouldn't have any ssrc-groups - Object.keys(mid2ul[mid].sources).forEach( - function (ssrc) { - uLine.sources[ssrc] = - mid2ul[mid].sources[ssrc]; - }); - - done = true; - return true; - } - }); - - if (!done) { - session.media.push(mid2ul[mid]); - } - } else { - session.media.push(mid2ul[mid]); - } - } - }); - } - - // After we have constructed the Plan Unified m-lines we can figure out - // where (in which m-line) to place the 'recvonly SSRCs'. - // Note: we assume here that we are the answerer in the O/A, so any offers - // which we translate come from the remote side, while answers are local - // (and so our last local description is cached as an 'answer'). - ["audio", "video"].forEach(function (type) { - if (!session || !session.media || !Array.isArray(session.media)) - return; - - var idx = null; - if (Object.keys(recvonlySsrcs[type]).length > 0) { - idx = self.getFirstSendingIndexFromAnswer(type); - if (idx === null){ - // If this is the first offer we receive, we don't have a - // cached answer. Assume that we will be sending media using - // the first m-line for each media type. - - for (var i = 0; i < session.media.length; i++) { - if (session.media[i].type === type) { - idx = i; - break; - } - } - } - } - - if (idx && session.media.length > idx) { - var mLine = session.media[idx]; - Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) { - if (mLine.sources && mLine.sources[ssrc]) { - console.warn("Replacing an existing SSRC."); - } - if (!mLine.sources) { - mLine.sources = {}; - } - - mLine.sources[ssrc] = recvonlySsrcs[type][ssrc]; - }); - } - }); - - if (typeof session.groups !== 'undefined') { - // We regenerate the BUNDLE group (since we regenerated the mids) - session.groups.some(function(group) { - if (group.type === 'BUNDLE') { - group.mids = mids.join(' '); - return true; - } - }); - } - - // msid semantic - session.msidSemantic = { - semantic: 'WMS', - token: '*' - }; - - var resStr = transform.write(session); - - // Cache the transformed SDP (Unified Plan) for later re-use in this - // function. - this.cache[desc.type] = resStr; - - return new RTCSessionDescription({ - type: desc.type, - sdp: resStr - }); - - //#endregion -}; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js": -/***/ (function(module, exports, __webpack_require__) { - -/* Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var transform = __webpack_require__("../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js"); - -exports.write = function(session, opts) { - - if (typeof session !== 'undefined' && - typeof session.media !== 'undefined' && - Array.isArray(session.media)) { - - session.media.forEach(function (mLine) { - // expand sources to ssrcs - if (typeof mLine.sources !== 'undefined' && - Object.keys(mLine.sources).length !== 0) { - mLine.ssrcs = []; - Object.keys(mLine.sources).forEach(function (ssrc) { - var source = mLine.sources[ssrc]; - Object.keys(source).forEach(function (attribute) { - mLine.ssrcs.push({ - id: ssrc, - attribute: attribute, - value: source[attribute] - }); - }); - }); - delete mLine.sources; - } - - // join ssrcs in ssrc groups - if (typeof mLine.ssrcGroups !== 'undefined' && - Array.isArray(mLine.ssrcGroups)) { - mLine.ssrcGroups.forEach(function (ssrcGroup) { - if (typeof ssrcGroup.ssrcs !== 'undefined' && - Array.isArray(ssrcGroup.ssrcs)) { - ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' '); - } - }); - } - }); - } - - // join group mids - if (typeof session !== 'undefined' && - typeof session.groups !== 'undefined' && Array.isArray(session.groups)) { - - session.groups.forEach(function (g) { - if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) { - g.mids = g.mids.join(' '); - } - }); - } - - return transform.write(session, opts); -}; - -exports.parse = function(sdp) { - var session = transform.parse(sdp); - - if (typeof session !== 'undefined' && typeof session.media !== 'undefined' && - Array.isArray(session.media)) { - - session.media.forEach(function (mLine) { - // group sources attributes by ssrc - if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) { - mLine.sources = {}; - mLine.ssrcs.forEach(function (ssrc) { - if (!mLine.sources[ssrc.id]) - mLine.sources[ssrc.id] = {}; - mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value; - }); - - delete mLine.ssrcs; - } - - // split ssrcs in ssrc groups - if (typeof mLine.ssrcGroups !== 'undefined' && - Array.isArray(mLine.ssrcGroups)) { - mLine.ssrcGroups.forEach(function (ssrcGroup) { - if (typeof ssrcGroup.ssrcs === 'string') { - ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' '); - } - }); - } - }); - } - // split group mids - if (typeof session !== 'undefined' && - typeof session.groups !== 'undefined' && Array.isArray(session.groups)) { - - session.groups.forEach(function (g) { - if (typeof g.mids === 'string') { - g.mids = g.mids.split(' '); - } - }); - } - - return session; -}; - - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js": -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/*! - * UAParser.js v0.7.18 - * Lightweight JavaScript-based User-Agent string parser - * https://github.com/faisalman/ua-parser-js - * - * Copyright © 2012-2016 Faisal Salman - * Dual licensed under GPLv2 or MIT - */ - -(function (window, undefined) { - - 'use strict'; - - ////////////// - // Constants - ///////////// - - - var LIBVERSION = '0.7.18', - EMPTY = '', - UNKNOWN = '?', - FUNC_TYPE = 'function', - UNDEF_TYPE = 'undefined', - OBJ_TYPE = 'object', - STR_TYPE = 'string', - MAJOR = 'major', // deprecated - MODEL = 'model', - NAME = 'name', - TYPE = 'type', - VENDOR = 'vendor', - VERSION = 'version', - ARCHITECTURE= 'architecture', - CONSOLE = 'console', - MOBILE = 'mobile', - TABLET = 'tablet', - SMARTTV = 'smarttv', - WEARABLE = 'wearable', - EMBEDDED = 'embedded'; - - - /////////// - // Helper - ////////// - - - var util = { - extend : function (regexes, extensions) { - var margedRegexes = {}; - for (var i in regexes) { - if (extensions[i] && extensions[i].length % 2 === 0) { - margedRegexes[i] = extensions[i].concat(regexes[i]); - } else { - margedRegexes[i] = regexes[i]; - } - } - return margedRegexes; - }, - has : function (str1, str2) { - if (typeof str1 === "string") { - return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; - } else { - return false; - } - }, - lowerize : function (str) { - return str.toLowerCase(); - }, - major : function (version) { - return typeof(version) === STR_TYPE ? version.replace(/[^\d\.]/g,'').split(".")[0] : undefined; - }, - trim : function (str) { - return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - } - }; - - - /////////////// - // Map helper - ////////////// - - - var mapper = { - - rgx : function (ua, arrays) { - - //var result = {}, - var i = 0, j, k, p, q, matches, match;//, args = arguments; - - /*// construct object barebones - for (p = 0; p < args[1].length; p++) { - q = args[1][p]; - result[typeof q === OBJ_TYPE ? q[0] : q] = undefined; - }*/ - - // loop through all regexes maps - while (i < arrays.length && !matches) { - - var regex = arrays[i], // even sequence (0,2,4,..) - props = arrays[i + 1]; // odd sequence (1,3,5,..) - j = k = 0; - - // try matching uastring with regexes - while (j < regex.length && !matches) { - - matches = regex[j++].exec(ua); - - if (!!matches) { - for (p = 0; p < props.length; p++) { - match = matches[++k]; - q = props[p]; - // check if given property is actually array - if (typeof q === OBJ_TYPE && q.length > 0) { - if (q.length == 2) { - if (typeof q[1] == FUNC_TYPE) { - // assign modified match - this[q[0]] = q[1].call(this, match); - } else { - // assign given value, ignore regex match - this[q[0]] = q[1]; - } - } else if (q.length == 3) { - // check whether function or regex - if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) { - // call function (usually string mapper) - this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined; - } else { - // sanitize match using given regex - this[q[0]] = match ? match.replace(q[1], q[2]) : undefined; - } - } else if (q.length == 4) { - this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined; - } - } else { - this[q] = match ? match : undefined; - } - } - } - } - i += 2; - } - // console.log(this); - //return this; - }, - - str : function (str, map) { - - for (var i in map) { - // check if array - if (typeof map[i] === OBJ_TYPE && map[i].length > 0) { - for (var j = 0; j < map[i].length; j++) { - if (util.has(map[i][j], str)) { - return (i === UNKNOWN) ? undefined : i; - } - } - } else if (util.has(map[i], str)) { - return (i === UNKNOWN) ? undefined : i; - } - } - return str; - } - }; - - - /////////////// - // String map - ////////////// - - - var maps = { - - browser : { - oldsafari : { - version : { - '1.0' : '/8', - '1.2' : '/1', - '1.3' : '/3', - '2.0' : '/412', - '2.0.2' : '/416', - '2.0.3' : '/417', - '2.0.4' : '/419', - '?' : '/' - } - } - }, - - device : { - amazon : { - model : { - 'Fire Phone' : ['SD', 'KF'] - } - }, - sprint : { - model : { - 'Evo Shift 4G' : '7373KT' - }, - vendor : { - 'HTC' : 'APA', - 'Sprint' : 'Sprint' - } - } - }, - - os : { - windows : { - version : { - 'ME' : '4.90', - 'NT 3.11' : 'NT3.51', - 'NT 4.0' : 'NT4.0', - '2000' : 'NT 5.0', - 'XP' : ['NT 5.1', 'NT 5.2'], - 'Vista' : 'NT 6.0', - '7' : 'NT 6.1', - '8' : 'NT 6.2', - '8.1' : 'NT 6.3', - '10' : ['NT 6.4', 'NT 10.0'], - 'RT' : 'ARM' - } - } - } - }; - - - ////////////// - // Regex map - ///////////// - - - var regexes = { - - browser : [[ - - // Presto based - /(opera\smini)\/([\w\.-]+)/i, // Opera Mini - /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet - /(opera).+version\/([\w\.]+)/i, // Opera > 9.80 - /(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80 - ], [NAME, VERSION], [ - - /(opios)[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0 - ], [[NAME, 'Opera Mini'], VERSION], [ - - /\s(opr)\/([\w\.]+)/i // Opera Webkit - ], [[NAME, 'Opera'], VERSION], [ - - // Mixed - /(kindle)\/([\w\.]+)/i, // Kindle - /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i, - // Lunascape/Maxthon/Netfront/Jasmine/Blazer - - // Trident based - /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i, - // Avant/IEMobile/SlimBrowser/Baidu - /(?:ms|\()(ie)\s([\w\.]+)/i, // Internet Explorer - - // Webkit/KHTML based - /(rekonq)\/([\w\.]*)/i, // Rekonq - /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i - // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser - ], [NAME, VERSION], [ - - /(trident).+rv[:\s]([\w\.]+).+like\sgecko/i // IE11 - ], [[NAME, 'IE'], VERSION], [ - - /(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i // Microsoft Edge - ], [[NAME, 'Edge'], VERSION], [ - - /(yabrowser)\/([\w\.]+)/i // Yandex - ], [[NAME, 'Yandex'], VERSION], [ - - /(puffin)\/([\w\.]+)/i // Puffin - ], [[NAME, 'Puffin'], VERSION], [ - - /((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i - // UCBrowser - ], [[NAME, 'UCBrowser'], VERSION], [ - - /(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon - ], [[NAME, /_/g, ' '], VERSION], [ - - /(micromessenger)\/([\w\.]+)/i // WeChat - ], [[NAME, 'WeChat'], VERSION], [ - - /(qqbrowserlite)\/([\w\.]+)/i // QQBrowserLite - ], [NAME, VERSION], [ - - /(QQ)\/([\d\.]+)/i // QQ, aka ShouQ - ], [NAME, VERSION], [ - - /m?(qqbrowser)[\/\s]?([\w\.]+)/i // QQBrowser - ], [NAME, VERSION], [ - - /(BIDUBrowser)[\/\s]?([\w\.]+)/i // Baidu Browser - ], [NAME, VERSION], [ - - /(2345Explorer)[\/\s]?([\w\.]+)/i // 2345 Browser - ], [NAME, VERSION], [ - - /(MetaSr)[\/\s]?([\w\.]+)/i // SouGouBrowser - ], [NAME], [ - - /(LBBROWSER)/i // LieBao Browser - ], [NAME], [ - - /xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser - ], [VERSION, [NAME, 'MIUI Browser']], [ - - /;fbav\/([\w\.]+);/i // Facebook App for iOS & Android - ], [VERSION, [NAME, 'Facebook']], [ - - /headlesschrome(?:\/([\w\.]+)|\s)/i // Chrome Headless - ], [VERSION, [NAME, 'Chrome Headless']], [ - - /\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView - ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [ - - /((?:oculus|samsung)browser)\/([\w\.]+)/i - ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser - - /android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser - ], [VERSION, [NAME, 'Android Browser']], [ - - /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i - // Chrome/OmniWeb/Arora/Tizen/Nokia - ], [NAME, VERSION], [ - - /(dolfin)\/([\w\.]+)/i // Dolphin - ], [[NAME, 'Dolphin'], VERSION], [ - - /((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS - ], [[NAME, 'Chrome'], VERSION], [ - - /(coast)\/([\w\.]+)/i // Opera Coast - ], [[NAME, 'Opera Coast'], VERSION], [ - - /fxios\/([\w\.-]+)/i // Firefox for iOS - ], [VERSION, [NAME, 'Firefox']], [ - - /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari - ], [VERSION, [NAME, 'Mobile Safari']], [ - - /version\/([\w\.]+).+?(mobile\s?safari|safari)/i // Safari & Safari Mobile - ], [VERSION, NAME], [ - - /webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Google Search Appliance on iOS - ], [[NAME, 'GSA'], VERSION], [ - - /webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Safari < 3.0 - ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [ - - /(konqueror)\/([\w\.]+)/i, // Konqueror - /(webkit|khtml)\/([\w\.]+)/i - ], [NAME, VERSION], [ - - // Gecko based - /(navigator|netscape)\/([\w\.-]+)/i // Netscape - ], [[NAME, 'Netscape'], VERSION], [ - /(swiftfox)/i, // Swiftfox - /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, - // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror - /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i, - - // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix - /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla - - // Other - /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i, - // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir - /(links)\s\(([\w\.]+)/i, // Links - /(gobrowser)\/?([\w\.]*)/i, // GoBrowser - /(ice\s?browser)\/v?([\w\._]+)/i, // ICE Browser - /(mosaic)[\/\s]([\w\.]+)/i // Mosaic - ], [NAME, VERSION] - - /* ///////////////////// - // Media players BEGIN - //////////////////////// - - , [ - - /(apple(?:coremedia|))\/((\d+)[\w\._]+)/i, // Generic Apple CoreMedia - /(coremedia) v((\d+)[\w\._]+)/i - ], [NAME, VERSION], [ - - /(aqualung|lyssna|bsplayer)\/((\d+)?[\w\.-]+)/i // Aqualung/Lyssna/BSPlayer - ], [NAME, VERSION], [ - - /(ares|ossproxy)\s((\d+)[\w\.-]+)/i // Ares/OSSProxy - ], [NAME, VERSION], [ - - /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/((\d+)[\w\.-]+)/i, - // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC - // NSPlayer/PSP-InternetRadioPlayer/Videos - /(clementine|music player daemon)\s((\d+)[\w\.-]+)/i, // Clementine/MPD - /(lg player|nexplayer)\s((\d+)[\d\.]+)/i, - /player\/(nexplayer|lg player)\s((\d+)[\w\.-]+)/i // NexPlayer/LG Player - ], [NAME, VERSION], [ - /(nexplayer)\s((\d+)[\w\.-]+)/i // Nexplayer - ], [NAME, VERSION], [ - - /(flrp)\/((\d+)[\w\.-]+)/i // Flip Player - ], [[NAME, 'Flip Player'], VERSION], [ - - /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i - // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit - ], [NAME], [ - - /(gstreamer) souphttpsrc (?:\([^\)]+\)){0,1} libsoup\/((\d+)[\w\.-]+)/i - // Gstreamer - ], [NAME, VERSION], [ - - /(htc streaming player)\s[\w_]+\s\/\s((\d+)[\d\.]+)/i, // HTC Streaming Player - /(java|python-urllib|python-requests|wget|libcurl)\/((\d+)[\w\.-_]+)/i, - // Java/urllib/requests/wget/cURL - /(lavf)((\d+)[\d\.]+)/i // Lavf (FFMPEG) - ], [NAME, VERSION], [ - - /(htc_one_s)\/((\d+)[\d\.]+)/i // HTC One S - ], [[NAME, /_/g, ' '], VERSION], [ - - /(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+){0,1})/i - // MPlayer SVN - ], [NAME, VERSION], [ - - /(mplayer)(?:\s|\/|[unkow-]+)((\d+)[\w\.-]+)/i // MPlayer - ], [NAME, VERSION], [ - - /(mplayer)/i, // MPlayer (no other info) - /(yourmuze)/i, // YourMuze - /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime - ], [NAME], [ - - /(nero (?:home|scout))\/((\d+)[\w\.-]+)/i // Nero Home/Nero Scout - ], [NAME, VERSION], [ - - /(nokia\d+)\/((\d+)[\w\.-]+)/i // Nokia - ], [NAME, VERSION], [ - - /\s(songbird)\/((\d+)[\w\.-]+)/i // Songbird/Philips-Songbird - ], [NAME, VERSION], [ - - /(winamp)3 version ((\d+)[\w\.-]+)/i, // Winamp - /(winamp)\s((\d+)[\w\.-]+)/i, - /(winamp)mpeg\/((\d+)[\w\.-]+)/i - ], [NAME, VERSION], [ - - /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info) - // inlight radio - ], [NAME], [ - - /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/((\d+)[\w\.-]+)/i - // QuickTime/RealMedia/RadioApp/RadioClientApplication/ - // SoundTap/Totem/Stagefright/Streamium - ], [NAME, VERSION], [ - - /(smp)((\d+)[\d\.]+)/i // SMP - ], [NAME, VERSION], [ - - /(vlc) media player - version ((\d+)[\w\.]+)/i, // VLC Videolan - /(vlc)\/((\d+)[\w\.-]+)/i, - /(xbmc|gvfs|xine|xmms|irapp)\/((\d+)[\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp - /(foobar2000)\/((\d+)[\d\.]+)/i, // Foobar2000 - /(itunes)\/((\d+)[\d\.]+)/i // iTunes - ], [NAME, VERSION], [ - - /(wmplayer)\/((\d+)[\w\.-]+)/i, // Windows Media Player - /(windows-media-player)\/((\d+)[\w\.-]+)/i - ], [[NAME, /-/g, ' '], VERSION], [ - - /windows\/((\d+)[\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i - // Windows Media Server - ], [VERSION, [NAME, 'Windows']], [ - - /(com\.riseupradioalarm)\/((\d+)[\d\.]*)/i // RiseUP Radio Alarm - ], [NAME, VERSION], [ - - /(rad.io)\s((\d+)[\d\.]+)/i, // Rad.io - /(radio.(?:de|at|fr))\s((\d+)[\d\.]+)/i - ], [[NAME, 'rad.io'], VERSION] - - ////////////////////// - // Media players END - ////////////////////*/ - - ], - - cpu : [[ - - /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64 - ], [[ARCHITECTURE, 'amd64']], [ - - /(ia32(?=;))/i // IA32 (quicktime) - ], [[ARCHITECTURE, util.lowerize]], [ - - /((?:i[346]|x)86)[;\)]/i // IA32 - ], [[ARCHITECTURE, 'ia32']], [ - - // PocketPC mistakenly identified as PowerPC - /windows\s(ce|mobile);\sppc;/i - ], [[ARCHITECTURE, 'arm']], [ - - /((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i // PowerPC - ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [ - - /(sun4\w)[;\)]/i // SPARC - ], [[ARCHITECTURE, 'sparc']], [ - - /((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i - // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC - ], [[ARCHITECTURE, util.lowerize]] - ], - - device : [[ - - /\((ipad|playbook);[\w\s\);-]+(rim|apple)/i // iPad/PlayBook - ], [MODEL, VENDOR, [TYPE, TABLET]], [ - - /applecoremedia\/[\w\.]+ \((ipad)/ // iPad - ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [ - - /(apple\s{0,1}tv)/i // Apple TV - ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [ - - /(archos)\s(gamepad2?)/i, // Archos - /(hp).+(touchpad)/i, // HP TouchPad - /(hp).+(tablet)/i, // HP Tablet - /(kindle)\/([\w\.]+)/i, // Kindle - /\s(nook)[\w\s]+build\/(\w+)/i, // Nook - /(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak - ], [VENDOR, MODEL, [TYPE, TABLET]], [ - - /(kf[A-z]+)\sbuild\/.+silk\//i // Kindle Fire HD - ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ - /(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i // Fire Phone - ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [ - - /\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone - ], [MODEL, VENDOR, [TYPE, MOBILE]], [ - /\((ip[honed|\s\w*]+);/i // iPod/iPhone - ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [ - - /(blackberry)[\s-]?(\w+)/i, // BlackBerry - /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i, - // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron - /(hp)\s([\w\s]+\w)/i, // HP iPAQ - /(asus)-?(\w+)/i // Asus - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - /\(bb10;\s(\w+)/i // BlackBerry 10 - ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [ - // Asus Tablets - /android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i - ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [ - - /(sony)\s(tablet\s[ps])\sbuild\//i, // Sony - /(sony)?(?:sgp.+)\sbuild\//i - ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [ - /android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i - ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [ - - /\s(ouya)\s/i, // Ouya - /(nintendo)\s([wids3u]+)/i // Nintendo - ], [VENDOR, MODEL, [TYPE, CONSOLE]], [ - - /android.+;\s(shield)\sbuild/i // Nvidia - ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ - - /(playstation\s[34portablevi]+)/i // Playstation - ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [ - - /(sprint\s(\w+))/i // Sprint Phones - ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [ - - /(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i // Lenovo tablets - ], [VENDOR, MODEL, [TYPE, TABLET]], [ - - /(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i, // HTC - /(zte)-(\w*)/i, // ZTE - /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i - // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony - ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ - - /(nexus\s9)/i // HTC Nexus 9 - ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [ - - /d\/huawei([\w\s-]+)[;\)]/i, - /(nexus\s6p)/i // Huawei - ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [ - - /(microsoft);\s(lumia[\s\w]+)/i // Microsoft Lumia - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - - /[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox - ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [ - /(kin\.[onetw]{3})/i // Microsoft Kin - ], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [ - - // Motorola - /\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i, - /mot[\s-]?(\w*)/i, - /(XT\d{3,4}) build\//i, - /(nexus\s6)/i - ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [ - /android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i - ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [ - - /hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices - ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [ - - /hbbtv.+maple;(\d+)/i - ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [ - - /\(dtv[\);].+(aquos)/i // Sharp - ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ - - /android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i, - /((SM-T\w+))/i - ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung - /smart-tv.+(samsung)/i - ], [VENDOR, [TYPE, SMARTTV], MODEL], [ - /((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i, - /(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i, - /sec-((sgh\w+))/i - ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [ - - /sie-(\w*)/i // Siemens - ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [ - - /(maemo|nokia).*(n900|lumia\s\d+)/i, // Nokia - /(nokia)[\s_-]?([\w-]*)/i - ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [ - - /android\s3\.[\s\w;-]{10}(a\d{3})/i // Acer - ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [ - - /android.+([vl]k\-?\d{3})\s+build/i // LG Tablet - ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [ - /android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet - ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [ - /(lg) netcast\.tv/i // LG SmartTV - ], [VENDOR, MODEL, [TYPE, SMARTTV]], [ - /(nexus\s[45])/i, // LG - /lg[e;\s\/-]+(\w*)/i, - /android.+lg(\-?[\d\w]+)\s+build/i - ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [ - - /android.+(ideatab[a-z0-9\-\s]+)/i // Lenovo - ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [ - - /linux;.+((jolla));/i // Jolla - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - - /((pebble))app\/[\d\.]+\s/i // Pebble - ], [VENDOR, MODEL, [TYPE, WEARABLE]], [ - - /android.+;\s(oppo)\s?([\w\s]+)\sbuild/i // OPPO - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - - /crkey/i // Google Chromecast - ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [ - - /android.+;\s(glass)\s\d/i // Google Glass - ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [ - - /android.+;\s(pixel c)\s/i // Google Pixel C - ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [ - - /android.+;\s(pixel xl|pixel)\s/i // Google Pixel - ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [ - - /android.+;\s(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models - /android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i, // Xiaomi Hongmi - /android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i, // Xiaomi Mi - /android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i // Redmi Phones - ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [ - /android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i // Mi Pad tablets - ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [ - /android.+;\s(m[1-5]\snote)\sbuild/i // Meizu Tablet - ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [ - - /android.+a000(1)\s+build/i, // OnePlus - /android.+oneplus\s(a\d{4})\s+build/i - ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [ - - /android.+[;\/]\s*(RCT[\d\w]+)\s+build/i // RCA Tablets - ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [ - - /android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i // Dell Venue Tablets - ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i // Verizon Tablet - ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [ - - /android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i // Barnes & Noble Tablet - ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [ - - /android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i // Barnes & Noble Tablet - ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [ - - /android.+;\s(k88)\sbuild/i // ZTE K Series Tablet - ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*(gen\d{3})\s+build.*49h/i // Swiss GEN Mobile - ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [ - - /android.+[;\/]\s*(zur\d{3})\s+build/i // Swiss ZUR Tablet - ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i // Zeki Tablets - ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [ - - /(android).+[;\/]\s+([YR]\d{2})\s+build/i, - /android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i // Dragon Touch Tablet - ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [ - - /android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i // Insignia Tablets - ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i // NextBook Tablets - ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i - ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones - - /android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i // LvTel Phones - ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [ - - /android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i // Envizen Tablets - ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i // Le Pan Tablets - ], [VENDOR, MODEL, [TYPE, TABLET]], [ - - /android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i // MachSpeed Tablets - ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [ - - /android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i // Trinity Tablets - ], [VENDOR, MODEL, [TYPE, TABLET]], [ - - /android.+[;\/]\s*TU_(1491)\s+build/i // Rotor Tablets - ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [ - - /android.+(KS(.+))\s+build/i // Amazon Kindle Tablets - ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ - - /android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i // Gigaset Tablets - ], [VENDOR, MODEL, [TYPE, TABLET]], [ - - /\s(tablet|tab)[;\/]/i, // Unidentifiable Tablet - /\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile - ], [[TYPE, util.lowerize], VENDOR, MODEL], [ - - /(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device - ], [MODEL, [VENDOR, 'Generic']] - - - /*////////////////////////// - // TODO: move to string map - //////////////////////////// - - /(C6603)/i // Sony Xperia Z C6603 - ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [ - /(C6903)/i // Sony Xperia Z 1 - ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [ - - /(SM-G900[F|H])/i // Samsung Galaxy S5 - ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ - /(SM-G7102)/i // Samsung Galaxy Grand 2 - ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ - /(SM-G530H)/i // Samsung Galaxy Grand Prime - ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ - /(SM-G313HZ)/i // Samsung Galaxy V - ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ - /(SM-T805)/i // Samsung Galaxy Tab S 10.5 - ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [ - /(SM-G800F)/i // Samsung Galaxy S5 Mini - ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ - /(SM-T311)/i // Samsung Galaxy Tab 3 8.0 - ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [ - - /(T3C)/i // Advan Vandroid T3C - ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [ - /(ADVAN T1J\+)/i // Advan Vandroid T1J+ - ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [ - /(ADVAN S4A)/i // Advan Vandroid S4A - ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [ - - /(V972M)/i // ZTE V972M - ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [ - - /(i-mobile)\s(IQ\s[\d\.]+)/i // i-mobile IQ - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - /(IQ6.3)/i // i-mobile IQ IQ 6.3 - ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [ - /(i-mobile)\s(i-style\s[\d\.]+)/i // i-mobile i-STYLE - ], [VENDOR, MODEL, [TYPE, MOBILE]], [ - /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1 - ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [ - - /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512 - ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [ - - ///////////// - // END TODO - ///////////*/ - - ], - - engine : [[ - - /windows.+\sedge\/([\w\.]+)/i // EdgeHTML - ], [VERSION, [NAME, 'EdgeHTML']], [ - - /(presto)\/([\w\.]+)/i, // Presto - /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m - /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links - /(icab)[\/\s]([23]\.[\d\.]+)/i // iCab - ], [NAME, VERSION], [ - - /rv\:([\w\.]{1,9}).+(gecko)/i // Gecko - ], [VERSION, NAME] - ], - - os : [[ - - // Windows based - /microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes) - ], [NAME, VERSION], [ - /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT - /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i, // Windows Phone - /(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i - ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ - /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i - ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ - - // Mobile/Embedded OS - /\((bb)(10);/i // BlackBerry 10 - ], [[NAME, 'BlackBerry'], VERSION], [ - /(blackberry)\w*\/?([\w\.]*)/i, // Blackberry - /(tizen)[\/\s]([\w\.]+)/i, // Tizen - /(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i, - // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki - /linux;.+(sailfish);/i // Sailfish OS - ], [NAME, VERSION], [ - /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i // Symbian - ], [[NAME, 'Symbian'], VERSION], [ - /\((series40);/i // Series 40 - ], [NAME], [ - /mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS - ], [[NAME, 'Firefox OS'], VERSION], [ - - // Console - /(nintendo|playstation)\s([wids34portablevu]+)/i, // Nintendo/Playstation - - // GNU/Linux based - /(mint)[\/\s\(]?(\w*)/i, // Mint - /(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux - /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i, - // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware - // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus - /(hurd|linux)\s?([\w\.]*)/i, // Hurd/Linux - /(gnu)\s?([\w\.]*)/i // GNU - ], [NAME, VERSION], [ - - /(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS - ], [[NAME, 'Chromium OS'], VERSION],[ - - // Solaris - /(sunos)\s?([\w\.\d]*)/i // Solaris - ], [[NAME, 'Solaris'], VERSION], [ - - // BSD based - /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly - ], [NAME, VERSION],[ - - /(haiku)\s(\w+)/i // Haiku - ], [NAME, VERSION],[ - - /cfnetwork\/.+darwin/i, - /ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i // iOS - ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ - - /(mac\sos\sx)\s?([\w\s\.]*)/i, - /(macintosh|mac(?=_powerpc)\s)/i // Mac OS - ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ - - // Other - /((?:open)?solaris)[\/\s-]?([\w\.]*)/i, // Solaris - /(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i, // AIX - /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i, - // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS - /(unix)\s?([\w\.]*)/i // UNIX - ], [NAME, VERSION] - ] - }; - - - ///////////////// - // Constructor - //////////////// - /* - var Browser = function (name, version) { - this[NAME] = name; - this[VERSION] = version; - }; - var CPU = function (arch) { - this[ARCHITECTURE] = arch; - }; - var Device = function (vendor, model, type) { - this[VENDOR] = vendor; - this[MODEL] = model; - this[TYPE] = type; - }; - var Engine = Browser; - var OS = Browser; - */ - var UAParser = function (uastring, extensions) { - - if (typeof uastring === 'object') { - extensions = uastring; - uastring = undefined; - } - - if (!(this instanceof UAParser)) { - return new UAParser(uastring, extensions).getResult(); - } - - var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); - var rgxmap = extensions ? util.extend(regexes, extensions) : regexes; - //var browser = new Browser(); - //var cpu = new CPU(); - //var device = new Device(); - //var engine = new Engine(); - //var os = new OS(); - - this.getBrowser = function () { - var browser = { name: undefined, version: undefined }; - mapper.rgx.call(browser, ua, rgxmap.browser); - browser.major = util.major(browser.version); // deprecated - return browser; - }; - this.getCPU = function () { - var cpu = { architecture: undefined }; - mapper.rgx.call(cpu, ua, rgxmap.cpu); - return cpu; - }; - this.getDevice = function () { - var device = { vendor: undefined, model: undefined, type: undefined }; - mapper.rgx.call(device, ua, rgxmap.device); - return device; - }; - this.getEngine = function () { - var engine = { name: undefined, version: undefined }; - mapper.rgx.call(engine, ua, rgxmap.engine); - return engine; - }; - this.getOS = function () { - var os = { name: undefined, version: undefined }; - mapper.rgx.call(os, ua, rgxmap.os); - return os; - }; - this.getResult = function () { - return { - ua : this.getUA(), - browser : this.getBrowser(), - engine : this.getEngine(), - os : this.getOS(), - device : this.getDevice(), - cpu : this.getCPU() - }; - }; - this.getUA = function () { - return ua; - }; - this.setUA = function (uastring) { - ua = uastring; - //browser = new Browser(); - //cpu = new CPU(); - //device = new Device(); - //engine = new Engine(); - //os = new OS(); - return this; - }; - return this; - }; - - UAParser.VERSION = LIBVERSION; - UAParser.BROWSER = { - NAME : NAME, - MAJOR : MAJOR, // deprecated - VERSION : VERSION - }; - UAParser.CPU = { - ARCHITECTURE : ARCHITECTURE - }; - UAParser.DEVICE = { - MODEL : MODEL, - VENDOR : VENDOR, - TYPE : TYPE, - CONSOLE : CONSOLE, - MOBILE : MOBILE, - SMARTTV : SMARTTV, - TABLET : TABLET, - WEARABLE: WEARABLE, - EMBEDDED: EMBEDDED - }; - UAParser.ENGINE = { - NAME : NAME, - VERSION : VERSION - }; - UAParser.OS = { - NAME : NAME, - VERSION : VERSION - }; - //UAParser.Utils = util; - - /////////// - // Export - ////////// - - - // check js environment - if (typeof(exports) !== UNDEF_TYPE) { - // nodejs env - if (typeof module !== UNDEF_TYPE && module.exports) { - exports = module.exports = UAParser; - } - // TODO: test!!!!!!!! - /* - if (require && require.main === module && process) { - // cli - var jsonize = function (arr) { - var res = []; - for (var i in arr) { - res.push(new UAParser(arr[i]).getResult()); - } - process.stdout.write(JSON.stringify(res, null, 2) + '\n'); - }; - if (process.stdin.isTTY) { - // via args - jsonize(process.argv.slice(2)); - } else { - // via pipe - var str = ''; - process.stdin.on('readable', function() { - var read = process.stdin.read(); - if (read !== null) { - str += read; - } - }); - process.stdin.on('end', function () { - jsonize(str.replace(/\n$/, '').split('\n')); - }); - } - } - */ - exports.UAParser = UAParser; - } else { - // requirejs env (optional) - if ("function" === FUNC_TYPE && __webpack_require__("./node_modules/webpack/buildin/amd-options.js")) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return UAParser; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (window) { - // browser env - window.UAParser = UAParser; - } - } - - // jQuery/Zepto specific (optional) - // Note: - // In AMD env the global scope should be kept clean, but jQuery is an exception. - // jQuery always exports to global scope, unless jQuery.noConflict(true) is used, - // and we should catch that. - var $ = window && (window.jQuery || window.Zepto); - if (typeof $ !== UNDEF_TYPE) { - var parser = new UAParser(); - $.ua = parser.getResult(); - $.ua.get = function () { - return parser.getUA(); - }; - $.ua.set = function (uastring) { - parser.setUA(uastring); - var result = parser.getResult(); - for (var prop in result) { - $.ua[prop] = result[prop]; - } - }; - } - -})(typeof window === 'object' ? window : this); - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/uuid/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var v1 = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/v1.js"); -var v4 = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/v4.js"); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js": -/***/ (function(module, exports) { - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -module.exports = bytesToUuid; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js": -/***/ (function(module, exports) { - -// Unique ID creation requires a high quality random # generator. In the -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection - -// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. -var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) || - (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto)); -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - module.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - module.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; -} - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/uuid/v1.js": -/***/ (function(module, exports, __webpack_require__) { - -var rng = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js"); -var bytesToUuid = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js"); - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; -var _clockseq; - -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; - } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); -} - -module.exports = v1; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/uuid/v4.js": -/***/ (function(module, exports, __webpack_require__) { - -var rng = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js"); -var bytesToUuid = __webpack_require__("../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js"); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js": -/***/ (function(module, exports) { - -/* -WildEmitter.js is a slim little event emitter by @henrikjoreteg largely based -on @visionmedia's Emitter from UI Kit. - -Why? I wanted it standalone. - -I also wanted support for wildcard emitters like this: - -emitter.on('*', function (eventName, other, event, payloads) { - -}); - -emitter.on('somenamespace*', function (eventName, payloads) { - -}); - -Please note that callbacks triggered by wildcard registered events also get -the event name as the first argument. -*/ - -module.exports = WildEmitter; - -function WildEmitter() { } - -WildEmitter.mixin = function (constructor) { - var prototype = constructor.prototype || constructor; - - prototype.isWildEmitter= true; - - // Listen on the given `event` with `fn`. Store a group name if present. - prototype.on = function (event, groupName, fn) { - this.callbacks = this.callbacks || {}; - var hasGroup = (arguments.length === 3), - group = hasGroup ? arguments[1] : undefined, - func = hasGroup ? arguments[2] : arguments[1]; - func._groupName = group; - (this.callbacks[event] = this.callbacks[event] || []).push(func); - return this; - }; - - // Adds an `event` listener that will be invoked a single - // time then automatically removed. - prototype.once = function (event, groupName, fn) { - var self = this, - hasGroup = (arguments.length === 3), - group = hasGroup ? arguments[1] : undefined, - func = hasGroup ? arguments[2] : arguments[1]; - function on() { - self.off(event, on); - func.apply(this, arguments); - } - this.on(event, group, on); - return this; - }; - - // Unbinds an entire group - prototype.releaseGroup = function (groupName) { - this.callbacks = this.callbacks || {}; - var item, i, len, handlers; - for (item in this.callbacks) { - handlers = this.callbacks[item]; - for (i = 0, len = handlers.length; i < len; i++) { - if (handlers[i]._groupName === groupName) { - //console.log('removing'); - // remove it and shorten the array we're looping through - handlers.splice(i, 1); - i--; - len--; - } - } - } - return this; - }; - - // Remove the given callback for `event` or all - // registered callbacks. - prototype.off = function (event, fn) { - this.callbacks = this.callbacks || {}; - var callbacks = this.callbacks[event], - i; - - if (!callbacks) return this; - - // remove all handlers - if (arguments.length === 1) { - delete this.callbacks[event]; - return this; - } - - // remove specific handler - i = callbacks.indexOf(fn); - callbacks.splice(i, 1); - if (callbacks.length === 0) { - delete this.callbacks[event]; - } - return this; - }; - - /// Emit `event` with the given args. - // also calls any `*` handlers - prototype.emit = function (event) { - this.callbacks = this.callbacks || {}; - var args = [].slice.call(arguments, 1), - callbacks = this.callbacks[event], - specialCallbacks = this.getWildcardCallbacks(event), - i, - len, - item, - listeners; - - if (callbacks) { - listeners = callbacks.slice(); - for (i = 0, len = listeners.length; i < len; ++i) { - if (!listeners[i]) { - break; - } - listeners[i].apply(this, args); - } - } - - if (specialCallbacks) { - len = specialCallbacks.length; - listeners = specialCallbacks.slice(); - for (i = 0, len = listeners.length; i < len; ++i) { - if (!listeners[i]) { - break; - } - listeners[i].apply(this, [event].concat(args)); - } - } - - return this; - }; - - // Helper for for finding special wildcard event handlers that match the event - prototype.getWildcardCallbacks = function (eventName) { - this.callbacks = this.callbacks || {}; - var item, - split, - result = []; - - for (item in this.callbacks) { - split = item.split('*'); - if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { - result = result.concat(this.callbacks[item]); - } - } - return result; - }; - -}; - -WildEmitter.mixin(WildEmitter); - - -/***/ }), - -/***/ "../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js": -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/*! - * EventEmitter v5.2.4 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ - -;(function (exports) { - 'use strict'; - - /** - * Class for managing events. - * Can be extended to provide event functionality in other classes. - * - * @class EventEmitter Manages event registering and emitting. - */ - function EventEmitter() {} - - // Shortcuts to improve speed and size - var proto = EventEmitter.prototype; - var originalGlobalValue = exports.EventEmitter; - - /** - * Finds the index of the listener for the event in its storage array. - * - * @param {Function[]} listeners Array of listeners to search through. - * @param {Function} listener Method to look for. - * @return {Number} Index of the specified listener, -1 if not found - * @api private - */ - function indexOfListener(listeners, listener) { - var i = listeners.length; - while (i--) { - if (listeners[i].listener === listener) { - return i; - } - } - - return -1; - } - - /** - * Alias a method while keeping the context correct, to allow for overwriting of target method. - * - * @param {String} name The name of the target method. - * @return {Function} The aliased method - * @api private - */ - function alias(name) { - return function aliasClosure() { - return this[name].apply(this, arguments); - }; - } - - /** - * Returns the listener array for the specified event. - * Will initialise the event object and listener arrays if required. - * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them. - * Each property in the object response is an array of listener functions. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Function[]|Object} All listener functions for the event. - */ - proto.getListeners = function getListeners(evt) { - var events = this._getEvents(); - var response; - var key; - - // Return a concatenated array of all matching events if - // the selector is a regular expression. - if (evt instanceof RegExp) { - response = {}; - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - response[key] = events[key]; - } - } - } - else { - response = events[evt] || (events[evt] = []); - } - - return response; - }; - - /** - * Takes a list of listener objects and flattens it into a list of listener functions. - * - * @param {Object[]} listeners Raw listener objects. - * @return {Function[]} Just the listener functions. - */ - proto.flattenListeners = function flattenListeners(listeners) { - var flatListeners = []; - var i; - - for (i = 0; i < listeners.length; i += 1) { - flatListeners.push(listeners[i].listener); - } - - return flatListeners; - }; - - /** - * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Object} All listener functions for an event in an object. - */ - proto.getListenersAsObject = function getListenersAsObject(evt) { - var listeners = this.getListeners(evt); - var response; - - if (listeners instanceof Array) { - response = {}; - response[evt] = listeners; - } - - return response || listeners; - }; - - function isValidListener (listener) { - if (typeof listener === 'function' || listener instanceof RegExp) { - return true - } else if (listener && typeof listener === 'object') { - return isValidListener(listener.listener) - } else { - return false - } - } - - /** - * Adds a listener function to the specified event. - * The listener will not be added if it is a duplicate. - * If the listener returns true then it will be removed after it is called. - * If you pass a regular expression as the event name then the listener will be added to all events that match it. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListener = function addListener(evt, listener) { - if (!isValidListener(listener)) { - throw new TypeError('listener must be a function'); - } - - var listeners = this.getListenersAsObject(evt); - var listenerIsWrapped = typeof listener === 'object'; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) { - listeners[key].push(listenerIsWrapped ? listener : { - listener: listener, - once: false - }); - } - } - - return this; - }; - - /** - * Alias of addListener - */ - proto.on = alias('addListener'); - - /** - * Semi-alias of addListener. It will add a listener that will be - * automatically removed after its first execution. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addOnceListener = function addOnceListener(evt, listener) { - return this.addListener(evt, { - listener: listener, - once: true - }); - }; - - /** - * Alias of addOnceListener. - */ - proto.once = alias('addOnceListener'); - - /** - * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad. - * You need to tell it what event names should be matched by a regex. - * - * @param {String} evt Name of the event to create. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvent = function defineEvent(evt) { - this.getListeners(evt); - return this; - }; - - /** - * Uses defineEvent to define multiple events. - * - * @param {String[]} evts An array of event names to define. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvents = function defineEvents(evts) { - for (var i = 0; i < evts.length; i += 1) { - this.defineEvent(evts[i]); - } - return this; - }; - - /** - * Removes a listener function from the specified event. - * When passed a regular expression as the event name, it will remove the listener from all events that match it. - * - * @param {String|RegExp} evt Name of the event to remove the listener from. - * @param {Function} listener Method to remove from the event. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListener = function removeListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var index; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - index = indexOfListener(listeners[key], listener); - - if (index !== -1) { - listeners[key].splice(index, 1); - } - } - } - - return this; - }; - - /** - * Alias of removeListener - */ - proto.off = alias('removeListener'); - - /** - * Adds listeners in bulk using the manipulateListeners method. - * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added. - * You can also pass it a regular expression to add the array of listeners to all events that match it. - * Yeah, this function does quite a bit. That's probably a bad thing. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListeners = function addListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(false, evt, listeners); - }; - - /** - * Removes listeners in bulk using the manipulateListeners method. - * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be removed. - * You can also pass it a regular expression to remove the listeners from all events that match it. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListeners = function removeListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(true, evt, listeners); - }; - - /** - * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level. - * The first argument will determine if the listeners are removed (true) or added (false). - * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be added/removed. - * You can also pass it a regular expression to manipulate the listeners of all events that match it. - * - * @param {Boolean} remove True if you want to remove listeners, false if you want to add. - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add/remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) { - var i; - var value; - var single = remove ? this.removeListener : this.addListener; - var multiple = remove ? this.removeListeners : this.addListeners; - - // If evt is an object then pass each of its properties to this method - if (typeof evt === 'object' && !(evt instanceof RegExp)) { - for (i in evt) { - if (evt.hasOwnProperty(i) && (value = evt[i])) { - // Pass the single listener straight through to the singular method - if (typeof value === 'function') { - single.call(this, i, value); - } - else { - // Otherwise pass back to the multiple function - multiple.call(this, i, value); - } - } - } - } - else { - // So evt must be a string - // And listeners must be an array of listeners - // Loop over it and pass each one to the multiple method - i = listeners.length; - while (i--) { - single.call(this, evt, listeners[i]); - } - } - - return this; - }; - - /** - * Removes all listeners from a specified event. - * If you do not specify an event then all listeners will be removed. - * That means every event will be emptied. - * You can also pass a regex to remove all events that match it. - * - * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeEvent = function removeEvent(evt) { - var type = typeof evt; - var events = this._getEvents(); - var key; - - // Remove different things depending on the state of evt - if (type === 'string') { - // Remove all listeners for the specified event - delete events[evt]; - } - else if (evt instanceof RegExp) { - // Remove all events matching the regex. - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - delete events[key]; - } - } - } - else { - // Remove all listeners in all events - delete this._events; - } - - return this; - }; - - /** - * Alias of removeEvent. - * - * Added to mirror the node API. - */ - proto.removeAllListeners = alias('removeEvent'); - - /** - * Emits an event of your choice. - * When emitted, every listener attached to that event will be executed. - * If you pass the optional argument array then those arguments will be passed to every listener upon execution. - * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately. - * So they will not arrive within the array on the other side, they will be separate. - * You can also pass a regular expression to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {Array} [args] Optional array of arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emitEvent = function emitEvent(evt, args) { - var listenersMap = this.getListenersAsObject(evt); - var listeners; - var listener; - var i; - var key; - var response; - - for (key in listenersMap) { - if (listenersMap.hasOwnProperty(key)) { - listeners = listenersMap[key].slice(0); - - for (i = 0; i < listeners.length; i++) { - // If the listener returns true then it shall be removed from the event - // The function is executed either with a basic call or an apply if there is an args array - listener = listeners[i]; - - if (listener.once === true) { - this.removeListener(evt, listener.listener); - } - - response = listener.listener.apply(this, args || []); - - if (response === this._getOnceReturnValue()) { - this.removeListener(evt, listener.listener); - } - } - } - } - - return this; - }; - - /** - * Alias of emitEvent - */ - proto.trigger = alias('emitEvent'); - - /** - * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on. - * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {...*} Optional additional arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emit = function emit(evt) { - var args = Array.prototype.slice.call(arguments, 1); - return this.emitEvent(evt, args); - }; - - /** - * Sets the current value to check against when executing listeners. If a - * listeners return value matches the one set here then it will be removed - * after execution. This value defaults to true. - * - * @param {*} value The new value to check for when executing listeners. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.setOnceReturnValue = function setOnceReturnValue(value) { - this._onceReturnValue = value; - return this; - }; - - /** - * Fetches the current value to check against when executing listeners. If - * the listeners return value matches this one then it should be removed - * automatically. It will return true by default. - * - * @return {*|Boolean} The current value to check for or the default, true. - * @api private - */ - proto._getOnceReturnValue = function _getOnceReturnValue() { - if (this.hasOwnProperty('_onceReturnValue')) { - return this._onceReturnValue; - } - else { - return true; - } - }; - - /** - * Fetches the events object and creates one if required. - * - * @return {Object} The events storage object. - * @api private - */ - proto._getEvents = function _getEvents() { - return this._events || (this._events = {}); - }; - - /** - * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version. - * - * @return {Function} Non conflicting EventEmitter class. - */ - EventEmitter.noConflict = function noConflict() { - exports.EventEmitter = originalGlobalValue; - return EventEmitter; - }; - - // Expose the class either via AMD, CommonJS or the global object - if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return EventEmitter; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - else if (typeof module === 'object' && module.exports){ - module.exports = EventEmitter; - } - else { - exports.EventEmitter = EventEmitter; - } -}(this || {})); - - -/***/ }), - -/***/ "./src/$$_lazy_route_resource lazy recursive": -/***/ (function(module, exports) { - -function webpackEmptyAsyncContext(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncatched exception popping up in devtools - return Promise.resolve().then(function() { - throw new Error("Cannot find module '" + req + "'."); - }); -} -webpackEmptyAsyncContext.keys = function() { return []; }; -webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; -module.exports = webpackEmptyAsyncContext; -webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive"; - -/***/ }), - -/***/ "./src/app/app.component.css": -/***/ (function(module, exports) { - -module.exports = "" - -/***/ }), - -/***/ "./src/app/app.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n \n
" - -/***/ }), - -/***/ "./src/app/app.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - -var AppComponent = (function () { - function AppComponent() { - } - AppComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-root', - template: __webpack_require__("./src/app/app.component.html"), - styles: [__webpack_require__("./src/app/app.component.css")] - }) - ], AppComponent); - return AppComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/app.material.module.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppMaterialModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_animations__ = __webpack_require__("./node_modules/@angular/platform-browser/esm5/animations.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_material__ = __webpack_require__("./node_modules/@angular/material/esm5/material.es5.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - -var AppMaterialModule = (function () { - function AppMaterialModule() { - } - AppMaterialModule = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["K" /* NgModule */])({ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_animations__["a" /* BrowserAnimationsModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["a" /* MatButtonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["f" /* MatIconModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["c" /* MatCheckboxModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["b" /* MatCardModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["g" /* MatInputModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["i" /* MatProgressSpinnerModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["k" /* MatTooltipModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["e" /* MatDialogModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["j" /* MatSlideToggleModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["h" /* MatListModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_animations__["a" /* BrowserAnimationsModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["a" /* MatButtonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["f" /* MatIconModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["c" /* MatCheckboxModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["b" /* MatCardModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["g" /* MatInputModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["i" /* MatProgressSpinnerModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["k" /* MatTooltipModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["e" /* MatDialogModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["j" /* MatSlideToggleModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_material__["h" /* MatListModule */] - ], - }) - ], AppMaterialModule); - return AppMaterialModule; -}()); - - - -/***/ }), - -/***/ "./src/app/app.module.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__("./node_modules/@angular/platform-browser/esm5/platform-browser.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_flex_layout__ = __webpack_require__("./node_modules/@angular/flex-layout/esm5/flex-layout.es5.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_forms__ = __webpack_require__("./node_modules/@angular/forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_http__ = __webpack_require__("./node_modules/@angular/http/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hammerjs__ = __webpack_require__("./node_modules/hammerjs/hammer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hammerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_hammerjs__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_routing__ = __webpack_require__("./src/app/app.routing.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_app_material_module__ = __webpack_require__("./src/app/app.material.module.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__services_info_service__ = __webpack_require__("./src/app/services/info.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__services_rest_service__ = __webpack_require__("./src/app/services/rest.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__app_component__ = __webpack_require__("./src/app/app.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__components_dashboard_dashboard_component__ = __webpack_require__("./src/app/components/dashboard/dashboard.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_session_details_session_details_component__ = __webpack_require__("./src/app/components/session-details/session-details.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_dashboard_credentials_dialog_component__ = __webpack_require__("./src/app/components/dashboard/credentials-dialog.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__components_layouts_layout_best_fit_layout_best_fit_component__ = __webpack_require__("./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__components_layouts_ov_video_component__ = __webpack_require__("./src/app/components/layouts/ov-video.component.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - - - - - - - - - - - - -var AppModule = (function () { - function AppModule() { - } - AppModule = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_2__angular_core__["K" /* NgModule */])({ - declarations: [ - __WEBPACK_IMPORTED_MODULE_10__app_component__["a" /* AppComponent */], - __WEBPACK_IMPORTED_MODULE_11__components_dashboard_dashboard_component__["a" /* DashboardComponent */], - __WEBPACK_IMPORTED_MODULE_12__components_session_details_session_details_component__["a" /* SessionDetailsComponent */], - __WEBPACK_IMPORTED_MODULE_13__components_dashboard_credentials_dialog_component__["a" /* CredentialsDialogComponent */], - __WEBPACK_IMPORTED_MODULE_14__components_layouts_layout_best_fit_layout_best_fit_component__["a" /* LayoutBestFitComponent */], - __WEBPACK_IMPORTED_MODULE_15__components_layouts_ov_video_component__["a" /* OpenViduVideoComponent */], - ], - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */], - __WEBPACK_IMPORTED_MODULE_3__angular_forms__["c" /* FormsModule */], - __WEBPACK_IMPORTED_MODULE_4__angular_http__["a" /* HttpModule */], - __WEBPACK_IMPORTED_MODULE_6__app_routing__["a" /* routing */], - __WEBPACK_IMPORTED_MODULE_7_app_app_material_module__["a" /* AppMaterialModule */], - __WEBPACK_IMPORTED_MODULE_1__angular_flex_layout__["a" /* FlexLayoutModule */] - ], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_13__components_dashboard_credentials_dialog_component__["a" /* CredentialsDialogComponent */], - ], - providers: [__WEBPACK_IMPORTED_MODULE_8__services_info_service__["a" /* InfoService */], __WEBPACK_IMPORTED_MODULE_9__services_rest_service__["a" /* RestService */]], - bootstrap: [__WEBPACK_IMPORTED_MODULE_10__app_component__["a" /* AppComponent */]] - }) - ], AppModule); - return AppModule; -}()); - - - -/***/ }), - -/***/ "./src/app/app.routing.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return routing; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_router__ = __webpack_require__("./node_modules/@angular/router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_components_dashboard_dashboard_component__ = __webpack_require__("./src/app/components/dashboard/dashboard.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_session_details_session_details_component__ = __webpack_require__("./src/app/components/session-details/session-details.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_layouts_layout_best_fit_layout_best_fit_component__ = __webpack_require__("./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts"); - - - - -var appRoutes = [ - { - path: '', - component: __WEBPACK_IMPORTED_MODULE_1_app_components_dashboard_dashboard_component__["a" /* DashboardComponent */], - pathMatch: 'full' - }, - { - path: 'session/:sessionId', - component: __WEBPACK_IMPORTED_MODULE_2_app_components_session_details_session_details_component__["a" /* SessionDetailsComponent */], - pathMatch: 'full' - }, - { - path: 'layout-best-fit/:sessionId/:secret', - component: __WEBPACK_IMPORTED_MODULE_3_app_components_layouts_layout_best_fit_layout_best_fit_component__["a" /* LayoutBestFitComponent */], - pathMatch: 'full' - } -]; -var routing = __WEBPACK_IMPORTED_MODULE_0__angular_router__["b" /* RouterModule */].forRoot(appRoutes, { useHash: true }); - - -/***/ }), - -/***/ "./src/app/components/dashboard/credentials-dialog.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CredentialsDialogComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var CredentialsDialogComponent = (function () { - function CredentialsDialogComponent() { - } - CredentialsDialogComponent.prototype.testVideo = function () { - this.myReference.close(this.secret); - }; - CredentialsDialogComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-credentials-dialog', - template: "\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n ", - styles: ["\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n "], - }), - __metadata("design:paramtypes", []) - ], CredentialsDialogComponent); - return CredentialsDialogComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/components/dashboard/dashboard.component.css": -/***/ (function(module, exports) { - -module.exports = "#dashboard-div {\n padding: 20px;\n}\n\n#log {\n height: 90%;\n}\n\n#log-content {\n height: 90%;\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n overflow-y: auto;\n overflow-x: hidden\n}\n\nul {\n margin: 0;\n}\n\n#test-btn {\n text-transform: uppercase;\n float: right;\n}\n\nmat-card-title button.blue {\n color: #ffffff;\n background-color: #0088aa;\n}\n\nmat-card-title button.yellow {\n color: rgba(0, 0, 0, 0.87);\n background-color: #ffcc00;\n}\n\nmat-spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n#tick-div {\n width: 100px;\n height: 100px;\n z-index: 1;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n#tooltip-tick {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n}\n\n.circ {\n opacity: 0;\n stroke-dasharray: 130;\n stroke-dashoffset: 130;\n -webkit-transition: all 1s;\n transition: all 1s;\n}\n\n.tick {\n stroke-dasharray: 50;\n stroke-dashoffset: 50;\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\n transition: stroke-dashoffset 1s 0.5s ease-out;\n}\n\n.drawn+svg .path {\n opacity: 1;\n stroke-dashoffset: 0;\n}\n\n#mirrored-video {\n position: relative;\n}\n\n/* Pure CSS loader */\n\n#loader {\n width: 100px;\n height: 100px;\n z-index: 1;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n#loader * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n#loader ::after {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n#loader ::before {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.loader-1 {\n height: 100px;\n width: 100px;\n -webkit-animation: loader-1-1 4.8s linear infinite;\n animation: loader-1-1 4.8s linear infinite;\n}\n\n@-webkit-keyframes loader-1-1 {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n\n@keyframes loader-1-1 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.loader-1 span {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n margin: auto;\n height: 100px;\n width: 100px;\n clip: rect(0, 100px, 100px, 50px);\n -webkit-animation: loader-1-2 1.2s linear infinite;\n animation: loader-1-2 1.2s linear infinite;\n}\n\n@-webkit-keyframes loader-1-2 {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(220deg);\n }\n}\n\n@keyframes loader-1-2 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(220deg);\n transform: rotate(220deg);\n }\n}\n\n.loader-1 span::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n margin: auto;\n height: 100px;\n width: 100px;\n clip: rect(0, 100px, 100px, 50px);\n border: 8px solid #4d4d4d;\n border-radius: 50%;\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\n}\n\n@-webkit-keyframes loader-1-3 {\n 0% {\n -webkit-transform: rotate(-140deg);\n }\n 50% {\n -webkit-transform: rotate(-160deg);\n }\n 100% {\n -webkit-transform: rotate(140deg);\n }\n}\n\n@keyframes loader-1-3 {\n 0% {\n -webkit-transform: rotate(-140deg);\n transform: rotate(-140deg);\n }\n 50% {\n -webkit-transform: rotate(-160deg);\n transform: rotate(-160deg);\n }\n 100% {\n -webkit-transform: rotate(140deg);\n transform: rotate(140deg);\n }\n}" - -/***/ }), - -/***/ "./src/app/components/dashboard/dashboard.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n\n
\n \n Server events\n \n lock_outline\n \n \n \n \n
    \n
  • \n

    {{i}}

    \n
  • \n
\n
\n
\n
\n\n
\n \n Test the connection\n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n

{{msg}}

\n
\n
\n
\n
\n" - -/***/ }), - -/***/ "./src/app/components/dashboard/dashboard.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DashboardComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_material__ = __webpack_require__("./node_modules/@angular/material/esm5/material.es5.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_info_service__ = __webpack_require__("./src/app/services/info.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_rest_service__ = __webpack_require__("./src/app/services/rest.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_openvidu_browser__ = __webpack_require__("../../../../openvidu-browser/lib/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_openvidu_browser___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_openvidu_browser__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__credentials_dialog_component__ = __webpack_require__("./src/app/components/dashboard/credentials-dialog.component.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - - - - -var DashboardComponent = (function () { - function DashboardComponent(infoService, restService, dialog) { - var _this = this; - this.infoService = infoService; - this.restService = restService; - this.dialog = dialog; - this.lockScroll = false; - this.info = []; - this.testStatus = 'DISCONNECTED'; - this.testButton = 'Test'; - this.tickClass = 'trigger'; - this.showSpinner = false; - this.msgChain = []; - // Subscription to info updated event raised by InfoService - this.infoSubscription = this.infoService.newInfo$.subscribe(function (info) { - _this.info.push(info); - _this.scrollToBottom(); - }); - } - DashboardComponent.prototype.ngOnInit = function () { - var _this = this; - var protocol = location.protocol.includes('https') ? 'wss://' : 'ws://'; - var port = (location.port) ? (':' + location.port) : ''; - this.websocket = new WebSocket(protocol + location.hostname + port + '/info'); - this.websocket.onopen = function (event) { - console.log('Info websocket connected'); - }; - this.websocket.onclose = function (event) { - console.log('Info websocket closed'); - }; - this.websocket.onerror = function (event) { - console.log('Info websocket error'); - }; - this.websocket.onmessage = function (event) { - console.log('Info websocket message'); - console.log(event.data); - _this.infoService.updateInfo(event.data); - }; - this.restService.getOpenViduPublicUrl() - .then(function (url) { - _this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://'); - }) - .catch(function (error) { - console.error(error); - }); - }; - DashboardComponent.prototype.beforeunloadHandler = function () { - // On window closed leave test session and close info websocket - if (this.session) { - this.endTestVideo(); - } - this.websocket.close(); - }; - DashboardComponent.prototype.ngOnDestroy = function () { - // On component destroyed leave test session and close info websocket - if (this.session) { - this.endTestVideo(); - } - this.websocket.close(); - }; - DashboardComponent.prototype.toggleTestVideo = function () { - if (!this.session) { - this.testVideo(); - } - else { - this.endTestVideo(); - } - }; - DashboardComponent.prototype.testVideo = function () { - var _this = this; - var dialogRef; - dialogRef = this.dialog.open(__WEBPACK_IMPORTED_MODULE_5__credentials_dialog_component__["a" /* CredentialsDialogComponent */]); - dialogRef.componentInstance.myReference = dialogRef; - dialogRef.afterClosed().subscribe(function (secret) { - if (secret) { - if (!_this.openviduPublicUrl) { - _this.restService.getOpenViduPublicUrl() - .then((function (url) { - _this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://'); - _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); - })) - .catch(function (error) { - console.error(error); - }); - } - else { - _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); - } - } - }); - }; - DashboardComponent.prototype.connectToSession = function (token) { - var _this = this; - this.msgChain = []; - var OV = new __WEBPACK_IMPORTED_MODULE_4_openvidu_browser__["OpenVidu"](); - this.session = OV.initSession(); - this.testStatus = 'CONNECTING'; - this.testButton = 'Testing...'; - this.session.connect(token) - .then(function () { - _this.testStatus = 'CONNECTED'; - var publisherRemote = OV.initPublisher('mirrored-video', { - publishAudio: true, - publishVideo: true, - resolution: '640x480' - }, function (e) { - if (!!e) { - console.error(e); - } - }); - publisherRemote.on('accessAllowed', function () { - _this.msgChain.push('Camera access allowed'); - }); - publisherRemote.on('accessDenied', function () { - _this.endTestVideo(); - _this.msgChain.push('Camera access denied'); - }); - publisherRemote.on('videoElementCreated', function (video) { - _this.showSpinner = true; - _this.msgChain.push('Video element created'); - }); - publisherRemote.on('remoteVideoPlaying', function (video) { - _this.msgChain.push('Remote video playing'); - _this.testButton = 'End test'; - _this.testStatus = 'PLAYING'; - _this.showSpinner = false; - }); - publisherRemote.subscribeToRemote(); - _this.session.publish(publisherRemote); - }) - .catch(function (error) { - if (error.code === 401) { - _this.endTestVideo(); - var dialogRef = void 0; - dialogRef = _this.dialog.open(__WEBPACK_IMPORTED_MODULE_5__credentials_dialog_component__["a" /* CredentialsDialogComponent */]); - dialogRef.componentInstance.myReference = dialogRef; - dialogRef.afterClosed().subscribe(function (secret) { - if (secret) { - _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); - } - }); - } - else { - console.error(error); - } - }); - }; - DashboardComponent.prototype.endTestVideo = function () { - this.session.disconnect(); - this.session = null; - this.testStatus = 'DISCONNECTED'; - this.testButton = 'Test'; - this.showSpinner = false; - this.info = []; - this.msgChain = []; - }; - DashboardComponent.prototype.scrollToBottom = function () { - try { - if (!this.lockScroll) { - this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight; - } - } - catch (err) { - console.error('[Error]:' + err.toString()); - } - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewChild */])('scrollMe'), - __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */]) - ], DashboardComponent.prototype, "myScrollContainer", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* HostListener */])('window:beforeunload'), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", void 0) - ], DashboardComponent.prototype, "beforeunloadHandler", null); - DashboardComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-dashboard', - template: __webpack_require__("./src/app/components/dashboard/dashboard.component.html"), - styles: [__webpack_require__("./src/app/components/dashboard/dashboard.component.css")], - }), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__services_info_service__["a" /* InfoService */], __WEBPACK_IMPORTED_MODULE_3__services_rest_service__["a" /* RestService */], __WEBPACK_IMPORTED_MODULE_1__angular_material__["d" /* MatDialog */]]) - ], DashboardComponent); - return DashboardComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css": -/***/ (function(module, exports) { - -module.exports = ".bounds {\n background-color: black;\n overflow: hidden;\n cursor: none !important;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n\napp-ov-video video {\n -o-object-fit: cover;\n object-fit: cover;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n color: #ffffff;\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-family: Arial, Helvetica, sans-serif;\n}\n\n/*!\n * Copyright (c) 2017 TokBox, Inc.\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n */\n\n.custom-class {\n min-height: 0px !important;\n}\n\n/**\n * OT Base styles\n */\n\n/* Root OT object, this is where our CSS reset happens */\n\n.OT_root, .OT_root * {\n color: #ffffff;\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-family: Arial, Helvetica, sans-serif;\n vertical-align: baseline;\n}\n\n.OT_dialog-centering {\n display: table;\n width: 100%;\n height: 100%;\n}\n\n.OT_dialog-centering-child {\n display: table-cell;\n vertical-align: middle;\n}\n\n.OT_dialog {\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n max-width: 576px;\n margin-right: auto;\n margin-left: auto;\n padding: 36px;\n text-align: center;\n /* centers all the inline content */\n background-color: #363636;\n color: #fff;\n -webkit-box-shadow: 2px 4px 6px #999;\n box-shadow: 2px 4px 6px #999;\n font-family: 'Didact Gothic', sans-serif;\n font-size: 13px;\n line-height: 1.4;\n}\n\n.OT_dialog * {\n font-family: inherit;\n -webkit-box-sizing: inherit;\n box-sizing: inherit;\n}\n\n.OT_closeButton {\n color: #999999;\n cursor: pointer;\n font-size: 32px;\n line-height: 36px;\n position: absolute;\n right: 18px;\n top: 0;\n}\n\n.OT_dialog-messages {\n text-align: center;\n}\n\n.OT_dialog-messages-main {\n margin-bottom: 36px;\n line-height: 36px;\n font-weight: 300;\n font-size: 24px;\n}\n\n.OT_dialog-messages-minor {\n margin-bottom: 18px;\n font-size: 13px;\n line-height: 18px;\n color: #A4A4A4;\n}\n\n.OT_dialog-messages-minor strong {\n color: #ffffff;\n}\n\n.OT_dialog-actions-card {\n display: inline-block;\n}\n\n.OT_dialog-button-title {\n margin-bottom: 18px;\n line-height: 18px;\n font-weight: 300;\n text-align: center;\n font-size: 14px;\n color: #999999;\n}\n\n.OT_dialog-button-title label {\n color: #999999;\n}\n\n.OT_dialog-button-title a, .OT_dialog-button-title a:link, .OT_dialog-button-title a:active {\n color: #02A1DE;\n}\n\n.OT_dialog-button-title strong {\n color: #ffffff;\n font-weight: 100;\n display: block;\n}\n\n.OT_dialog-button {\n display: inline-block;\n margin-bottom: 18px;\n padding: 0 1em;\n background-color: #1CA3DC;\n text-align: center;\n cursor: pointer;\n}\n\n.OT_dialog-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.OT_dialog-button-large {\n line-height: 36px;\n padding-top: 9px;\n padding-bottom: 9px;\n font-weight: 100;\n font-size: 24px;\n}\n\n.OT_dialog-button-small {\n line-height: 18px;\n padding-top: 9px;\n padding-bottom: 9px;\n background-color: #444444;\n color: #999999;\n font-size: 16px;\n}\n\n.OT_dialog-progress-bar {\n display: inline-block;\n /* prevents margin collapse */\n width: 100%;\n margin-top: 5px;\n margin-bottom: 41px;\n border: 1px solid #4E4E4E;\n height: 8px;\n}\n\n.OT_dialog-progress-bar-fill {\n height: 100%;\n background-color: #29A4DA;\n}\n\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\n line-height: 54px;\n font-size: 48px;\n font-weight: 100;\n}\n\n/* Helpers */\n\n.OT_centered {\n position: fixed;\n left: 50%;\n top: 50%;\n margin: 0;\n}\n\n.OT_dialog-hidden {\n display: none;\n}\n\n.OT_dialog-button-block {\n display: block;\n}\n\n.OT_dialog-no-natural-margin {\n margin-bottom: 0;\n}\n\n/* Publisher and Subscriber styles */\n\n.OT_publisher, .OT_subscriber {\n position: relative;\n min-width: 48px;\n min-height: 48px;\n}\n\n.OT_publisher .OT_video-element, .OT_subscriber .OT_video-element {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n}\n\n/* Styles that are applied when the video element should be mirrored */\n\n.OT_publisher.OT_mirrored .OT_video-element {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n}\n\n.OT_subscriber_error {\n background-color: #000;\n color: #fff;\n text-align: center;\n}\n\n.OT_subscriber_error>p {\n padding: 20px;\n}\n\n/* The publisher/subscriber name/mute background */\n\n.OT_publisher .OT_bar, .OT_subscriber .OT_bar, .OT_publisher .OT_name, .OT_subscriber .OT_name, .OT_publisher .OT_archiving, .OT_subscriber .OT_archiving, .OT_publisher .OT_archiving-status, .OT_subscriber .OT_archiving-status, .OT_publisher .OT_archiving-light-box, .OT_subscriber .OT_archiving-light-box {\n -webkit-box-sizing: border-box;\n -ms-box-sizing: border-box;\n box-sizing: border-box;\n top: 0;\n left: 0;\n right: 0;\n display: block;\n height: 34px;\n position: absolute;\n}\n\n.OT_publisher .OT_bar, .OT_subscriber .OT_bar {\n background: rgba(0, 0, 0, 0.4);\n}\n\n.OT_publisher .OT_edge-bar-item, .OT_subscriber .OT_edge-bar-item {\n z-index: 1;\n /* required to get audio level meter underneath */\n}\n\n/* The publisher/subscriber name panel/archiving status bar */\n\n.OT_publisher .OT_name, .OT_subscriber .OT_name {\n background-color: transparent;\n color: #ffffff;\n font-size: 15px;\n line-height: 34px;\n font-weight: normal;\n padding: 0 4px 0 36px;\n}\n\n.OT_publisher .OT_archiving-status, .OT_subscriber .OT_archiving-status {\n background: rgba(0, 0, 0, 0.4);\n top: auto;\n bottom: 0;\n left: 34px;\n padding: 0 4px;\n color: rgba(255, 255, 255, 0.8);\n font-size: 15px;\n line-height: 34px;\n font-weight: normal;\n}\n\n.OT_micro .OT_archiving-status, .OT_micro:hover .OT_archiving-status, .OT_mini .OT_archiving-status, .OT_mini:hover .OT_archiving-status {\n display: none;\n}\n\n.OT_publisher .OT_archiving-light-box, .OT_subscriber .OT_archiving-light-box {\n background: rgba(0, 0, 0, 0.4);\n top: auto;\n bottom: 0;\n right: auto;\n width: 34px;\n height: 34px;\n}\n\n.OT_archiving-light {\n width: 7px;\n height: 7px;\n border-radius: 30px;\n position: absolute;\n top: 14px;\n left: 14px;\n background-color: #575757;\n -webkit-box-shadow: 0 0 5px 1px #575757;\n box-shadow: 0 0 5px 1px #575757;\n}\n\n.OT_archiving-light.OT_active {\n background-color: #970d13;\n animation: OT_pulse 1.3s ease-in;\n -webkit-animation: OT_pulse 1.3s ease-in;\n -moz-animation: OT_pulse 1.3s ease-in;\n -webkit-animation: OT_pulse 1.3s ease-in;\n animation-iteration-count: infinite;\n -webkit-animation-iteration-count: infinite;\n -moz-animation-iteration-count: infinite;\n -webkit-animation-iteration-count: infinite;\n}\n\n@-webkit-keyframes OT_pulse {\n 0% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n 30% {\n -webkit-box-shadow: 0 0 5px 1px #c70019;\n box-shadow: 0 0 5px 1px #c70019;\n }\n 50% {\n -webkit-box-shadow: 0 0 5px 1px #c70019;\n box-shadow: 0 0 5px 1px #c70019;\n }\n 80% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n 100% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n}\n\n@-webkit-keyframes OT_pulse {\n 0% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n 30% {\n -webkit-box-shadow: 0 0 5px 1px #c70019;\n box-shadow: 0 0 5px 1px #c70019;\n }\n 50% {\n -webkit-box-shadow: 0 0 5px 1px #c70019;\n box-shadow: 0 0 5px 1px #c70019;\n }\n 80% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n 100% {\n -webkit-box-shadow: 0 0 0px 0px #c70019;\n box-shadow: 0 0 0px 0px #c70019;\n }\n}\n\n.OT_mini .OT_bar, .OT_bar.OT_mode-mini, .OT_bar.OT_mode-mini-auto {\n bottom: 0;\n height: auto;\n}\n\n.OT_mini .OT_name.OT_mode-off, .OT_mini .OT_name.OT_mode-on, .OT_mini .OT_name.OT_mode-auto, .OT_mini:hover .OT_name.OT_mode-auto {\n display: none;\n}\n\n.OT_publisher .OT_name, .OT_subscriber .OT_name {\n left: 10px;\n right: 37px;\n height: 34px;\n padding-left: 0;\n}\n\n.OT_publisher .OT_mute, .OT_subscriber .OT_mute {\n border: none;\n cursor: pointer;\n display: block;\n position: absolute;\n text-align: center;\n text-indent: -9999em;\n background-color: transparent;\n background-repeat: no-repeat;\n}\n\n.OT_publisher .OT_mute, .OT_subscriber .OT_mute {\n right: 0;\n top: 0;\n border-left: 1px solid rgba(255, 255, 255, 0.2);\n height: 36px;\n width: 37px;\n}\n\n.OT_mini .OT_mute, .OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold, .OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\n top: 50%;\n left: 50%;\n right: auto;\n margin-top: -18px;\n margin-left: -18.5px;\n border-left: none;\n}\n\n.OT_publisher .OT_mute {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII=);\n background-position: 9px 5px;\n}\n\n.OT_publisher .OT_mute.OT_active {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);\n background-position: 9px 4px;\n}\n\n.OT_subscriber .OT_mute {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\n background-position: 8px 7px;\n}\n\n.OT_subscriber .OT_mute.OT_active {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\n background-position: 7px 7px;\n}\n\n/**\n * Styles for display modes\n *\n * Note: It's important that these completely control the display and opacity\n * attributes, no other selectors should atempt to change them.\n */\n\n/* Default display mode transitions for various chrome elements */\n\n.OT_publisher .OT_edge-bar-item, .OT_subscriber .OT_edge-bar-item {\n -webkit-transition-property: top, bottom, opacity;\n transition-property: top, bottom, opacity;\n -webkit-transition-duration: 0.5s;\n transition-duration: 0.5s;\n -webkit-transition-timing-function: ease-in;\n transition-timing-function: ease-in;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_mode-off, .OT_publisher .OT_edge-bar-item.OT_mode-auto, .OT_subscriber .OT_edge-bar-item.OT_mode-auto, .OT_publisher .OT_edge-bar-item.OT_mode-mini-auto, .OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\n top: -25px;\n opacity: 0;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_mode-off {\n display: none;\n}\n\n.OT_mini .OT_mute.OT_mode-auto, .OT_publisher .OT_mute.OT_mode-mini-auto, .OT_subscriber .OT_mute.OT_mode-mini-auto {\n top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off, .OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\n top: auto;\n bottom: -25px;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-on, .OT_subscriber .OT_edge-bar-item.OT_mode-on, .OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold, .OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold, .OT_publisher:hover .OT_edge-bar-item.OT_mode-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto, .OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\n top: 0;\n opacity: 1;\n}\n\n.OT_mini .OT_mute.OT_mode-on, .OT_mini:hover .OT_mute.OT_mode-auto, .OT_mute.OT_mode-mini, .OT_root:hover .OT_mute.OT_mode-mini-auto {\n top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on, .OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\n top: auto;\n bottom: 0;\n opacity: 1;\n}\n\n/* Contains the video element, used to fix video letter-boxing */\n\n.OT_widget-container {\n width: 100%;\n height: 100%;\n position: absolute;\n background-color: #000000;\n overflow: hidden;\n}\n\n/* Load animation */\n\n.OT_root .OT_video-loading {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n display: none;\n background-color: rgba(0, 0, 0, .75);\n}\n\n.OT_root .OT_video-loading .OT_video-loading-spinner {\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzMiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZSIgeDI9IjEiIHkxPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjMzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii42NiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJmIiB4Mj0iMSIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuNjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwIDEgMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\n position: absolute;\n width: 32px;\n height: 32px;\n left: 50%;\n top: 50%;\n margin-left: -16px;\n margin-top: -16px;\n -webkit-animation: OT_spin 2s linear infinite;\n animation: OT_spin 2s linear infinite;\n}\n\n@-webkit-keyframes OT_spin {\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n\n@keyframes OT_spin {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.OT_publisher.OT_loading .OT_video-loading, .OT_subscriber.OT_loading .OT_video-loading {\n display: block;\n}\n\n.OT_video-centering {\n display: table;\n width: 100%;\n height: 100%;\n}\n\n.OT_video-container {\n display: table-cell;\n vertical-align: middle;\n}\n\n.OT_video-poster {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n display: none;\n opacity: .25;\n background-repeat: no-repeat;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\n background-size: auto 76%;\n}\n\n.OT_fit-mode-cover .OT_video-element {\n -o-object-fit: cover;\n object-fit: cover;\n}\n\n/* Workaround for iOS freezing issue when cropping videos */\n\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\n\n@media only screen and (orientation: portrait) {\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\n -o-object-fit: contain !important;\n object-fit: contain !important;\n }\n}\n\n.OT_fit-mode-contain .OT_video-element {\n -o-object-fit: contain;\n object-fit: contain;\n}\n\n.OT_fit-mode-cover .OT_video-poster {\n background-position: center bottom;\n}\n\n.OT_fit-mode-contain .OT_video-poster {\n background-position: center;\n}\n\n.OT_audio-level-meter {\n position: absolute;\n width: 25%;\n max-width: 224px;\n min-width: 21px;\n top: 0;\n right: 0;\n overflow: hidden;\n}\n\n.OT_audio-level-meter:before {\n /* makes the height of the container equals its width */\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.OT_audio-level-meter__bar {\n position: absolute;\n width: 192%;\n /* meter value can overflow of 8% */\n height: 192%;\n top: -96%/* half of the size */\n ;\n right: -96%;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, .8);\n}\n\n.OT_audio-level-meter__audio-only-img {\n position: absolute;\n top: 22%;\n right: 15%;\n width: 40%;\n opacity: .7;\n background: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\n}\n\n.OT_audio-level-meter__audio-only-img:before {\n /* makes the height of the container equals its width */\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.OT_audio-level-meter__value {\n position: absolute;\n border-radius: 50%;\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\n}\n\n.OT_audio-level-meter.OT_mode-off {\n display: none;\n}\n\n.OT_audio-level-meter.OT_mode-on, .OT_audio-only .OT_audio-level-meter.OT_mode-auto {\n display: block;\n}\n\n.OT_audio-only.OT_publisher .OT_video-element, .OT_audio-only.OT_subscriber .OT_video-element {\n display: none;\n}\n\n.OT_video-disabled-indicator {\n opacity: 1;\n border: none;\n display: none;\n position: absolute;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: bottom right;\n pointer-events: none;\n top: 0;\n left: 0;\n bottom: 3px;\n right: 3px;\n}\n\n.OT_video-disabled {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ciAZvbQjQ+RDahpBBKd5ZZsqN758hmImk4KQHnpDd8UwSkCyJarx07d4+3BeKJmlMHyX4qaRxpBCmNFE4KENvHDpAutVERn1kCVBMfeRRgYvZnx62wZPdnZkw92VQA5GClQXYRBze2S+iJmpPVVoJLA9l9QKokjcWKTCT1R5rhLg70NuSsziT16diIKkuAjibrTpJNDkn/e17CahtAjlAWJAYkb29Sb1LE9Rs391kILk8mVkyuIpuZcLKUlEmKkra1WuSTNuesEPzwoEploSVAh9Oiz+BIyd9dOHhtx4OEpFpVg6gbNK3yXX1j48N6U5Dz5i/gc/FDrMY3sTLiSMEkXxGxzUEUAGnbxlPaksMlHUXWAlHS8URCPseSohZbCSLjSSU7ixLXdzhIWVKq4Y7t2a/2bN0qGeKly1fYsVmk6RgIDz4J0bonyUOcjeYqm/8hRoYbWkigV2NH9CHAS60EkUkkw47hSRs6FqT1LR5AVcsrueXlK1d5AO+RpmBrZZEiefByytPCanRGNLZY0uF52gNDYr9sCRB8MHY0SJu2OJWKS2WQV65e4y31DmkCImEi0hBfufRime0RIhpbKen0/Ny9OYNW2ghyYytABjNIaxNuKttAWk6HPLn0k0FevdZwFinPWFIuKZbUV16NVko6jbWSDoPO3pOf8K0jQWLSQ0S9bdpkYck+m7vfWpAiHfKgBsZiGSSt0FqcTeU8WETqAHE2CgcAVd3Gkm4MD3xXYeI6B4NMItvKbcUpQ9gP+KMWnSsW+TaYJtoo+avBWLoKoK0CCSDud+7eXWQGZAXqV3YoQjQCfixJ8+fzj9ta3JHhlUeJ8wJOY2ws6eRKpPS3oqTvHAESEz9ya0naXL5WH6pt3FqSOhTHkTcKEXc6k1POh4Q9YJu/03TT4a8PoGMFI4i2EqSbOZAYaBkpCyD92RkG6KCSbjI/H0HEISBnlOZPFdcEzI2GTO4KBZICGKyAKLTEmJOB2txf5MbgohBINCl4FTqmpJMB2W+HiRn1Q2l6lXyPmiEP6VVE2TfGoaMYrHyPdtAnyI0jEOn9RLWmNEhvBBE7SjpFQZaShtLK+1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\n background-size: 33px auto;\n}\n\n.OT_video-disabled-warning {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U5JXgX5G6nSvSq1R5LATR7aYGkwMG1RSwkWABH+4jUb3vT/uJ1Z0xpjraTBRltrxUQhksIRmgTJyy69+Pv99tv3qYX6FxgU+fU33352xGEHf5wisU7nNWJpZRMkAjZ6aIN1mwV7h29Jo2wCHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\n background-size: 33px auto;\n}\n\n.OT_video-disabled-indicator.OT_active {\n display: block;\n}\n\n.OT_audio-blocked-indicator {\n opacity: 1;\n border: none;\n display: none;\n position: absolute;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n\n.OT_audio-blocked {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\n background-size: 90px auto;\n}\n\n.OT_container-audio-blocked {\n cursor: pointer;\n}\n\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\n display: none;\n}\n\n.OT_container-audio-blocked .OT_mute {\n display: none;\n}\n\n.OT_audio-blocked-indicator.OT_active {\n display: block;\n}\n\n.OT_video-unsupported {\n opacity: 1;\n border: none;\n display: none;\n position: absolute;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\n background-size: 58px auto;\n pointer-events: none;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n margin-top: -30px;\n}\n\n.OT_video-unsupported-bar {\n display: none;\n position: absolute;\n width: 192%;\n /* copy the size of the audio meter bar for symmetry */\n height: 192%;\n top: -96%/* half of the size */\n ;\n left: -96%;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, .8);\n}\n\n.OT_video-unsupported-img {\n display: none;\n position: absolute;\n top: 11%;\n left: 15%;\n width: 70%;\n opacity: .7;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\n background-repeat: no-repeat;\n background-position: center;\n background-size: 100% auto;\n}\n\n.OT_video-unsupported-img:before {\n /* makes the height of the container 93% of its width (90/97 px) */\n content: '';\n display: block;\n padding-top: 93%;\n}\n\n.OT_video-unsupported-text {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-align: center;\n height: 100%;\n margin-top: 40px;\n}" - -/***/ }), - -/***/ "./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n
\n
\n \n
\n
\n
\n" - -/***/ }), - -/***/ "./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LayoutBestFitComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("./node_modules/@angular/router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_openvidu_browser__ = __webpack_require__("../../../../openvidu-browser/lib/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_openvidu_browser___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_openvidu_browser__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__openvidu_layout__ = __webpack_require__("./src/app/components/layouts/openvidu-layout.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - - -var LayoutBestFitComponent = (function () { - function LayoutBestFitComponent(route, appRef) { - var _this = this; - this.route = route; - this.appRef = appRef; - this.subscribers = []; - this.numberOfScreenStreams = 0; - this.layoutOptions = { - maxRatio: 3 / 2, - minRatio: 9 / 16, - fixedRatio: false, - bigClass: 'OV_big', - bigPercentage: 0.8, - bigFixedRatio: false, - bigMaxRatio: 3 / 2, - bigMinRatio: 9 / 16, - bigFirst: true, - animate: true // Whether you want to animate the transitions - }; - this.route.params.subscribe(function (params) { - _this.sessionId = params.sessionId; - _this.secret = params.secret; - }); - } - LayoutBestFitComponent.prototype.beforeunloadHandler = function () { - this.leaveSession(); - }; - LayoutBestFitComponent.prototype.sizeChange = function (event) { - var _this = this; - clearTimeout(this.resizeTimeout); - this.resizeTimeout = setTimeout(function () { - _this.openviduLayout.updateLayout(); - }, 20); - }; - LayoutBestFitComponent.prototype.ngOnDestroy = function () { - this.leaveSession(); - }; - LayoutBestFitComponent.prototype.ngOnInit = function () { - var _this = this; - var OV = new __WEBPACK_IMPORTED_MODULE_2_openvidu_browser__["OpenVidu"](); - this.session = OV.initSession(); - this.session.on('streamCreated', function (event) { - var changeFixedRatio = false; - if (event.stream.typeOfVideo === 'SCREEN') { - _this.numberOfScreenStreams++; - changeFixedRatio = true; - } - var subscriber = _this.session.subscribe(event.stream, undefined); - subscriber.on('streamPlaying', function (e) { - var video = subscriber.videos[0].video; - video.parentElement.parentElement.classList.remove('custom-class'); - _this.updateLayout(changeFixedRatio); - }); - _this.addSubscriber(subscriber); - }); - this.session.on('streamDestroyed', function (event) { - var changeFixedRatio = false; - if (event.stream.typeOfVideo === 'SCREEN') { - _this.numberOfScreenStreams--; - changeFixedRatio = true; - } - _this.deleteSubscriber(event.stream.streamManager); - _this.updateLayout(changeFixedRatio); - }); - var token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true'; - this.session.connect(token) - .catch(function (error) { - console.error(error); - }); - this.openviduLayout = new __WEBPACK_IMPORTED_MODULE_3__openvidu_layout__["a" /* OpenViduLayout */](); - this.openviduLayout.initLayoutContainer(document.getElementById('layout'), this.layoutOptions); - }; - LayoutBestFitComponent.prototype.addSubscriber = function (subscriber) { - this.subscribers.push(subscriber); - this.appRef.tick(); - }; - LayoutBestFitComponent.prototype.deleteSubscriber = function (subscriber) { - var index = -1; - for (var i = 0; i < this.subscribers.length; i++) { - if (this.subscribers[i] === subscriber) { - index = i; - break; - } - } - if (index > -1) { - this.subscribers.splice(index, 1); - } - this.appRef.tick(); - }; - LayoutBestFitComponent.prototype.leaveSession = function () { - if (this.session) { - this.session.disconnect(); - } - ; - this.subscribers = []; - this.session = null; - }; - LayoutBestFitComponent.prototype.updateLayout = function (changeFixedRatio) { - if (changeFixedRatio) { - this.layoutOptions.fixedRatio = this.numberOfScreenStreams > 0; - this.openviduLayout.setLayoutOptions(this.layoutOptions); - } - this.openviduLayout.updateLayout(); - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* HostListener */])('window:beforeunload'), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", void 0) - ], LayoutBestFitComponent.prototype, "beforeunloadHandler", null); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* HostListener */])('window:resize', ['$event']), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", void 0) - ], LayoutBestFitComponent.prototype, "sizeChange", null); - LayoutBestFitComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-layout-best-fit', - template: __webpack_require__("./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html"), - styles: [__webpack_require__("./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css")], - encapsulation: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* ViewEncapsulation */].None - }), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_router__["a" /* ActivatedRoute */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["g" /* ApplicationRef */]]) - ], LayoutBestFitComponent); - return LayoutBestFitComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/components/layouts/openvidu-layout.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OpenViduLayout; }); -var OpenViduLayout = (function () { - function OpenViduLayout() { - } - OpenViduLayout.prototype.fixAspectRatio = function (elem, width) { - var sub = elem.querySelector('.OT_root'); - if (sub) { - // If this is the parent of a subscriber or publisher then we need - // to force the mutation observer on the publisher or subscriber to - // trigger to get it to fix it's layout - var oldWidth = sub.style.width; - sub.style.width = width + 'px'; - // sub.style.height = height + 'px'; - sub.style.width = oldWidth || ''; - } - }; - OpenViduLayout.prototype.positionElement = function (elem, x, y, width, height, animate) { - var _this = this; - var targetPosition = { - left: x + 'px', - top: y + 'px', - width: width + 'px', - height: height + 'px' - }; - this.fixAspectRatio(elem, width); - if (animate && $) { - $(elem).stop(); - $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing', function () { - _this.fixAspectRatio(elem, width); - if (animate.complete) { - animate.complete.call(_this); - } - }); - } - else { - $(elem).css(targetPosition); - } - this.fixAspectRatio(elem, width); - }; - OpenViduLayout.prototype.getVideoRatio = function (elem) { - if (!elem) { - return 3 / 4; - } - var video = elem.querySelector('video'); - if (video && video.videoHeight && video.videoWidth) { - return video.videoHeight / video.videoWidth; - } - else if (elem.videoHeight && elem.videoWidth) { - return elem.videoHeight / elem.videoWidth; - } - return 3 / 4; - }; - OpenViduLayout.prototype.getCSSNumber = function (elem, prop) { - var cssStr = $(elem).css(prop); - return cssStr ? parseInt(cssStr, 10) : 0; - }; - // Really cheap UUID function - OpenViduLayout.prototype.cheapUUID = function () { - return (Math.random() * 100000000).toFixed(0); - }; - OpenViduLayout.prototype.getHeight = function (elem) { - var heightStr = $(elem).css('height'); - return heightStr ? parseInt(heightStr, 10) : 0; - }; - OpenViduLayout.prototype.getWidth = function (elem) { - var widthStr = $(elem).css('width'); - return widthStr ? parseInt(widthStr, 10) : 0; - }; - OpenViduLayout.prototype.getBestDimensions = function (minR, maxR, count, WIDTH, HEIGHT, targetHeight) { - var maxArea, targetCols, targetRows, targetWidth, tWidth, tHeight, tRatio; - // Iterate through every possible combination of rows and columns - // and see which one has the least amount of whitespace - for (var i = 1; i <= count; i++) { - var colsAux = i; - var rowsAux = Math.ceil(count / colsAux); - // Try taking up the whole height and width - tHeight = Math.floor(HEIGHT / rowsAux); - tWidth = Math.floor(WIDTH / colsAux); - tRatio = tHeight / tWidth; - if (tRatio > maxR) { - // We went over decrease the height - tRatio = maxR; - tHeight = tWidth * tRatio; - } - else if (tRatio < minR) { - // We went under decrease the width - tRatio = minR; - tWidth = tHeight / tRatio; - } - var area = (tWidth * tHeight) * count; - // If this width and height takes up the most space then we're going with that - if (maxArea === undefined || (area > maxArea)) { - maxArea = area; - targetHeight = tHeight; - targetWidth = tWidth; - targetCols = colsAux; - targetRows = rowsAux; - } - } - return { - maxArea: maxArea, - targetCols: targetCols, - targetRows: targetRows, - targetHeight: targetHeight, - targetWidth: targetWidth, - ratio: targetHeight / targetWidth - }; - }; - ; - OpenViduLayout.prototype.arrange = function (children, WIDTH, HEIGHT, offsetLeft, offsetTop, fixedRatio, minRatio, maxRatio, animate) { - var targetHeight; - var count = children.length; - var dimensions; - if (!fixedRatio) { - dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight); - } - else { - // Use the ratio of the first video element we find to approximate - var ratio = this.getVideoRatio(children.length > 0 ? children[0] : null); - dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight); - } - // Loop through each stream in the container and place it inside - var x = 0, y = 0; - var rows = []; - var row; - // Iterate through the children and create an array with a new item for each row - // and calculate the width of each row so that we know if we go over the size and need - // to adjust - for (var i = 0; i < children.length; i++) { - if (i % dimensions.targetCols === 0) { - // This is a new row - row = { - children: [], - width: 0, - height: 0 - }; - rows.push(row); - } - var elem = children[i]; - row.children.push(elem); - var targetWidth = dimensions.targetWidth; - targetHeight = dimensions.targetHeight; - // If we're using a fixedRatio then we need to set the correct ratio for this element - if (fixedRatio) { - targetWidth = targetHeight / this.getVideoRatio(elem); - } - row.width += targetWidth; - row.height = targetHeight; - } - // Calculate total row height adjusting if we go too wide - var totalRowHeight = 0; - var remainingShortRows = 0; - for (var i = 0; i < rows.length; i++) { - row = rows[i]; - if (row.width > WIDTH) { - // Went over on the width, need to adjust the height proportionally - row.height = Math.floor(row.height * (WIDTH / row.width)); - row.width = WIDTH; - } - else if (row.width < WIDTH) { - remainingShortRows += 1; - } - totalRowHeight += row.height; - } - if (totalRowHeight < HEIGHT && remainingShortRows > 0) { - // We can grow some of the rows, we're not taking up the whole height - var remainingHeightDiff = HEIGHT - totalRowHeight; - totalRowHeight = 0; - for (var i = 0; i < rows.length; i++) { - row = rows[i]; - if (row.width < WIDTH) { - // Evenly distribute the extra height between the short rows - var extraHeight = remainingHeightDiff / remainingShortRows; - if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) { - // We can't go that big or we'll go too wide - extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height); - } - row.width += Math.floor((extraHeight / row.height) * row.width); - row.height += extraHeight; - remainingHeightDiff -= extraHeight; - remainingShortRows -= 1; - } - totalRowHeight += row.height; - } - } - // vertical centering - y = ((HEIGHT - (totalRowHeight)) / 2); - // Iterate through each row and place each child - for (var i = 0; i < rows.length; i++) { - row = rows[i]; - // center the row - var rowMarginLeft = ((WIDTH - row.width) / 2); - x = rowMarginLeft; - for (var j = 0; j < row.children.length; j++) { - var elem = row.children[j]; - var targetWidth = dimensions.targetWidth; - targetHeight = row.height; - // If we're using a fixedRatio then we need to set the correct ratio for this element - if (fixedRatio) { - targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem)); - } - elem.style.position = 'absolute'; - // $(elem).css('position', 'absolute'); - var actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') - - this.getCSSNumber(elem, 'paddingRight') - - this.getCSSNumber(elem, 'marginLeft') - - this.getCSSNumber(elem, 'marginRight') - - this.getCSSNumber(elem, 'borderLeft') - - this.getCSSNumber(elem, 'borderRight'); - var actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') - - this.getCSSNumber(elem, 'paddingBottom') - - this.getCSSNumber(elem, 'marginTop') - - this.getCSSNumber(elem, 'marginBottom') - - this.getCSSNumber(elem, 'borderTop') - - this.getCSSNumber(elem, 'borderBottom'); - this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate); - x += targetWidth; - } - y += targetHeight; - } - }; - OpenViduLayout.prototype.filterDisplayNone = function (element) { - return element.style.display !== 'none'; - }; - OpenViduLayout.prototype.updateLayout = function () { - if (this.layoutContainer.style.display === 'none') { - return; - } - var id = this.layoutContainer.id; - if (!id) { - id = 'OT_' + this.cheapUUID(); - this.layoutContainer.id = id; - } - var HEIGHT = this.getHeight(this.layoutContainer) - - this.getCSSNumber(this.layoutContainer, 'borderTop') - - this.getCSSNumber(this.layoutContainer, 'borderBottom'); - var WIDTH = this.getWidth(this.layoutContainer) - - this.getCSSNumber(this.layoutContainer, 'borderLeft') - - this.getCSSNumber(this.layoutContainer, 'borderRight'); - var availableRatio = HEIGHT / WIDTH; - var offsetLeft = 0; - var offsetTop = 0; - var bigOffsetTop = 0; - var bigOffsetLeft = 0; - var bigOnes = Array.prototype.filter.call(this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass), this.filterDisplayNone); - var smallOnes = Array.prototype.filter.call(this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'), this.filterDisplayNone); - if (bigOnes.length > 0 && smallOnes.length > 0) { - var bigWidth = void 0, bigHeight = void 0; - if (availableRatio > this.getVideoRatio(bigOnes[0])) { - // We are tall, going to take up the whole width and arrange small - // guys at the bottom - bigWidth = WIDTH; - bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage); - offsetTop = bigHeight; - bigOffsetTop = HEIGHT - offsetTop; - } - else { - // We are wide, going to take up the whole height and arrange the small - // guys on the right - bigHeight = HEIGHT; - bigWidth = Math.floor(WIDTH * this.opts.bigPercentage); - offsetLeft = bigWidth; - bigOffsetLeft = WIDTH - offsetLeft; - } - if (this.opts.bigFirst) { - this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate); - this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop, this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate); - } - else { - this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate); - this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop, this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate); - } - } - else if (bigOnes.length > 0 && smallOnes.length === 0) { - this. - // We only have one bigOne just center it - arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate); - } - else { - this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop, this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate); - } - }; - OpenViduLayout.prototype.initLayoutContainer = function (container, opts) { - this.opts = { - maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2, - minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16, - fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false, - animate: (opts.animate != null) ? opts.animate : false, - bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big', - bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8, - bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false, - bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2, - bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16, - bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true - }; - this.layoutContainer = typeof (container) === 'string' ? $(container) : container; - }; - OpenViduLayout.prototype.setLayoutOptions = function (options) { - this.opts = options; - }; - return OpenViduLayout; -}()); - - - -/***/ }), - -/***/ "./src/app/components/layouts/ov-video.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OpenViduVideoComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_openvidu_browser__ = __webpack_require__("../../../../openvidu-browser/lib/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_openvidu_browser___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_openvidu_browser__); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - -var OpenViduVideoComponent = (function () { - function OpenViduVideoComponent() { - } - OpenViduVideoComponent.prototype.ngAfterViewInit = function () { - this._subscriber.addVideoElement(this.elementRef.nativeElement); - }; - Object.defineProperty(OpenViduVideoComponent.prototype, "subscriber", { - set: function (subscriber) { - this._subscriber = subscriber; - if (!!this.elementRef) { - this._subscriber.addVideoElement(this.elementRef.nativeElement); - } - }, - enumerable: true, - configurable: true - }); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewChild */])('videoElement'), - __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */]) - ], OpenViduVideoComponent.prototype, "elementRef", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* Input */])(), - __metadata("design:type", __WEBPACK_IMPORTED_MODULE_1_openvidu_browser__["Subscriber"]), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_openvidu_browser__["Subscriber"]]) - ], OpenViduVideoComponent.prototype, "subscriber", null); - OpenViduVideoComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-ov-video', - template: '' - }) - ], OpenViduVideoComponent); - return OpenViduVideoComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/components/session-details/session-details.component.css": -/***/ (function(module, exports) { - -module.exports = "" - -/***/ }), - -/***/ "./src/app/components/session-details/session-details.component.html": -/***/ (function(module, exports) { - -module.exports = "

\n session-details works!\n

\n" - -/***/ }), - -/***/ "./src/app/components/session-details/session-details.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SessionDetailsComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var SessionDetailsComponent = (function () { - function SessionDetailsComponent() { - } - SessionDetailsComponent.prototype.ngOnInit = function () { - }; - SessionDetailsComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-session-details', - template: __webpack_require__("./src/app/components/session-details/session-details.component.html"), - styles: [__webpack_require__("./src/app/components/session-details/session-details.component.css")] - }), - __metadata("design:paramtypes", []) - ], SessionDetailsComponent); - return SessionDetailsComponent; -}()); - - - -/***/ }), - -/***/ "./src/app/services/info.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InfoService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__ = __webpack_require__("./node_modules/rxjs/_esm5/Subject.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - -var InfoService = (function () { - function InfoService() { - this.newInfo$ = new __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__["a" /* Subject */](); - } - InfoService.prototype.getInfo = function () { - return this.info; - }; - InfoService.prototype.updateInfo = function (info) { - this.info = info; - this.newInfo$.next(info); - }; - InfoService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["C" /* Injectable */])(), - __metadata("design:paramtypes", []) - ], InfoService); - return InfoService; -}()); - - - -/***/ }), - -/***/ "./src/app/services/rest.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RestService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - -var RestService = (function () { - function RestService() { - } - RestService.prototype.getOpenViduPublicUrl = function () { - var _this = this; - return new Promise(function (resolve, reject) { - if (!!_this.openviduPublicUrl) { - resolve(_this.openviduPublicUrl); - } - else { - var url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') + - '/config/openvidu-publicurl'; - var http_1 = new XMLHttpRequest(); - http_1.onreadystatechange = function () { - if (http_1.readyState === 4) { - if (http_1.status === 200) { - _this.openviduPublicUrl = http_1.responseText; - resolve(http_1.responseText); - } - else { - reject('Error getting OpenVidu publicurl'); - } - } - ; - }; - http_1.open('GET', url, true); - http_1.send(); - } - }); - }; - RestService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["C" /* Injectable */])() - ], RestService); - return RestService; -}()); - - - -/***/ }), - -/***/ "./src/environments/environment.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return environment; }); -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. -var environment = { - production: false -}; - - -/***/ }), - -/***/ "./src/main.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("./node_modules/@angular/core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__ = __webpack_require__("./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_app_module__ = __webpack_require__("./src/app/app.module.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__environments_environment__ = __webpack_require__("./src/environments/environment.ts"); - - - - -if (__WEBPACK_IMPORTED_MODULE_3__environments_environment__["a" /* environment */].production) { - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* enableProdMode */])(); -} -Object(__WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_2__app_app_module__["a" /* AppModule */]); - - -/***/ }), - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("./src/main.ts"); - - -/***/ }) - -},[0]); -//# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/main.bundle.js.map b/openvidu-server/src/main/resources/static/main.bundle.js.map deleted file mode 100644 index 98356000..00000000 --- a/openvidu-server/src/main/resources/static/main.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Connection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/LocalRecorder.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Stream.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/StreamManager.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/Event.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/merge/merge.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/platform/platform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js","./src/$_lazy_route_resource lazy","./src/app/app.component.css","./src/app/app.component.html","./src/app/app.component.ts","./src/app/app.material.module.ts","./src/app/app.module.ts","./src/app/app.routing.ts","./src/app/components/dashboard/credentials-dialog.component.ts","./src/app/components/dashboard/dashboard.component.css","./src/app/components/dashboard/dashboard.component.html","./src/app/components/dashboard/dashboard.component.ts","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","./src/app/components/layouts/openvidu-layout.ts","./src/app/components/layouts/ov-video.component.ts","./src/app/components/session-details/session-details.component.css","./src/app/components/session-details/session-details.component.html","./src/app/components/session-details/session-details.component.ts","./src/app/services/info.service.ts","./src/app/services/rest.service.ts","./src/environments/environment.ts","./src/main.ts"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,EAAE,wBAAwB,YAAY,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACtUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qCAAqC;AACrC,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,gCAAgC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gEAAgE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;;;AC1gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAsI,sDAAsD,EAAE;AAC9L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;AClXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,oDAAoD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;AC9yBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,gBAAgB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,QAAQ;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qFAAqF;AACtF,8C;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kFAAkF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E,2C;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,CAAC;AACD;AACA,2C;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA,CAAC;AACD;AACA,kD;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,CAAC;AACD;AACA,0C;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oD;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,QAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA,CAAC;AACD;AACA,8C;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA,CAAC;AACD;AACA,6C;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;AC5CA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;AChMA;AACA;AACA,iC;;;;;;;;8CCFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qD;;;;;;;;ACrKA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC;AACjF,+CAA+C,kCAAkC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACleA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACVA;AACA;AACA;AACA;AACA,iC;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;AC1fA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iD;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,oBAAoB,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AC1CA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACxGA,6V;;;;;;;ACAA,mB;;;;;;;ACAA;;AAEA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD,mCAAmC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,gBAAgB,WAAW;;AAE3B;;AAEA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,IAAI;;AAEJ;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;;AAE9B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,YAAY;;AAEZ;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;;AAEA;;AAEA,CAAC,gG;;;;;;;;AC9KD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;;;;;;;sDC3DA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,SAAS;AACtB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO,yCAAyC;AAChD;AACA,OAAO,8CAA8C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,+CAA+C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,2DAA2D;AAClE;AACA,OAAO,4DAA4D;AACnE;AACA;AACA,OAAO,4CAA4C;AACnD;AACA;AACA;AACA;AACA;AACA,OAAO,4CAA4C;AACnD;AACA,OAAO,qCAAqC;AAC5C;AACA,OAAO,wDAAwD;AAC/D,OAAO,yDAAyD;AAChE,OAAO,iDAAiD;AACxD,OAAO,uCAAuC;AAC9C,OAAO,mCAAmC;AAC1C;AACA;;AAEA;AACA;AACA,OAAO,2CAA2C;AAClD;AACA,OAAO,6CAA6C;AACpD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,6CAA6C;AACpD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAmE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA;AACA,OAAO,yCAAyC;AAChD;AACA;;AAEA;AACA;AACA,gBAAgB,oCAAoC;AACpD,kBAAkB;AAClB,iBAAiB,gCAAgC;AACjD,eAAe,mBAAmB;AAClC,yBAAyB,YAAY;AACrC,qBAAqB,gBAAgB;AACrC,iBAAiB,6BAA6B;AAC9C,aAAa,gBAAgB;AAC7B,eAAe;AACf,cAAc;AACd,oBAAoB,2BAA2B;AAC/C,mBAAmB,YAAY;AAC/B,mBAAmB,wBAAwB;AAC3C,gBAAgB,aAAa;AAC7B,kBAAkB,gEAAgE;AAClF,eAAe;AACf,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO,0CAA0C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA,8BAA8B,eAAe;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;AChsCD;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,UAAU;AACjD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AChQD;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C;;AAE/C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,uCAAuC;AACvC;;AAEA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC5FA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gBAAgB,KAAK,KAAK;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,yBAAyB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;;ACl3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA,6BAA6B;AAC7B,kDAAkD;;AAElD;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA;;AAEA;;AAEA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,8CAA8C,EAAE;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oDAAoD,IAAI;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+CAA+C,IAAI,kCAAkC,IAAI;AACzF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,sDAAsD;AACtD;;AAEA,sBAAsB;AACtB;;AAEA,+BAA+B;AAC/B;;AAEA;AACA,kCAAkC,MAAM;AACxC;;AAEA,+CAA+C;AAC/C;;AAEA,uBAAuB;AACvB;;AAEA,+BAA+B,8BAA8B,gDAAgD;AAC7G;AACA;AACA;;AAEA;;AAEA,+BAA+B,QAAQ;AACvC;;AAEA;AACA;;AAEA,sBAAsB,IAAI;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,wCAAwC,KAAK;AAC7C;;AAEA;AACA;AACA;AACA,iCAAiC,EAAE;AACnC;;AAEA;AACA;AACA;;AAEA,uBAAuB;AACvB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,oBAAoB;AACpB;AACA,6DAA6D;AAC7D;AACA;;AAEA;AACA;;AAEA,kCAAkC;AAClC;AACA;;AAEA,yBAAyB;AACzB;;AAEA,mBAAmB,uBAAuB;AAC1C;AACA,2BAA2B,EAAE;AAC7B;;AAEA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA,0CAA0C,IAAI;AAC9C;;AAEA,8CAA8C,SAAS,IAAI,IAAI;AAC/D;;AAEA,0BAA0B;AAC1B;;AAEA,sBAAsB;AACtB;;AAEA,sDAAsD,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,GAAG,GAAG,KAAK,EAAE;AAC5C;;AAEA,kCAAkC,EAAE;AACpC;AACA,+BAA+B,GAAG,GAAG,eAAe,IAAI;AACxD;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;;AAEA;AACA;;AAEA,uBAAuB;AACvB;;AAEA;AACA;;AAEA,uBAAuB;AACvB;;AAEA,uBAAuB;AACvB;;AAEA,uBAAuB;AACvB;;AAEA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA,oCAAoC,EAAE;AACtC;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB,mBAAmB,IAAI;AAC/C;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB,YAAY,EAAE;AACtC;;AAEA,uBAAuB;AACvB;;AAEA,wBAAwB,aAAa,EAAE;AACvC;;AAEA,wBAAwB,aAAa,EAAE;AACvC;;AAEA,wBAAwB;AACxB;;AAEA,0BAA0B,cAAc,EAAE;AAC1C,wBAAwB,oCAAoC,EAAE;AAC9D;;AAEA,wBAAwB,cAAc,IAAI;AAC1C;;AAEA,wBAAwB,qBAAqB,IAAI;AACjD;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB,+BAA+B,IAAI;AAC3D;;AAEA,wBAAwB;AACxB;;AAEA,wBAAwB,2BAA2B,EAAE;AACrD;;AAEA,wBAAwB;AACxB;;AAEA;AACA;;AAEA,2CAA2C,IAAI;AAC/C;;AAEA,6BAA6B;AAC7B,4BAA4B;AAC5B;;AAEA,gCAAgC,IAAI,EAAE;AACtC;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,IAAI;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA,yCAAyC;AACzC;AACA,0BAA0B;AAC1B;AACA,+BAA+B;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI;AAChC;;AAEA;AACA;;AAEA;AACA,wBAAwB,IAAI,6BAA6B;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,wDAAwD;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AAAA;AACb,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;AChkCD;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5GA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5BA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;AAED;;AAEA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,KAAK;AACpB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW;;;;;;;;ACreZ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,4E;;;;;;;ACVA,mB;;;;;;;ACAA,qE;;;;;;;;;;;;;;;;ACA2E;AAU3E;IAAA;IAEA,CAAC;IAFY,YAAY;QALxB,wEAAS,CAAC;YACT,QAAQ,EAAE,UAAU;;;SAGrB,CAAC;OACW,YAAY,CAExB;IAAD,mBAAC;CAAA;AAFwB;;;;;;;;;;;;;;;;;;;ACVgB;AACsC;AAYpD;AA8B3B;IAAA;IAAiC,CAAC;IAArB,iBAAiB;QA5B7B,uEAAQ,CAAC;YACN,OAAO,EAAE;gBACL,qGAAuB;gBACvB,0EAAe;gBACf,wEAAa;gBACb,4EAAiB;gBACjB,wEAAa;gBACb,yEAAc;gBACd,mFAAwB;gBACxB,2EAAgB;gBAChB,0EAAe;gBACf,+EAAoB;gBACpB,wEAAa;aAChB;YACD,OAAO,EAAE;gBACL,qGAAuB;gBACvB,0EAAe;gBACf,wEAAa;gBACb,4EAAiB;gBACjB,wEAAa;gBACb,yEAAc;gBACd,mFAAwB;gBACxB,2EAAgB;gBAChB,0EAAe;gBACf,+EAAoB;gBACpB,wEAAa;aAChB;SACJ,CAAC;OACW,iBAAiB,CAAI;IAAD,wBAAC;CAAA;AAAJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3C4B;AACF;AACf;AACI;AACF;AAEzB;AAEsB;AACoB;AAEN;AACA;AAEP;AACiC;AACiB;AACA;AACO;AACvB;AA0BjF;IAAA;IAAyB,CAAC;IAAb,SAAS;QAvBrB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qEAAY;gBACZ,sGAAkB;gBAClB,uHAAuB;gBACvB,uHAA0B;gBAC1B,8HAAsB;gBACtB,uGAAsB;aACvB;YACD,OAAO,EAAE;gBACP,gFAAa;gBACb,mEAAW;gBACX,iEAAU;gBACV,6DAAO;gBACP,kFAAiB;gBACjB,8EAAgB;aACjB;YACD,eAAe,EAAE;gBACf,uHAA0B;aAC3B;YACD,SAAS,EAAE,CAAC,2EAAW,EAAE,2EAAW,CAAC;YACrC,SAAS,EAAE,CAAC,qEAAY,CAAC;SAC1B,CAAC;OACW,SAAS,CAAI;IAAD,gBAAC;CAAA;AAAJ;;;;;;;;;;;;;;AC5CiC;AAE2B;AACiB;AACO;AAE1G,IAAM,SAAS,GAAW;IACxB;QACE,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,wGAAkB;QAC7B,SAAS,EAAE,MAAM;KAClB;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,SAAS,EAAE,yHAAuB;QAClC,SAAS,EAAE,MAAM;KAClB;IACD;QACE,IAAI,EAAE,oCAAoC;QAC1C,SAAS,EAAE,gIAAsB;QACjC,SAAS,EAAE,MAAM;KAClB;CACF,CAAC;AAEK,IAAM,OAAO,GAAwB,qEAAY,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;ACzBrD;AAiD1C;IAKI;IAAgB,CAAC;IAEjB,8CAAS,GAAT;QACI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IATQ,0BAA0B;QA9CtC,wEAAS,CAAC;YACP,QAAQ,EAAE,wBAAwB;YAClC,QAAQ,EAAE,6sBAiBT;YACD,MAAM,EAAE,CAAC,4gBAwBR,CAAC;SACL,CAAC;;OACW,0BAA0B,CAUtC;IAAD,iCAAC;CAAA;AAVsC;;;;;;;;ACjDvC,kCAAkC,kBAAkB,GAAG,UAAU,gBAAgB,GAAG,kBAAkB,gBAAgB,wEAAwE,qBAAqB,yBAAyB,QAAQ,cAAc,GAAG,eAAe,8BAA8B,iBAAiB,GAAG,gCAAgC,mBAAmB,8BAA8B,GAAG,kCAAkC,+BAA+B,8BAA8B,GAAG,iBAAiB,uBAAuB,aAAa,cAAc,6CAA6C,6CAA6C,GAAG,eAAe,iBAAiB,kBAAkB,eAAe,uBAAuB,aAAa,cAAc,6CAA6C,6CAA6C,GAAG,mBAAmB,uBAAuB,gBAAgB,iBAAiB,eAAe,GAAG,WAAW,eAAe,0BAA0B,2BAA2B,+BAA+B,uBAAuB,GAAG,WAAW,yBAAyB,0BAA0B,2DAA2D,mDAAmD,GAAG,sBAAsB,eAAe,yBAAyB,GAAG,qBAAqB,uBAAuB,GAAG,sCAAsC,iBAAiB,kBAAkB,eAAe,uBAAuB,aAAa,cAAc,6CAA6C,qCAAqC,GAAG,eAAe,mCAAmC,2BAA2B,GAAG,qBAAqB,mCAAmC,2BAA2B,GAAG,sBAAsB,mCAAmC,2BAA2B,GAAG,eAAe,kBAAkB,iBAAiB,uDAAuD,+CAA+C,GAAG,mCAAmC,QAAQ,sCAAsC,KAAK,UAAU,wCAAwC,KAAK,GAAG,2BAA2B,QAAQ,sCAAsC,sCAAsC,KAAK,UAAU,wCAAwC,wCAAwC,KAAK,GAAG,oBAAoB,mBAAmB,uBAAuB,WAAW,YAAY,cAAc,aAAa,iBAAiB,kBAAkB,iBAAiB,sCAAsC,uDAAuD,+CAA+C,GAAG,mCAAmC,QAAQ,sCAAsC,KAAK,UAAU,wCAAwC,KAAK,GAAG,2BAA2B,QAAQ,sCAAsC,sCAAsC,KAAK,UAAU,wCAAwC,wCAAwC,KAAK,GAAG,2BAA2B,kBAAkB,uBAAuB,WAAW,YAAY,cAAc,aAAa,iBAAiB,kBAAkB,iBAAiB,sCAAsC,8BAA8B,uBAAuB,yFAAyF,iFAAiF,GAAG,mCAAmC,QAAQ,yCAAyC,KAAK,SAAS,yCAAyC,KAAK,UAAU,wCAAwC,KAAK,GAAG,2BAA2B,QAAQ,yCAAyC,yCAAyC,KAAK,SAAS,yCAAyC,yCAAyC,KAAK,UAAU,wCAAwC,wCAAwC,KAAK,GAAG,C;;;;;;;ACA95H,2WAA2W,mBAAmB,0QAA0Q,GAAG,6fAA6f,YAAY,gvBAAgvB,sFAAsF,eAAe,eAAe,sBAAsB,qBAAqB,6NAA6N,eAAe,eAAe,sBAAsB,qBAAqB,2KAA2K,KAAK,2E;;;;;;;;;;;;;;;;;;;;;;;;;ACAv5E;AACtC;AAGF;AACA;AAEL;AACuB;AAS5E;IAoBE,4BAAoB,WAAwB,EAAU,WAAwB,EAAS,MAAiB;QAAxG,iBAOC;QAPmB,gBAAW,GAAX,WAAW,CAAa;QAAU,gBAAW,GAAX,WAAW,CAAa;QAAS,WAAM,GAAN,MAAM,CAAW;QAfxG,eAAU,GAAG,KAAK,CAAC;QAGnB,SAAI,GAAG,EAAE,CAAC;QAIV,eAAU,GAAG,cAAc,CAAC;QAC5B,eAAU,GAAG,MAAM,CAAC;QACpB,cAAS,GAAG,SAAS,CAAC;QACtB,gBAAW,GAAG,KAAK,CAAC;QACpB,aAAQ,GAAG,EAAE,CAAC;QAKZ,2DAA2D;QAC3D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CACzD,cAAI;YACF,KAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,KAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,qCAAQ,GAAR;QAAA,iBA6BC;QA3BC,IAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,OAAO,CAAC;QAC1E,IAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAE1D,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;QAE9E,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,UAAC,KAAK;YAC5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QAC1C,CAAC,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,UAAC,KAAK;YAC7B,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACvC,CAAC,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,UAAC,KAAK;YAC7B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,UAAC,KAAK;YAC/B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACxB,KAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,IAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE;aACpC,IAAI,CAAC,aAAG;YACP,KAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACzF,CAAC,CAAC;aACD,KAAK,CAAC,eAAK;YACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAGD,gDAAmB,GAAnB;QACE,+DAA+D;QAC/D,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,wCAAW,GAAX;QACE,qEAAqE;QACrE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,4CAAe,GAAf;QACE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAED,sCAAS,GAAT;QAAA,iBAqBC;QApBC,IAAI,SAAmD,CAAC;QACxD,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iGAA0B,CAAC,CAAC;QACzD,SAAS,CAAC,iBAAiB,CAAC,WAAW,GAAG,SAAS,CAAC;QAEpD,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,gBAAM;YACtC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gBACX,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;oBAC5B,KAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE;yBACpC,IAAI,CAAC,CAAC,aAAG;wBACR,KAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;wBACvF,KAAI,CAAC,gBAAgB,CAAC,KAAI,CAAC,iBAAiB,GAAG,gCAAgC,GAAG,MAAM,CAAC,CAAC;oBAC5F,CAAC,CAAC,CAAC;yBACF,KAAK,CAAC,eAAK;wBACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACvB,CAAC,CAAC,CAAC;gBACP,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACN,KAAI,CAAC,gBAAgB,CAAC,KAAI,CAAC,iBAAiB,GAAG,gCAAgC,GAAG,MAAM,CAAC,CAAC;gBAC5F,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,6CAAgB,GAAhB,UAAiB,KAAa;QAA9B,iBAmEC;QAlEC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,IAAM,EAAE,GAAG,IAAI,0DAAQ,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;QAEhC,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;aACxB,IAAI,CAAC;YAEJ,KAAI,CAAC,UAAU,GAAG,WAAW,CAAC;YAE9B,IAAM,eAAe,GAAG,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE;gBACzD,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,UAAU,EAAE,SAAS;aACtB,EACC,WAAC;gBACC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACR,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC,CACF,CAAC;YAEF,eAAe,CAAC,EAAE,CAAC,eAAe,EAAE;gBAClC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;YAEH,eAAe,CAAC,EAAE,CAAC,cAAc,EAAE;gBACjC,KAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;YAEH,eAAe,CAAC,EAAE,CAAC,qBAAqB,EAAE,UAAC,KAAK;gBAC9C,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;YAEH,eAAe,CAAC,EAAE,CAAC,oBAAoB,EAAE,UAAC,KAAK;gBAC7C,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;gBAC3C,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;gBAC7B,KAAI,CAAC,UAAU,GAAG,SAAS,CAAC;gBAC5B,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YAC3B,CAAC,CAAC,CAAC;YAEH,eAAe,CAAC,iBAAiB,EAAE,CAAC;YACpC,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAExC,CAAC,CAAC;aACD,KAAK,CAAC,eAAK;YACV,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;gBACvB,KAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,IAAI,SAAS,SAA0C,CAAC;gBACxD,SAAS,GAAG,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iGAA0B,CAAC,CAAC;gBACzD,SAAS,CAAC,iBAAiB,CAAC,WAAW,GAAG,SAAS,CAAC;gBAEpD,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,gBAAM;oBACtC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACX,KAAI,CAAC,gBAAgB,CAAC,KAAI,CAAC,iBAAiB,GAAG,gCAAgC,GAAG,MAAM,CAAC,CAAC;oBAC5F,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,yCAAY,GAAZ;QACE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,2CAAc,GAAd;QACE,IAAI,CAAC;YACH,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;gBACrB,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC;YACrG,CAAC;QACH,CAAC;QAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IA/LsB;QAAtB,0EAAS,CAAC,UAAU,CAAC;kCAA4B,iEAAU;iEAAC;IAyD7D;QADC,2EAAY,CAAC,qBAAqB,CAAC;;;;iEAOnC;IAnEU,kBAAkB;QAL9B,wEAAS,CAAC;YACT,QAAQ,EAAE,eAAe;;;SAG1B,CAAC;yCAqBiC,2EAAW,EAAuB,2EAAW,EAAiB,oEAAS;OApB7F,kBAAkB,CAqM9B;IAAD,yBAAC;CAAA;AArM8B;;;;;;;;ACjB/B,2BAA2B,4BAA4B,qBAAqB,4BAA4B,uBAAuB,YAAY,aAAa,WAAW,cAAc,GAAG,wBAAwB,yBAAyB,sBAAsB,mBAAmB,uBAAuB,gBAAgB,iBAAiB,mBAAmB,cAAc,eAAe,cAAc,oBAAoB,8CAA8C,GAAG,6IAA6I,+BAA+B,GAAG,sHAAsH,mBAAmB,cAAc,eAAe,cAAc,oBAAoB,8CAA8C,6BAA6B,GAAG,0BAA0B,mBAAmB,gBAAgB,iBAAiB,GAAG,gCAAgC,wBAAwB,2BAA2B,GAAG,gBAAgB,uBAAuB,mCAAmC,2BAA2B,qBAAqB,uBAAuB,sBAAsB,kBAAkB,uBAAuB,sEAAsE,gBAAgB,yCAAyC,iCAAiC,6CAA6C,oBAAoB,qBAAqB,GAAG,kBAAkB,yBAAyB,gCAAgC,wBAAwB,GAAG,qBAAqB,mBAAmB,oBAAoB,oBAAoB,sBAAsB,uBAAuB,gBAAgB,WAAW,GAAG,yBAAyB,uBAAuB,GAAG,8BAA8B,wBAAwB,sBAAsB,qBAAqB,oBAAoB,GAAG,+BAA+B,wBAAwB,oBAAoB,sBAAsB,mBAAmB,GAAG,sCAAsC,mBAAmB,GAAG,6BAA6B,0BAA0B,GAAG,6BAA6B,wBAAwB,sBAAsB,qBAAqB,uBAAuB,oBAAoB,mBAAmB,GAAG,mCAAmC,mBAAmB,GAAG,iGAAiG,mBAAmB,GAAG,oCAAoC,mBAAmB,qBAAqB,mBAAmB,GAAG,uBAAuB,0BAA0B,wBAAwB,mBAAmB,8BAA8B,uBAAuB,oBAAoB,GAAG,gCAAgC,wBAAwB,iBAAiB,GAAG,6BAA6B,sBAAsB,qBAAqB,wBAAwB,qBAAqB,oBAAoB,GAAG,6BAA6B,sBAAsB,qBAAqB,wBAAwB,8BAA8B,mBAAmB,oBAAoB,GAAG,6BAA6B,0BAA0B,kDAAkD,oBAAoB,wBAAwB,8BAA8B,gBAAgB,GAAG,kCAAkC,iBAAiB,8BAA8B,GAAG,sEAAsE,sBAAsB,oBAAoB,qBAAqB,GAAG,mCAAmC,oBAAoB,cAAc,aAAa,cAAc,GAAG,uBAAuB,kBAAkB,GAAG,6BAA6B,mBAAmB,GAAG,kCAAkC,qBAAqB,GAAG,4EAA4E,uBAAuB,oBAAoB,qBAAqB,GAAG,uEAAuE,mBAAmB,uBAAuB,gBAAgB,iBAAiB,kCAAkC,0BAA0B,GAAG,4HAA4H,oCAAoC,4BAA4B,sCAAsC,8BAA8B,GAAG,0BAA0B,2BAA2B,gBAAgB,uBAAuB,GAAG,4BAA4B,kBAAkB,GAAG,8WAA8W,mCAAmC,+BAA+B,2BAA2B,WAAW,YAAY,aAAa,mBAAmB,iBAAiB,uBAAuB,GAAG,mDAAmD,mCAAmC,GAAG,uEAAuE,eAAe,yDAAyD,uHAAuH,kCAAkC,mBAAmB,oBAAoB,sBAAsB,wBAAwB,0BAA0B,GAAG,6EAA6E,mCAAmC,cAAc,cAAc,eAAe,mBAAmB,oCAAoC,oBAAoB,sBAAsB,wBAAwB,GAAG,8IAA8I,kBAAkB,GAAG,mFAAmF,mCAAmC,cAAc,cAAc,gBAAgB,gBAAgB,iBAAiB,GAAG,yBAAyB,eAAe,gBAAgB,wBAAwB,uBAAuB,cAAc,eAAe,8BAA8B,4CAA4C,oCAAoC,GAAG,mCAAmC,8BAA8B,qCAAqC,6CAA6C,0CAA0C,6CAA6C,wCAAwC,gDAAgD,6CAA6C,gDAAgD,GAAG,iCAAiC,QAAQ,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,UAAU,8CAA8C,sCAAsC,KAAK,GAAG,iCAAiC,QAAQ,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,SAAS,8CAA8C,sCAAsC,KAAK,UAAU,8CAA8C,sCAAsC,KAAK,GAAG,uEAAuE,cAAc,iBAAiB,GAAG,uIAAuI,kBAAkB,GAAG,qDAAqD,eAAe,gBAAgB,iBAAiB,oBAAoB,GAAG,qDAAqD,iBAAiB,oBAAoB,mBAAmB,uBAAuB,uBAAuB,yBAAyB,kCAAkC,iCAAiC,GAAG,qDAAqD,aAAa,WAAW,oDAAoD,iBAAiB,gBAAgB,GAAG,kJAAkJ,aAAa,cAAc,gBAAgB,sBAAsB,yBAAyB,sBAAsB,GAAG,4BAA4B,yCAAyC,i0BAAi0B,iCAAiC,GAAG,sCAAsC,yCAAyC,6uCAA6uC,iCAAiC,GAAG,6BAA6B,yCAAyC,qrBAAqrB,iCAAiC,GAAG,uCAAuC,yCAAyC,q/BAAq/B,iCAAiC,GAAG,0UAA0U,sDAAsD,8CAA8C,sCAAsC,8BAA8B,gDAAgD,wCAAwC,GAAG,mSAAmS,eAAe,eAAe,GAAG,+FAA+F,kBAAkB,GAAG,yHAAyH,aAAa,GAAG,6XAA6X,cAAc,kBAAkB,GAAG,sbAAsb,WAAW,eAAe,GAAG,0IAA0I,aAAa,GAAG,kQAAkQ,cAAc,cAAc,eAAe,GAAG,+FAA+F,gBAAgB,iBAAiB,uBAAuB,8BAA8B,qBAAqB,GAAG,wDAAwD,uBAAuB,eAAe,gBAAgB,iBAAiB,kBAAkB,yCAAyC,GAAG,0DAA0D,uCAAuC,2wEAA2wE,uBAAuB,gBAAgB,iBAAiB,cAAc,aAAa,uBAAuB,sBAAsB,kDAAkD,0CAA0C,GAAG,gCAAgC,UAAU,wCAAwC,KAAK,GAAG,wBAAwB,UAAU,wCAAwC,gCAAgC,KAAK,GAAG,6FAA6F,mBAAmB,GAAG,yBAAyB,mBAAmB,gBAAgB,iBAAiB,GAAG,yBAAyB,wBAAwB,2BAA2B,GAAG,sBAAsB,uBAAuB,eAAe,gBAAgB,iBAAiB,kBAAkB,iBAAiB,iCAAiC,6CAA6C,ypCAAypC,8BAA8B,GAAG,0CAA0C,yBAAyB,sBAAsB,GAAG,4KAA4K,wEAAwE,wCAAwC,qCAAqC,KAAK,GAAG,4CAA4C,2BAA2B,wBAAwB,GAAG,yCAAyC,uCAAuC,GAAG,2CAA2C,gCAAgC,GAAG,2BAA2B,uBAAuB,eAAe,qBAAqB,oBAAoB,WAAW,aAAa,qBAAqB,GAAG,kCAAkC,4EAA4E,mBAAmB,sBAAsB,GAAG,gCAAgC,uBAAuB,gBAAgB,yDAAyD,wCAAwC,gBAAgB,uBAAuB,wCAAwC,GAAG,2CAA2C,uBAAuB,aAAa,eAAe,eAAe,gBAAgB,uCAAuC,s6DAAs6D,GAAG,kDAAkD,4EAA4E,mBAAmB,sBAAsB,GAAG,kCAAkC,uBAAuB,uBAAuB,kGAAkG,GAAG,uCAAuC,kBAAkB,GAAG,yFAAyF,mBAAmB,GAAG,mGAAmG,kBAAkB,GAAG,kCAAkC,eAAe,iBAAiB,kBAAkB,uBAAuB,kCAAkC,iCAAiC,sCAAsC,yBAAyB,WAAW,YAAY,gBAAgB,eAAe,GAAG,wBAAwB,yCAAyC,y0FAAy0F,+BAA+B,GAAG,gCAAgC,yCAAyC,qpEAAqpE,+BAA+B,GAAG,4CAA4C,mBAAmB,GAAG,iCAAiC,eAAe,iBAAiB,kBAAkB,uBAAuB,kCAAkC,iCAAiC,gCAAgC,yBAAyB,WAAW,YAAY,cAAc,aAAa,GAAG,uBAAuB,6CAA6C,quCAAquC,+BAA+B,GAAG,iCAAiC,oBAAoB,GAAG,2DAA2D,kBAAkB,GAAG,0CAA0C,kBAAkB,GAAG,2CAA2C,mBAAmB,GAAG,2BAA2B,eAAe,iBAAiB,kBAAkB,uBAAuB,kCAAkC,iCAAiC,gCAAgC,6CAA6C,67BAA67B,+BAA+B,yBAAyB,WAAW,YAAY,cAAc,aAAa,sBAAsB,GAAG,+BAA+B,kBAAkB,uBAAuB,gBAAgB,4EAA4E,wCAAwC,eAAe,uBAAuB,wCAAwC,GAAG,+BAA+B,kBAAkB,uBAAuB,aAAa,cAAc,eAAe,gBAAgB,6CAA6C,67BAA67B,iCAAiC,gCAAgC,+BAA+B,GAAG,sCAAsC,uFAAuF,mBAAmB,qBAAqB,GAAG,gCAAgC,yBAAyB,yBAAyB,kBAAkB,6BAA6B,0BAA0B,4BAA4B,8BAA8B,2BAA2B,wBAAwB,uBAAuB,iBAAiB,qBAAqB,GAAG,C;;;;;;;ACA10lC,6Q;;;;;;;;;;;;;;;;;;;;;;;ACA8G;AAC7D;AACyD;AAEtD;AAQpD;IA2BE,gCAAoB,KAAqB,EAAU,MAAsB;QAAzE,iBAKC;QALmB,UAAK,GAAL,KAAK,CAAgB;QAAU,WAAM,GAAN,MAAM,CAAgB;QApBzE,gBAAW,GAAiB,EAAE,CAAC;QAI/B,0BAAqB,GAAG,CAAC,CAAC;QAE1B,kBAAa,GAAG;YACd,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,QAAQ,EAAE,CAAC,GAAG,EAAE;YAChB,UAAU,EAAE,KAAK;YAEjB,QAAQ,EAAE,QAAQ;YAClB,aAAa,EAAE,GAAG;YAClB,aAAa,EAAE,KAAK;YACpB,WAAW,EAAE,CAAC,GAAG,CAAC;YAClB,WAAW,EAAE,CAAC,GAAG,EAAE;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI,CAAS,8CAA8C;SACrE,CAAC;QAGA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAM;YAChC,KAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;YAClC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAGD,oDAAmB,GAAnB;QACE,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAGD,2CAAU,GAAV,UAAW,KAAK;QADhB,iBAMC;QAJC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;YAC9B,KAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;QACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAED,4CAAW,GAAX;QACE,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,yCAAQ,GAAR;QAAA,iBAqCC;QApCC,IAAM,EAAE,GAAG,IAAI,0DAAQ,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,eAAe,EAAE,UAAC,KAAkB;YAClD,IAAI,gBAAgB,GAAG,KAAK,CAAC;YAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC1C,KAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,gBAAgB,GAAG,IAAI,CAAC;YAC1B,CAAC;YACD,IAAM,UAAU,GAAe,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAC/E,UAAU,CAAC,EAAE,CAAC,eAAe,EAAE,UAAC,CAAqB;gBACnD,IAAM,KAAK,GAAqB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC3D,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACnE,KAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;YACH,KAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAC,KAAkB;YACpD,IAAI,gBAAgB,GAAG,KAAK,CAAC;YAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC1C,KAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,gBAAgB,GAAG,IAAI,CAAC;YAC1B,CAAC;YACD,KAAI,CAAC,gBAAgB,CAAa,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAC9D,KAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,IAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,kBAAkB,GAAG,IAAI,CAAC,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC;QAC/H,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;aACxB,KAAK,CAAC,eAAK;YACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEJ,IAAI,CAAC,cAAc,GAAG,IAAI,wEAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjG,CAAC;IAEO,8CAAa,GAArB,UAAsB,UAAsB;QAC1C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAEO,iDAAgB,GAAxB,UAAyB,UAAsB;QAC7C,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;QACf,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACjD,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;gBACvC,KAAK,GAAG,CAAC,CAAC;gBACV,KAAK,CAAC;YACR,CAAC;QACH,CAAC;QACD,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACpC,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAED,6CAAY,GAAZ;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAAC,CAAC;QAAA,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,6CAAY,GAAZ,UAAa,gBAAyB;QACpC,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,aAAa,CAAC,UAAU,GAAG,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC;YAC/D,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAtFD;QADC,2EAAY,CAAC,qBAAqB,CAAC;;;;qEAGnC;IAGD;QADC,2EAAY,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAC;;;;4DAMzC;IA7CU,sBAAsB;QANlC,wEAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;;;YAG/B,aAAa,EAAE,0EAAiB,CAAC,IAAI;SACtC,CAAC;yCA4B2B,uEAAc,EAAkB,qEAAc;OA3B9D,sBAAsB,CA2HlC;IAAD,6BAAC;CAAA;AA3HkC;;;;;;;;;ACGnC;AAAA;IAAA;IAoVA,CAAC;IA/UW,uCAAc,GAAtB,UAAuB,IAAsB,EAAE,KAAa;QACxD,IAAM,GAAG,GAAuC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAC/E,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACN,kEAAkE;YAClE,mEAAmE;YACnE,uCAAuC;YACvC,IAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;YACjC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;YAC/B,oCAAoC;YACpC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,IAAI,EAAE,CAAC;QACrC,CAAC;IACL,CAAC;IAEO,wCAAe,GAAvB,UAAwB,IAAsB,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,MAAc,EAAE,OAAY;QAAjH,iBAqBC;QApBG,IAAM,cAAc,GAAG;YACnB,IAAI,EAAE,CAAC,GAAG,IAAI;YACd,GAAG,EAAE,CAAC,GAAG,IAAI;YACb,KAAK,EAAE,KAAK,GAAG,IAAI;YACnB,MAAM,EAAE,MAAM,GAAG,IAAI;SACxB,CAAC;QAEF,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEjC,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACf,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,QAAQ,IAAI,GAAG,EAAE,OAAO,CAAC,MAAM,IAAI,OAAO,EAC9E;gBACI,KAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBACjC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;gBAAC,CAAC;YAC1D,CAAC,CAAC,CAAC;QACX,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC;IAEO,sCAAa,GAArB,UAAsB,IAAsB;QACxC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;QACD,IAAM,KAAK,GAAuC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;YACjD,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC;QAChD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAC9C,CAAC;QACD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAEO,qCAAY,GAApB,UAAqB,IAAiB,EAAE,IAAY;QAChD,IAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED,6BAA6B;IACrB,kCAAS,GAAjB;QACI,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC;IAEO,kCAAS,GAAjB,UAAkB,IAAiB;QAC/B,IAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IAEO,iCAAQ,GAAhB,UAAiB,IAAiB;QAC9B,IAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAEO,0CAAiB,GAAzB,UAA0B,IAAY,EAAE,IAAY,EAAE,KAAa,EAAE,KAAa,EAAE,MAAc,EAAE,YAAoB;QACpH,IAAI,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,CAAC;QAEX,iEAAiE;QACjE,uDAAuD;QACvD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9B,IAAM,OAAO,GAAG,CAAC,CAAC;YAClB,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;YAE3C,2CAA2C;YAC3C,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;YACvC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;YAErC,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;YAC1B,EAAE,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChB,mCAAmC;gBACnC,MAAM,GAAG,IAAI,CAAC;gBACd,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;YAC9B,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;gBACvB,mCAAmC;gBACnC,MAAM,GAAG,IAAI,CAAC;gBACd,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;YAC9B,CAAC;YAED,IAAM,IAAI,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC;YAExC,8EAA8E;YAC9E,EAAE,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC5C,OAAO,GAAG,IAAI,CAAC;gBACf,YAAY,GAAG,OAAO,CAAC;gBACvB,WAAW,GAAG,MAAM,CAAC;gBACrB,UAAU,GAAG,OAAO,CAAC;gBACrB,UAAU,GAAG,OAAO,CAAC;YACzB,CAAC;QACL,CAAC;QACD,MAAM,CAAC;YACH,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,UAAU;YACtB,UAAU,EAAE,UAAU;YACtB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,YAAY,GAAG,WAAW;SACpC,CAAC;IACN,CAAC;IAAA,CAAC;IAEM,gCAAO,GAAf,UAAgB,QAA4B,EAAE,KAAa,EAAE,MAAc,EAAE,UAAkB,EAAE,SAAiB,EAAE,UAAmB,EACnI,QAAgB,EAAE,QAAgB,EAAE,OAAY;QAEhD,IAAI,YAAY,CAAC;QAEjB,IAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC9B,IAAI,UAAU,CAAC;QAEf,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACd,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAChG,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,kEAAkE;YAClE,IAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAC3E,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAC1F,CAAC;QAED,gEAAgE;QAChE,IAAI,CAAC,GAAG,CAAC,EACL,CAAC,GAAG,CAAC,CAAC;QACV,IAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAI,GAAG,CAAC;QACR,gFAAgF;QAChF,sFAAsF;QACtF,YAAY;QACZ,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClC,oBAAoB;gBACpB,GAAG,GAAG;oBACF,QAAQ,EAAE,EAAE;oBACZ,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,CAAC;iBACZ,CAAC;gBACF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;YACD,IAAM,IAAI,GAAqB,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxB,IAAI,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;YACzC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;YACvC,qFAAqF;YACrF,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,WAAW,GAAG,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;YACD,GAAG,CAAC,KAAK,IAAI,WAAW,CAAC;YACzB,GAAG,CAAC,MAAM,GAAG,YAAY,CAAC;QAC9B,CAAC;QACD,yDAAyD;QACzD,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,kBAAkB,GAAG,CAAC,CAAC;QAC3B,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACnC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACd,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;gBACpB,mEAAmE;gBACnE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC1D,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;YACtB,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;gBAC3B,kBAAkB,IAAI,CAAC,CAAC;YAC5B,CAAC;YACD,cAAc,IAAI,GAAG,CAAC,MAAM,CAAC;QACjC,CAAC;QACD,EAAE,CAAC,CAAC,cAAc,GAAG,MAAM,IAAI,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC;YACpD,qEAAqE;YACrE,IAAI,mBAAmB,GAAG,MAAM,GAAG,cAAc,CAAC;YAClD,cAAc,GAAG,CAAC,CAAC;YACnB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAClC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACf,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;oBACpB,4DAA4D;oBAC5D,IAAI,WAAW,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;oBAC3D,EAAE,CAAC,CAAC,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;wBACjE,4CAA4C;wBAC5C,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;oBAC7E,CAAC;oBACD,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;oBAChE,GAAG,CAAC,MAAM,IAAI,WAAW,CAAC;oBAC1B,mBAAmB,IAAI,WAAW,CAAC;oBACnC,kBAAkB,IAAI,CAAC,CAAC;gBAC5B,CAAC;gBACD,cAAc,IAAI,GAAG,CAAC,MAAM,CAAC;YACjC,CAAC;QACL,CAAC;QACD,qBAAqB;QACrB,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,gDAAgD;QAChD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACnC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACd,iBAAiB;YACjB,IAAM,aAAa,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YAChD,CAAC,GAAG,aAAa,CAAC;YAClB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,IAAM,IAAI,GAAqB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAE/C,IAAI,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;gBACzC,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC;gBAC1B,qFAAqF;gBACrF,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;oBACb,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;gBACtE,CAAC;gBACD,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;gBACjC,uCAAuC;gBACvC,IAAM,WAAW,GAAG,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;oBACpE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,cAAc,CAAC;oBACvC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;oBACrC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;oBACtC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;oBACrC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;gBAE3C,IAAM,YAAY,GAAG,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;oBACrE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,CAAC;oBACxC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC;oBACpC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,cAAc,CAAC;oBACvC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC;oBACpC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBAE5C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,GAAG,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC9F,CAAC,IAAI,WAAW,CAAC;YACrB,CAAC;YACD,CAAC,IAAI,YAAY,CAAC;QACtB,CAAC;IACL,CAAC;IAEO,0CAAiB,GAAzB,UAA0B,OAAoB;QAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC;IAC5C,CAAC;IAED,qCAAY,GAAZ;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC;QACX,CAAC;QACD,IAAI,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QACjC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACN,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC;QACjC,CAAC;QAED,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC;YAC/C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;YACpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;QAC5D,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;YAC7C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QAE3D,IAAM,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC;QAEtC,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,aAAa,GAAG,CAAC,CAAC;QAEtB,IAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CACvC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,GAAG,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC3E,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC5B,IAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CACzC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,GAAG,GAAG,EAAE,GAAG,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACvF,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAE5B,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,QAAQ,WAAE,SAAS,UAAC;YAExB,EAAE,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClD,kEAAkE;gBAClE,qBAAqB;gBACrB,QAAQ,GAAG,KAAK,CAAC;gBACjB,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACzD,SAAS,GAAG,SAAS,CAAC;gBACtB,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,uEAAuE;gBACvE,oBAAoB;gBACpB,SAAS,GAAG,MAAM,CAAC;gBACnB,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACvD,UAAU,GAAG,QAAQ,CAAC;gBACtB,aAAa,GAAG,KAAK,GAAG,UAAU,CAAC;YACvC,CAAC;YACD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAC3F,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC9C,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,SAAS,EACjF,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzF,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EACtF,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC/D,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAClE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClG,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACtD,IAAI;gBACA,yCAAyC;gBACzC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAChF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,SAAS,EACjF,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzF,CAAC;IACL,CAAC;IAED,4CAAmB,GAAnB,UAAoB,SAAS,EAAE,IAAI;QAC/B,IAAI,CAAC,IAAI,GAAG;YACR,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAG,CAAC;YACzD,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAG,EAAE;YAC1D,UAAU,EAAE,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,KAAK;YAC/D,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK;YACtD,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,QAAQ;YAC5D,aAAa,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,GAAG,GAAG;YACtE,aAAa,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,GAAG,KAAK;YACxE,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC;YAClE,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE;YACnE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI;SAC3D,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACtF,CAAC;IAED,yCAAgB,GAAhB,UAAiB,OAA8B;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;IACxB,CAAC;IAEL,qBAAC;AAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;ACnWsF;AACzC;AAM9C;IAAA;IAkBA,CAAC;IAZG,gDAAe,GAAf;QACI,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACpE,CAAC;IAGD,sBAAI,8CAAU;aAAd,UAAe,UAAsB;YACjC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;gBACpB,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACpE,CAAC;QACL,CAAC;;;OAAA;IAd0B;QAA1B,0EAAS,CAAC,cAAc,CAAC;kCAAa,iEAAU;8DAAC;IASlD;QADC,oEAAK,EAAE;kCACmB,4DAAU;yCAAV,4DAAU;4DAKpC;IAhBQ,sBAAsB;QAJlC,wEAAS,CAAC;YACP,QAAQ,EAAE,cAAc;YACxB,QAAQ,EAAE,+BAA+B;SAC5C,CAAC;OACW,sBAAsB,CAkBlC;IAAD,6BAAC;CAAA;AAlBkC;;;;;;;;ACPnC,mB;;;;;;;ACAA,wD;;;;;;;;;;;;;;;;;;;ACAkD;AAOlD;IAEE;IAAgB,CAAC;IAEjB,0CAAQ,GAAR;IACA,CAAC;IALU,uBAAuB;QALnC,wEAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;;;SAGhC,CAAC;;OACW,uBAAuB,CAOnC;IAAD,8BAAC;CAAA;AAPmC;;;;;;;;;;;;;;;;;;;;;ACPO;AACJ;AAGvC;IAKE;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,6DAAO,EAAU,CAAC;IACxC,CAAC;IAED,6BAAO,GAAP;QACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,gCAAU,GAAV,UAAW,IAAY;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAhBU,WAAW;QADvB,yEAAU,EAAE;;OACA,WAAW,CAkBvB;IAAD,kBAAC;CAAA;AAlBuB;;;;;;;;;;;;;;;;;ACJmB;AAI3C;IAAA;IA6BA,CAAC;IAzBG,0CAAoB,GAApB;QAAA,iBAuBC;QAtBG,MAAM,CAAC,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,EAAE,CAAC,CAAC,CAAC,CAAC,KAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;gBAC3B,OAAO,CAAC,KAAI,CAAC,iBAAiB,CAAC,CAAC;YACpC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;oBACvG,4BAA4B,CAAC;gBACjC,IAAM,MAAI,GAAG,IAAI,cAAc,EAAE,CAAC;gBAElC,MAAI,CAAC,kBAAkB,GAAG;oBACtB,EAAE,CAAC,CAAC,MAAI,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC;wBACxB,EAAE,CAAC,CAAC,MAAI,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC;4BACtB,KAAI,CAAC,iBAAiB,GAAG,MAAI,CAAC,YAAY,CAAC;4BAC3C,OAAO,CAAC,MAAI,CAAC,YAAY,CAAC,CAAC;wBAC/B,CAAC;wBAAC,IAAI,CAAC,CAAC;4BACJ,MAAM,CAAC,kCAAkC,CAAC,CAAC;wBAC/C,CAAC;oBACL,CAAC;oBAAA,CAAC;gBACN,CAAC;gBACD,MAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;gBAC5B,MAAI,CAAC,IAAI,EAAE,CAAC;YAChB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IA3BQ,WAAW;QADvB,yEAAU,EAAE;OACA,WAAW,CA6BvB;IAAD,kBAAC;CAAA;AA7BuB;;;;;;;;;ACJxB;AAAA,mFAAmF;AACnF,8FAA8F;AAC9F,yEAAyE;AACzE,gFAAgF;AAEzE,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;CAClB,CAAC;;;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC,CAAC","file":"main.bundle.js","sourcesContent":["\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Stream_1 = require(\"./Stream\");\n/**\n * Represents each one of the user's connection to the session (the local one and other user's connections).\n * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection\n */\nvar Connection = /** @class */ (function () {\n /**\n * @hidden\n */\n function Connection(session, opts) {\n this.session = session;\n /**\n * @hidden\n */\n this.disposed = false;\n var msg = \"'Connection' created \";\n if (!!opts) {\n msg += \"(remote) with 'connectionId' [\" + opts.id + ']';\n }\n else {\n msg += '(local)';\n }\n console.info(msg);\n this.options = opts;\n if (!!opts) {\n // Connection is remote\n this.connectionId = opts.id;\n if (opts.metadata) {\n this.data = opts.metadata;\n }\n if (opts.streams) {\n this.initRemoteStreams(opts.streams);\n }\n }\n this.creationTime = new Date().getTime();\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Connection.prototype.sendIceCandidate = function (candidate) {\n console.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote'), 'candidate for', this.connectionId, JSON.stringify(candidate));\n this.session.openvidu.sendRequest('onIceCandidate', {\n endpointName: this.connectionId,\n candidate: candidate.candidate,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex\n }, function (error, response) {\n if (error) {\n console.error('Error sending ICE candidate: '\n + JSON.stringify(error));\n }\n });\n };\n /**\n * @hidden\n */\n Connection.prototype.initRemoteStreams = function (options) {\n var _this = this;\n // This is ready for supporting multiple streams per Connection object. Right now the loop will always run just once\n // this.stream should also be replaced by a collection of streams to support multiple streams per Connection\n options.forEach(function (opts) {\n var streamOptions = {\n id: opts.id,\n connection: _this,\n frameRate: opts.frameRate,\n recvAudio: opts.audioActive,\n recvVideo: opts.videoActive,\n typeOfVideo: opts.typeOfVideo\n };\n var stream = new Stream_1.Stream(_this.session, streamOptions);\n _this.addStream(stream);\n });\n console.info(\"Remote 'Connection' with 'connectionId' [\" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts);\n };\n /**\n * @hidden\n */\n Connection.prototype.addStream = function (stream) {\n stream.connection = this;\n this.stream = stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.removeStream = function (streamId) {\n delete this.stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.dispose = function () {\n if (!!this.stream) {\n delete this.stream;\n }\n this.disposed = true;\n };\n return Connection;\n}());\nexports.Connection = Connection;\n//# sourceMappingURL=Connection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Connection.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Connection.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState_1 = require(\"../OpenViduInternal/Enums/LocalRecorderState\");\n/**\n * Easy recording of [[Stream]] objects straightaway from the browser.\n *\n * > WARNING: Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case\n */\nvar LocalRecorder = /** @class */ (function () {\n /**\n * @hidden\n */\n function LocalRecorder(stream) {\n this.stream = stream;\n this.chunks = [];\n this.count = 0;\n this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection';\n this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord';\n this.state = LocalRecorderState_1.LocalRecorderState.READY;\n }\n /**\n * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not\n */\n LocalRecorder.prototype.record = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (typeof MediaRecorder === 'undefined') {\n console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder');\n throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'));\n }\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) {\n throw (Error('\\'LocalRecord.record()\\' needs \\'LocalRecord.state\\' to be \\'READY\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.clean()\\' or init a new LocalRecorder before'));\n }\n console.log(\"Starting local recording of stream '\" + _this.stream.streamId + \"' of connection '\" + _this.connectionId + \"'\");\n if (typeof MediaRecorder.isTypeSupported === 'function') {\n var options = void 0;\n if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) {\n options = { mimeType: 'video/webm;codecs=vp9' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) {\n options = { mimeType: 'video/webm;codecs=h264' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) {\n options = { mimeType: 'video/webm;codecs=vp8' };\n }\n console.log('Using mimeType ' + options.mimeType);\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream(), options);\n }\n else {\n console.warn('isTypeSupported is not supported, using default codecs for browser');\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream());\n }\n _this.mediaRecorder.start(10);\n }\n catch (err) {\n reject(err);\n }\n _this.mediaRecorder.ondataavailable = function (e) {\n _this.chunks.push(e.data);\n };\n _this.mediaRecorder.onerror = function (e) {\n console.error('MediaRecorder error: ', e);\n };\n _this.mediaRecorder.onstart = function () {\n console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n };\n _this.mediaRecorder.onpause = function () {\n console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onresume = function () {\n console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onwarning = function (e) {\n console.log('MediaRecorder warning: ' + e);\n };\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n resolve();\n });\n };\n /**\n * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not\n */\n LocalRecorder.prototype.stop = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.stop()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' or \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' before'));\n }\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n resolve();\n };\n _this.mediaRecorder.stop();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not\n */\n LocalRecorder.prototype.pause = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) {\n reject(Error('\\'LocalRecord.pause()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' or \\'LocalRecorder.resume()\\' before'));\n }\n _this.mediaRecorder.pause();\n _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not\n */\n LocalRecorder.prototype.resume = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) {\n throw (Error('\\'LocalRecord.resume()\\' needs \\'LocalRecord.state\\' to be \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.pause()\\' before'));\n }\n _this.mediaRecorder.resume();\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.preview = function (parentElement) {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.preview()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n this.videoPreview = document.createElement('video');\n this.videoPreview.id = this.id;\n this.videoPreview.autoplay = true;\n if (typeof parentElement === 'string') {\n this.htmlParentElementId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.videoPreview = parentElementDom.appendChild(this.videoPreview);\n }\n }\n else {\n this.htmlParentElementId = parentElement.id;\n this.videoPreview = parentElement.appendChild(this.videoPreview);\n }\n this.videoPreview.src = this.videoPreviewSrc;\n return this.videoPreview;\n };\n /**\n * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again\n */\n LocalRecorder.prototype.clean = function () {\n var _this = this;\n var f = function () {\n delete _this.blob;\n _this.chunks = [];\n _this.count = 0;\n delete _this.mediaRecorder;\n _this.state = LocalRecorderState_1.LocalRecorderState.READY;\n };\n if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) {\n this.stop().then(function () { return f(); })[\"catch\"](function () { return f(); });\n }\n else {\n f();\n }\n };\n /**\n * Downloads the recorded video through the browser. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.download = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.download()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var a = document.createElement('a');\n a.style.display = 'none';\n document.body.appendChild(a);\n var url = window.URL.createObjectURL(this.blob);\n a.href = url;\n a.download = this.id + '.webm';\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n };\n /**\n * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.getBlob = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('Call \\'LocalRecord.stop()\\' before getting Blob file'));\n }\n else {\n return this.blob;\n }\n };\n /**\n * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not\n */\n LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsBinary()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_1 = new XMLHttpRequest();\n http_1.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_1.setRequestHeader(key, headers[key]);\n }\n }\n http_1.onreadystatechange = function () {\n if (http_1.readyState === 4) {\n if (http_1.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_1.responseText);\n }\n else {\n reject(http_1.status);\n }\n }\n };\n http_1.send(_this.blob);\n }\n });\n };\n /**\n * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not:\n */\n LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsMultipartfile()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_2 = new XMLHttpRequest();\n http_2.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_2.setRequestHeader(key, headers[key]);\n }\n }\n var sendable = new FormData();\n sendable.append('file', _this.blob, _this.id + '.webm');\n http_2.onreadystatechange = function () {\n if (http_2.readyState === 4) {\n if (http_2.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_2.responseText);\n }\n else {\n reject(http_2.status);\n }\n }\n };\n http_2.send(sendable);\n }\n });\n };\n /* Private methods */\n LocalRecorder.prototype.onStopDefault = function () {\n console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + ')');\n this.blob = new Blob(this.chunks, { type: 'video/webm' });\n this.chunks = [];\n this.videoPreviewSrc = window.URL.createObjectURL(this.blob);\n this.state = LocalRecorderState_1.LocalRecorderState.FINISHED;\n };\n return LocalRecorder;\n}());\nexports.LocalRecorder = LocalRecorder;\n//# sourceMappingURL=LocalRecorder.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorder_1 = require(\"./LocalRecorder\");\nvar Publisher_1 = require(\"./Publisher\");\nvar Session_1 = require(\"./Session\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar screenSharingAuto = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto\");\nvar screenSharing = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing\");\nvar RpcBuilder = require(\"../OpenViduInternal/KurentoUtils/kurento-jsonrpc\");\nvar platform = require(\"platform\");\n/**\n * Entrypoint of OpenVidu Browser library.\n * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]]\n */\nvar OpenVidu = /** @class */ (function () {\n function OpenVidu() {\n /**\n * @hidden\n */\n this.secret = '';\n /**\n * @hidden\n */\n this.recorder = false;\n /**\n * @hidden\n */\n this.advancedConfiguration = {};\n console.info(\"'OpenVidu' initialized\");\n }\n /**\n * Returns new session\n */\n OpenVidu.prototype.initSession = function () {\n this.session = new Session_1.Session(this);\n return this.session;\n };\n /**\n * Returns a new publisher\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object will dispatch an `accessDialogOpened` event, only if the pop-up shown by the browser to request permissions for the camera is opened. You can use this event to alert the user about granting permissions\n * for your website. An `accessDialogClosed` event will also be dispatched after user clicks on \"Allow\" or \"Block\" in the pop-up.\n *\n * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not.\n *\n * The [[Publisher]] object will dispatch a `videoElementCreated` event once a HTML video element has been added to DOM (only if you\n * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more.\n *\n * The [[Publisher]] object will dispatch a `streamPlaying` event once the local streams starts playing. See [[StreamManagerEvent]] to learn more.\n *\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Publisher.\n * You can always call method [[Publisher.addVideoElement]] or [[Publisher.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section)\n * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails.\n * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event\n */\n OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) {\n var properties;\n if (!!param2 && (typeof param2 !== 'function')) {\n // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)'\n properties = param2;\n properties = {\n audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined,\n frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined),\n insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true,\n publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true,\n publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true,\n resolution: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'),\n videoSource: (typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined\n };\n }\n else {\n // Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)'\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: true,\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n };\n }\n var publisher = new Publisher_1.Publisher(targetElement, properties, this);\n var completionHandler;\n if (!!param2 && (typeof param2 === 'function')) {\n completionHandler = param2;\n }\n else if (!!param3) {\n completionHandler = param3;\n }\n publisher.initialize()\n .then(function () {\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n publisher.emitEvent('accessAllowed', []);\n })[\"catch\"](function (error) {\n if (completionHandler !== undefined) {\n completionHandler(error);\n }\n publisher.emitEvent('accessDenied', []);\n });\n return publisher;\n };\n OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var publisher;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(publisher);\n }\n };\n if (!!properties) {\n publisher = _this.initPublisher(targetElement, properties, callback);\n }\n else {\n publisher = _this.initPublisher(targetElement, callback);\n }\n });\n };\n /**\n * Returns a new local recorder for recording streams straight away from the browser\n * @param stream Stream to record\n */\n OpenVidu.prototype.initLocalRecorder = function (stream) {\n return new LocalRecorder_1.LocalRecorder(stream);\n };\n /**\n * Checks if the browser supports OpenVidu\n * @returns 1 if the browser supports OpenVidu, 0 otherwise\n */\n OpenVidu.prototype.checkSystemRequirements = function () {\n var browser = platform.name;\n var version = platform.version;\n if ((browser !== 'Chrome') && (browser !== 'Chrome Mobile') &&\n (browser !== 'Firefox') && (browser !== 'Firefox Mobile') && (browser !== 'Firefox for iOS') &&\n (browser !== 'Opera') && (browser !== 'Opera Mobile') &&\n (browser !== 'Safari')) {\n return 0;\n }\n else {\n return 1;\n }\n };\n /**\n * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method\n */\n OpenVidu.prototype.getDevices = function () {\n return new Promise(function (resolve, reject) {\n navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) {\n var devices = [];\n deviceInfos.forEach(function (deviceInfo) {\n if (deviceInfo.kind === 'audioinput' || deviceInfo.kind === 'videoinput') {\n devices.push({\n kind: deviceInfo.kind,\n deviceId: deviceInfo.deviceId,\n label: deviceInfo.label\n });\n }\n });\n resolve(devices);\n })[\"catch\"](function (error) {\n console.error('Error getting devices', error);\n reject(error);\n });\n });\n };\n /**\n * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]])\n *\n * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution`\n *\n * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound:\n * ```\n * var OV = new OpenVidu();\n * var FRAME_RATE = 10;\n *\n * OV.getUserMedia({\n * audioSource: false;\n * videoSource: undefined,\n * resolution: '1280x720',\n * frameRate: FRAME_RATE\n * })\n * .then(mediaStream => {\n *\n * var videoTrack = mediaStream.getVideoTracks()[0];\n * var video = document.createElement('video');\n * video.srcObject = new MediaStream([videoTrack]);\n *\n * var canvas = document.createElement('canvas');\n * var ctx = canvas.getContext('2d');\n * ctx.filter = 'grayscale(100%)';\n *\n * video.addEventListener('play', () => {\n * var loop = () => {\n * if (!video.paused && !video.ended) {\n * ctx.drawImage(video, 0, 0, 300, 170);\n * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps\n * }\n * };\n * loop();\n * });\n * video.play();\n *\n * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0];\n * var publisher = this.OV.initPublisher(\n * myHtmlTarget,\n * {\n * audioSource: false,\n * videoSource: grayVideoTrack\n * });\n * });\n * ```\n */\n OpenVidu.prototype.getUserMedia = function (options) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.generateMediaConstraints(options)\n .then(function (constraints) {\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (mediaStream) {\n resolve(mediaStream);\n })[\"catch\"](function (error) {\n var errorName;\n var errorMessage = error.toString();\n if (!(options.videoSource === 'screen')) {\n errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED;\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED;\n }\n reject(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /* tslint:disable:no-empty */\n /**\n * Disable all logging except error level\n */\n OpenVidu.prototype.enableProdMode = function () {\n console.log = function () { };\n console.debug = function () { };\n console.info = function () { };\n console.warn = function () { };\n };\n /* tslint:enable:no-empty */\n /**\n * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details):\n * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser\n * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)\n * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature\n */\n OpenVidu.prototype.setAdvancedConfiguration = function (configuration) {\n this.advancedConfiguration = configuration;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var audio, video;\n if (publisherProperties.audioSource === null || publisherProperties.audioSource === false) {\n audio = false;\n }\n else if (publisherProperties.audioSource === undefined) {\n audio = true;\n }\n else {\n audio = publisherProperties.audioSource;\n }\n if (publisherProperties.videoSource === null || publisherProperties.videoSource === false) {\n video = false;\n }\n else {\n video = {\n height: {\n ideal: 480\n },\n width: {\n ideal: 640\n }\n };\n }\n var mediaConstraints = {\n audio: audio,\n video: video\n };\n if (typeof mediaConstraints.audio === 'string') {\n mediaConstraints.audio = { deviceId: { exact: mediaConstraints.audio } };\n }\n if (mediaConstraints.video) {\n if (!!publisherProperties.resolution) {\n var widthAndHeight = publisherProperties.resolution.toLowerCase().split('x');\n var width = Number(widthAndHeight[0]);\n var height = Number(widthAndHeight[1]);\n mediaConstraints.video.width.ideal = width;\n mediaConstraints.video.height.ideal = height;\n }\n if (!!publisherProperties.frameRate) {\n mediaConstraints.video.frameRate = { ideal: publisherProperties.frameRate };\n }\n if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') {\n if (publisherProperties.videoSource === 'screen') {\n if (platform.name !== 'Chrome' && platform.name !== 'Firefox') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name);\n console.error(error);\n reject(error);\n }\n else {\n if (!!_this.advancedConfiguration.screenShareChromeExtension) {\n // Custom screen sharing extension for Chrome\n var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim();\n screenSharing.getChromeExtensionStatus(extensionId, function (status) {\n if (status === 'installed-enabled') {\n screenSharing.getScreenConstraints(function (error, screenConstraints) {\n if (!!error && error === 'permission-denied') {\n var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_1);\n reject(error_1);\n }\n else {\n mediaConstraints.video = screenConstraints;\n resolve(mediaConstraints);\n }\n });\n }\n if (status === 'installed-disabled') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error);\n reject(error);\n }\n if (status === 'not-installed') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension);\n console.error(error);\n reject(error);\n }\n });\n }\n else {\n // Default screen sharing extension for Chrome\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (!!error) {\n if (error === 'not-installed') {\n var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_2);\n reject(error_2);\n }\n else if (error === 'installed-disabled') {\n var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error_3);\n reject(error_3);\n }\n else if (error === 'permission-denied') {\n var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_4);\n reject(error_4);\n }\n }\n else {\n mediaConstraints.video = screenConstraints.video;\n resolve(mediaConstraints);\n }\n });\n }\n publisherProperties.videoSource = 'screen';\n }\n }\n else {\n // tslint:disable-next-line:no-string-literal\n mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource };\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n });\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.startWs = function (onConnectSucces) {\n var config = {\n heartbeat: 5000,\n sendCloseMessage: false,\n ws: {\n uri: this.wsUri,\n useSockJS: false,\n onconnected: onConnectSucces,\n ondisconnect: this.disconnectCallback.bind(this),\n onreconnecting: this.reconnectingCallback.bind(this),\n onreconnected: this.reconnectedCallback.bind(this)\n },\n rpc: {\n requestTimeout: 15000,\n participantJoined: this.session.onParticipantJoined.bind(this.session),\n participantPublished: this.session.onParticipantPublished.bind(this.session),\n participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),\n participantLeft: this.session.onParticipantLeft.bind(this.session),\n participantEvicted: this.session.onParticipantEvicted.bind(this.session),\n recordingStarted: this.session.onRecordingStarted.bind(this.session),\n recordingStopped: this.session.onRecordingStopped.bind(this.session),\n sendMessage: this.session.onNewMessage.bind(this.session),\n iceCandidate: this.session.recvIceCandidate.bind(this.session),\n mediaError: this.session.onMediaError.bind(this.session)\n }\n };\n this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.closeWs = function () {\n this.jsonRpcClient.close();\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.sendRequest = function (method, params, callback) {\n if (params && params instanceof Function) {\n callback = params;\n params = {};\n }\n console.debug('Sending request: {method:\"' + method + '\", params: ' + JSON.stringify(params) + '}');\n this.jsonRpcClient.send(method, params, callback);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.isMediaStreamTrack = function (mediaSource) {\n var is = (!!mediaSource &&\n mediaSource.enabled !== undefined && typeof mediaSource.enabled === 'boolean' &&\n mediaSource.id !== undefined && typeof mediaSource.id === 'string' &&\n mediaSource.kind !== undefined && typeof mediaSource.kind === 'string' &&\n mediaSource.label !== undefined && typeof mediaSource.label === 'string' &&\n mediaSource.muted !== undefined && typeof mediaSource.muted === 'boolean' &&\n mediaSource.readyState !== undefined && typeof mediaSource.readyState === 'string');\n return is;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getWsUri = function () {\n return this.wsUri;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getSecret = function () {\n return this.secret;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getRecorder = function () {\n return this.recorder;\n };\n /* Private methods */\n OpenVidu.prototype.disconnectCallback = function () {\n console.warn('Websocket connection lost');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectingCallback = function () {\n console.warn('Websocket connection lost (reconnecting)');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectedCallback = function () {\n console.warn('Websocket reconnected');\n };\n OpenVidu.prototype.isRoomAvailable = function () {\n if (this.session !== undefined && this.session instanceof Session_1.Session) {\n return true;\n }\n else {\n console.warn('Session instance not found');\n return false;\n }\n };\n return OpenVidu;\n}());\nexports.OpenVidu = OpenVidu;\n//# sourceMappingURL=OpenVidu.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Session_1 = require(\"./Session\");\nvar Stream_1 = require(\"./Stream\");\nvar StreamManager_1 = require(\"./StreamManager\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\n/**\n * Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method\n */\nvar Publisher = /** @class */ (function (_super) {\n __extends(Publisher, _super);\n /**\n * @hidden\n */\n function Publisher(targEl, properties, openvidu) {\n var _this = _super.call(this, new Stream_1.Stream((!!openvidu.session) ? openvidu.session : new Session_1.Session(openvidu), { publisherProperties: properties, mediaConstraints: {} }), targEl) || this;\n _this.openvidu = openvidu;\n /**\n * Whether the Publisher has been granted access to the requested input devices or not\n */\n _this.accessAllowed = false;\n /**\n * Whether you have called [[Publisher.subscribeToRemote]] with value `true` or `false` (*false* by default)\n */\n _this.isSubscribedToRemote = false;\n _this.accessDenied = false;\n _this.properties = properties;\n _this.stream.ee.on('local-stream-destroyed-by-disconnect', function (reason) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', _this.stream, reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n });\n return _this;\n }\n /**\n * Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the audio stream, `false` to unpublish it\n */\n Publisher.prototype.publishAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its audio stream');\n };\n /**\n * Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the video stream, `false` to unpublish it\n */\n Publisher.prototype.publishVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its video stream');\n };\n /**\n * Call this method before [[Session.publish]] to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.\n */\n Publisher.prototype.subscribeToRemote = function (value) {\n value = (value !== undefined) ? value : true;\n this.isSubscribedToRemote = value;\n this.stream.subscribeToMyRemote(value);\n };\n /**\n * See [[EventDispatcher.on]]\n */\n Publisher.prototype.on = function (type, handler) {\n var _this = this;\n _super.prototype.on.call(this, type, handler);\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isLocalStreamPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.ee.on('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video &&\n this.videos[0].video.currentTime > 0 &&\n this.videos[0].video.paused === false &&\n this.videos[0].video.ended === false &&\n this.videos[0].video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);\n }\n }\n if (type === 'accessAllowed') {\n if (this.accessAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.accessDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Publisher.prototype.once = function (type, handler) {\n var _this = this;\n _super.prototype.once.call(this, type, handler);\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isLocalStreamPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.ee.once('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video &&\n this.videos[0].video.currentTime > 0 &&\n this.videos[0].video.paused === false &&\n this.videos[0].video.ended === false &&\n this.videos[0].video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);\n }\n }\n if (type === 'accessAllowed') {\n if (this.accessAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.accessDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Publisher.prototype.initialize = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var errorCallback = function (openViduError) {\n _this.accessDenied = true;\n _this.accessAllowed = false;\n reject(openViduError);\n };\n var successCallback = function (mediaStream) {\n _this.accessAllowed = true;\n _this.accessDenied = false;\n if (_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)) {\n mediaStream.removeTrack(mediaStream.getAudioTracks()[0]);\n mediaStream.addTrack(_this.properties.audioSource);\n }\n if (_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)) {\n mediaStream.removeTrack(mediaStream.getVideoTracks()[0]);\n mediaStream.addTrack(_this.properties.videoSource);\n }\n // Apply PublisherProperties.publishAudio and PublisherProperties.publishVideo\n if (!!mediaStream.getAudioTracks()[0]) {\n mediaStream.getAudioTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishAudio;\n }\n if (!!mediaStream.getVideoTracks()[0]) {\n mediaStream.getVideoTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo;\n }\n _this.stream.setMediaStream(mediaStream);\n if (!_this.stream.displayMyRemote()) {\n // When we are subscribed to our remote we don't still set the MediaStream object in the video elements to\n // avoid early 'streamPlaying' event\n _this.stream.updateMediaStreamInVideos();\n }\n _this.stream.isLocalStreamReadyToPublish = true;\n _this.stream.ee.emitEvent('stream-ready-to-publish', []);\n if (!!_this.firstVideoElement) {\n _this.createVideoElement(_this.firstVideoElement.targetElement, _this.properties.insertMode);\n }\n delete _this.firstVideoElement;\n resolve();\n };\n _this.openvidu.generateMediaConstraints(_this.properties)\n .then(function (constraints) {\n var outboundStreamOptions = {\n mediaConstraints: constraints,\n publisherProperties: _this.properties\n };\n _this.stream.setOutboundStreamOptions(outboundStreamOptions);\n var constraintsAux = {};\n var timeForDialogEvent = 1250;\n if (_this.stream.isSendVideo() || _this.stream.isSendAudio()) {\n var definedAudioConstraint_1 = ((constraints.audio === undefined) ? true : constraints.audio);\n constraintsAux.audio = _this.stream.isSendScreen() ? false : definedAudioConstraint_1;\n constraintsAux.video = constraints.video;\n var startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (mediaStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n if (_this.stream.isSendScreen() && _this.stream.isSendAudio()) {\n // When getting desktop as user media audio constraint must be false. Now we can ask for it if required\n constraintsAux.audio = definedAudioConstraint_1;\n constraintsAux.video = false;\n startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (audioOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n mediaStream.addTrack(audioOnlyStream.getAudioTracks()[0]);\n successCallback(mediaStream);\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n var errorName, errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n break;\n case 'notallowederror':\n errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED;\n errorMessage = error.toString();\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.video.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n break;\n }\n });\n }\n else {\n successCallback(mediaStream);\n }\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n var errorName, errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n navigator.mediaDevices.getUserMedia({\n audio: false,\n video: constraints.video\n })\n .then(function (mediaStream) {\n mediaStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n })[\"catch\"](function (e) {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n break;\n case 'notallowederror':\n errorName = _this.stream.isSendScreen() ? OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED : OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED;\n errorMessage = error.toString();\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n break;\n case 'overconstrainederror':\n navigator.mediaDevices.getUserMedia({\n audio: false,\n video: constraints.video\n })\n .then(function (mediaStream) {\n mediaStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.audio.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n })[\"catch\"](function (e) {\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = \"Video input device with deviceId '\" + constraints.video.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Video input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n break;\n }\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET, \"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'\"));\n }\n })[\"catch\"](function (error) {\n errorCallback(error);\n });\n });\n };\n /**\n * @hidden\n */\n Publisher.prototype.updateSession = function (session) {\n this.session = session;\n this.stream.session = session;\n };\n /**\n * @hidden\n */\n Publisher.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Publisher.prototype.reestablishStreamPlayingEvent = function () {\n if (this.ee.getListeners('streamPlaying').length > 0) {\n this.addPlayEventToFirstVideo();\n }\n };\n /* Private methods */\n Publisher.prototype.setPermissionDialogTimer = function (waitTime) {\n var _this = this;\n this.permissionDialogTimeout = setTimeout(function () {\n _this.ee.emitEvent('accessDialogOpened', []);\n }, waitTime);\n };\n Publisher.prototype.clearPermissionDialogTimer = function (startTime, waitTime) {\n clearTimeout(this.permissionDialogTimeout);\n if ((Date.now() - startTime) > waitTime) {\n // Permission dialog was shown and now is closed\n this.ee.emitEvent('accessDialogClosed', []);\n }\n };\n return Publisher;\n}(StreamManager_1.StreamManager));\nexports.Publisher = Publisher;\n//# sourceMappingURL=Publisher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Publisher.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Connection_1 = require(\"./Connection\");\nvar Subscriber_1 = require(\"./Subscriber\");\nvar ConnectionEvent_1 = require(\"../OpenViduInternal/Events/ConnectionEvent\");\nvar RecordingEvent_1 = require(\"../OpenViduInternal/Events/RecordingEvent\");\nvar SessionDisconnectedEvent_1 = require(\"../OpenViduInternal/Events/SessionDisconnectedEvent\");\nvar SignalEvent_1 = require(\"../OpenViduInternal/Events/SignalEvent\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar platform = require(\"platform\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Represents a video call. It can also be seen as a videoconference room where multiple users can connect.\n * Participants who publish their videos to a session can be seen by the rest of users connected to that specific session.\n * Initialized with [[OpenVidu.initSession]] method\n */\nvar Session = /** @class */ (function () {\n /**\n * @hidden\n */\n function Session(openvidu) {\n /**\n * Collection of all StreamManagers of this Session ([[Publisher]] and [[Subscriber]])\n */\n this.streamManagers = [];\n // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification\n /**\n * @hidden\n */\n this.remoteStreamsCreated = {};\n /**\n * @hidden\n */\n this.remoteConnections = {};\n /**\n * @hidden\n */\n this.speakingEventsEnabled = false;\n this.ee = new EventEmitter();\n this.openvidu = openvidu;\n }\n /**\n * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when\n * they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standarized format\n * as JSON or XML is a good idea), the only restriction is a maximum length of 10000 chars.\n *\n * This metadata is not considered secure, as it is generated in the client side. To pass securized data, add it as a parameter in the\n * token generation operation (through the API REST, openvidu-java-client or openvidu-node-client).\n *\n * Only after the returned Promise is successfully resolved [[Session.connection]] object will be available and properly defined.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will first dispatch one or more `connectionCreated` events upon successful termination of this method:\n * - First one for your own local Connection object, so you can retrieve [[Session.connection]] property.\n * - Then one for each remote Connection previously connected to the Session, if any. Any other remote user connecting to the Session after you have\n * successfully connected will also dispatch a `connectionCreated` event when they do so.\n *\n * The [[Session]] object of the local participant will also dispatch a `streamCreated` event for each remote active [[Publisher]] that was already streaming\n * when connecting, just after dispatching all remote `connectionCreated` events.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionCreated` event.\n *\n * See [[ConnectionEvent]] and [[StreamEvent]] to learn more.\n *\n * @returns A Promise to which you must subscribe that is resolved if the the connection to the Session was successful and rejected with an Error object if not\n *\n */\n Session.prototype.connect = function (token, metadata) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.processToken(token);\n if (_this.openvidu.checkSystemRequirements()) {\n // Early configuration to deactivate automatic subscription to streams\n _this.options = {\n sessionId: _this.sessionId,\n participantId: token,\n metadata: !!metadata ? _this.stringClientMetadata(metadata) : ''\n };\n _this.connectAux(token).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));\n }\n });\n };\n /**\n * Leaves the session, destroying all streams and deleting the user as a participant.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event.\n * This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).\n * For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event.\n * Call `event.preventDefault()` uppon event `sessionDisconnected` to avoid this behaviour and take care of disposing and cleaning all the Subscriber objects yourself.\n * See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more.\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session.\n * This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).\n * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.\n * Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()`\n * or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] and [[VideoElementEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).\n * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.\n * Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself.\n * See [[StreamEvent]] and [[VideoElementEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more.\n */\n Session.prototype.disconnect = function () {\n this.leave(false, 'disconnect');\n };\n /**\n * Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (only if you\n * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more.\n *\n * The [[Subscriber]] object will dispatch a `streamPlaying` event once the remote stream starts playing. See [[StreamManagerEvent]] to learn more.\n *\n * @param stream Stream object to subscribe to\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Subscriber.\n * You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section)\n * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails.\n */\n Session.prototype.subscribe = function (stream, targetElement, param3, param4) {\n var properties = {};\n if (!!param3 && typeof param3 !== 'function') {\n properties = {\n insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true,\n subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true\n };\n }\n else {\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: true,\n subscribeToVideo: true\n };\n }\n var completionHandler;\n if (!!param3 && (typeof param3 === 'function')) {\n completionHandler = param3;\n }\n else if (!!param4) {\n completionHandler = param4;\n }\n console.info('Subscribing to ' + stream.connection.connectionId);\n stream.subscribe()\n .then(function () {\n console.info('Subscribed correctly to ' + stream.connection.connectionId);\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n })[\"catch\"](function (error) {\n if (completionHandler !== undefined) {\n completionHandler(error);\n }\n });\n var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties);\n if (!!subscriber.targetElement) {\n stream.streamManager.createVideoElement(subscriber.targetElement, properties.insertMode);\n }\n return subscriber;\n };\n Session.prototype.subscribeAsync = function (stream, targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var subscriber;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(subscriber);\n }\n };\n if (!!properties) {\n subscriber = _this.subscribe(stream, targetElement, properties, callback);\n }\n else {\n subscriber = _this.subscribe(stream, targetElement, callback);\n }\n });\n };\n /**\n * Unsubscribes from `subscriber`, automatically removing its associated HTML video elements.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event for each video associated to it that was removed from DOM.\n * Only videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed\n *\n * See [[VideoElementEvent]] to learn more\n */\n Session.prototype.unsubscribe = function (subscriber) {\n var connectionId = subscriber.stream.connection.connectionId;\n console.info('Unsubscribing from ' + connectionId);\n this.openvidu.sendRequest('unsubscribeFromVideo', { sender: subscriber.stream.connection.connectionId }, function (error, response) {\n if (error) {\n console.error('Error unsubscribing from ' + connectionId, error);\n }\n else {\n console.info('Unsubscribed correctly from ' + connectionId);\n }\n subscriber.stream.disposeWebRtcPeer();\n subscriber.stream.disposeMediaStream();\n });\n subscriber.stream.streamManager.removeAllVideos();\n };\n /**\n * Publishes to the Session the Publisher object\n *\n * #### Events dispatched\n *\n * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more.\n *\n * The local [[Publisher]] object will dispatch a `streamPlaying` once the media stream starts playing. See [[StreamManagerEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved only after the publisher was successfully published and rejected with an Error object if not\n */\n Session.prototype.publish = function (publisher) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n publisher.session = _this;\n publisher.stream.session = _this;\n if (!publisher.stream.isLocalStreamPublished) {\n // 'Session.unpublish(Publisher)' has NOT been called\n _this.connection.addStream(publisher.stream);\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n // 'Session.unpublish(Publisher)' has been called. Must initialize again Publisher\n publisher.initialize()\n .then(function () {\n _this.connection.addStream(publisher.stream);\n publisher.reestablishStreamPlayingEvent();\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n /**\n * Unpublishes from the Session the Publisher object.\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event.\n * This event will automatically stop all media tracks and delete any HTML video element associated to this Publisher\n * (only those videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).\n * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.\n * Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and\n * delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).\n * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.\n * Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object on your own.\n *\n * See [[StreamEvent]] and [[VideoElementEvent]] to learn more.\n */\n Session.prototype.unpublish = function (publisher) {\n var stream = publisher.stream;\n if (!stream.connection) {\n console.error('The associated Connection object of this Publisher is null', stream);\n return;\n }\n else if (stream.connection !== this.connection) {\n console.error('The associated Connection object of this Publisher is not your local Connection.' +\n \"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method\", stream);\n return;\n }\n else {\n console.info('Unpublishing local media (' + stream.connection.connectionId + ')');\n this.openvidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info('Media unpublished correctly');\n }\n });\n stream.disposeWebRtcPeer();\n delete stream.connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish');\n publisher.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n }\n };\n /**\n * Sends one signal. `signal` object has the following optional properties:\n * ```json\n * {data:string, to:Connection[], type:string}\n * ```\n * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local\n * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't\n * mean that openvidu-server could resend the message to all the listed receivers._\n */\n /* tslint:disable:no-string-literal */\n Session.prototype.signal = function (signal) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var signalMessage = {};\n if (signal.to && signal.to.length > 0) {\n var connectionIds_1 = [];\n signal.to.forEach(function (connection) {\n connectionIds_1.push(connection.connectionId);\n });\n signalMessage['to'] = connectionIds_1;\n }\n else {\n signalMessage['to'] = [];\n }\n signalMessage['data'] = signal.data ? signal.data : '';\n signalMessage['type'] = signal.type ? signal.type : '';\n _this.openvidu.sendRequest('sendMessage', {\n message: JSON.stringify(signalMessage)\n }, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve();\n }\n });\n });\n };\n /* tslint:enable:no-string-literal */\n /**\n * See [[EventDispatcher.on]]\n */\n Session.prototype.on = function (type, handler) {\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark 'speaking' event in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Session.prototype.once = function (type, handler) {\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableOnceSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Session.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = false;\n // If there are already available remote streams, disablae hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !!str.speechEvent) {\n str.disableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Session.prototype.onParticipantJoined = function (response) {\n var _this = this;\n // Connection shouldn't exist\n this.getConnection(response.id, '')\n .then(function (connection) {\n console.warn('Connection ' + response.id + ' already exists in connections list');\n })[\"catch\"](function (openViduError) {\n var connection = new Connection_1.Connection(_this, response);\n _this.remoteConnections[response.id] = connection;\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantLeft = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n if (!!connection.stream) {\n var stream = connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n delete _this.remoteStreamsCreated[stream.streamId];\n }\n delete _this.remoteConnections[connection.connectionId];\n _this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionDestroyed', connection, msg.reason)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantPublished = function (response) {\n var _this = this;\n var afterConnectionFound = function (connection) {\n _this.remoteConnections[connection.connectionId] = connection;\n if (!_this.remoteStreamsCreated[connection.stream.streamId]) {\n // Avoid race condition between stream.subscribe() in \"onParticipantPublished\" and in \"joinRoom\" rpc callback\n // This condition is false if openvidu-server sends \"participantPublished\" event to a subscriber participant that has\n // already subscribed to certain stream in the callback of \"joinRoom\" method\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', connection.stream, '')]);\n }\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n };\n // Get the existing Connection created on 'onParticipantJoined' for\n // existing participants or create a new one for new participants\n var connection;\n this.getRemoteConnection(response.id, \"Remote connection '\" + response.id + \"' unknown when 'onParticipantPublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (con) {\n // Update existing Connection\n connection = con;\n response.metadata = con.data;\n connection.options = response;\n connection.initRemoteStreams(response.streams);\n afterConnectionFound(connection);\n })[\"catch\"](function (openViduError) {\n // Create new Connection\n connection = new Connection_1.Connection(_this, response);\n afterConnectionFound(connection);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantUnpublished = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, \"Remote connection '\" + msg.name + \"' unknown when 'onParticipantUnpublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n // Deleting the remote stream\n var streamId = connection.stream.streamId;\n delete _this.remoteStreamsCreated[streamId];\n connection.removeStream(streamId);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantEvicted = function (msg) {\n /*this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n\n .then(connection => {\n if (!!connection.stream) {\n const stream = connection.stream;\n\n const streamEvent = new StreamEvent(true, this, 'streamDestroyed', stream, 'forceDisconnect');\n this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n\n delete this.remoteStreamsCreated[stream.streamId];\n }\n connection.dispose();\n delete this.remoteConnections[connection.connectionId];\n this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent(false, this, 'connectionDestroyed', connection, 'forceDisconnect')]);\n })\n .catch(openViduError => {\n console.error(openViduError);\n });*/\n };\n /**\n * @hidden\n */\n Session.prototype.onNewMessage = function (msg) {\n var _this = this;\n console.info('New signal: ' + JSON.stringify(msg));\n this.getConnection(msg.from, \"Connection '\" + msg.from + \"' unknow when 'onNewMessage'. Existing remote connections: \"\n + JSON.stringify(Object.keys(this.remoteConnections)) + '. Existing local connection: ' + this.connection.connectionId)\n .then(function (connection) {\n _this.ee.emitEvent('signal', [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n _this.ee.emitEvent('signal:' + msg.type, [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.recvIceCandidate = function (msg) {\n var candidate = {\n candidate: msg.candidate,\n sdpMid: msg.sdpMid,\n sdpMLineIndex: msg.sdpMLineIndex\n };\n this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate)\n .then(function (connection) {\n var stream = connection.stream;\n stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {\n if (error) {\n console.error('Error adding candidate for ' + stream.streamId\n + ' stream of endpoint ' + msg.endpointName + ': ' + error);\n }\n });\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onSessionClosed = function (msg) {\n console.info('Session closed: ' + JSON.stringify(msg));\n var s = msg.room;\n if (s !== undefined) {\n this.ee.emitEvent('session-closed', [{\n session: s\n }]);\n }\n else {\n console.warn('Session undefined on session closed', msg);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onLostConnection = function () {\n if (!this.connection) {\n console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');\n var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0];\n if (window.confirm('If you are not debugging, this is probably a certificate error at \\\"' + url + '\\\"\\n\\nClick OK to navigate and accept it')) {\n location.assign(url + '/accept-certificate');\n }\n return;\n }\n console.warn('Lost connection in Session ' + this.sessionId);\n if (!!this.sessionId && !this.connection.disposed) {\n this.leave(true, 'networkDisconnect');\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onMediaError = function (params) {\n console.error('Media error: ' + JSON.stringify(params));\n var err = params.error;\n if (err) {\n this.ee.emitEvent('error-media', [{\n error: err\n }]);\n }\n else {\n console.warn('Received undefined media error. Params:', params);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStarted = function (response) {\n this.ee.emitEvent('recordingStarted', [new RecordingEvent_1.RecordingEvent(this, 'recordingStarted', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStopped = function (response) {\n this.ee.emitEvent('recordingStopped', [new RecordingEvent_1.RecordingEvent(this, 'recordingStopped', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Session.prototype.leave = function (forced, reason) {\n var _this = this;\n forced = !!forced;\n console.info('Leaving Session (forced=' + forced + ')');\n if (!!this.connection) {\n if (!this.connection.disposed && !forced) {\n this.openvidu.sendRequest('leaveRoom', function (error, response) {\n if (error) {\n console.error(error);\n }\n _this.openvidu.closeWs();\n });\n }\n else {\n this.openvidu.closeWs();\n }\n if (!!this.connection.stream) {\n // Dispose Publisher's local stream\n this.connection.stream.disposeWebRtcPeer();\n if (this.connection.stream.isLocalStreamPublished) {\n // Make Publisher object dispatch 'streamDestroyed' event if the Stream was published\n this.connection.stream.ee.emitEvent('local-stream-destroyed-by-disconnect', [reason]);\n }\n }\n if (!this.connection.disposed) {\n // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed)\n var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason);\n this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]);\n sessionDisconnectEvent.callDefaultBehaviour();\n }\n }\n else {\n console.warn('You were not connected to the session ' + this.sessionId);\n }\n };\n /* Private methods */\n Session.prototype.connectAux = function (token) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.openvidu.startWs(function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n var joinParams = {\n token: (!!token) ? token : '',\n session: _this.sessionId,\n metadata: !!_this.options.metadata ? _this.options.metadata : '',\n secret: _this.openvidu.getSecret(),\n recorder: _this.openvidu.getRecorder()\n };\n _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n // Initialize local Connection object with values returned by openvidu-server\n _this.connection = new Connection_1.Connection(_this);\n _this.connection.connectionId = response.id;\n _this.connection.data = response.metadata;\n // Initialize remote Connections with value returned by openvidu-server\n var events_1 = {\n connections: new Array(),\n streams: new Array()\n };\n var existingParticipants = response.value;\n existingParticipants.forEach(function (participant) {\n var connection = new Connection_1.Connection(_this, participant);\n _this.remoteConnections[connection.connectionId] = connection;\n events_1.connections.push(connection);\n if (!!connection.stream) {\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n events_1.streams.push(connection.stream);\n }\n });\n // Own 'connectionCreated' event\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]);\n // One 'connectionCreated' event for each existing connection in the session\n events_1.connections.forEach(function (connection) {\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n // One 'streamCreated' event for each active stream in the session\n events_1.streams.forEach(function (stream) {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]);\n });\n resolve();\n }\n });\n }\n });\n });\n };\n Session.prototype.stringClientMetadata = function (metadata) {\n if (typeof metadata !== 'string') {\n return JSON.stringify(metadata);\n }\n else {\n return metadata;\n }\n };\n Session.prototype.getConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n if (_this.connection.connectionId === connectionId) {\n // Resolve local connection\n resolve(_this.connection);\n }\n else {\n // Connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n }\n });\n };\n Session.prototype.getRemoteConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n // Remote connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n });\n };\n Session.prototype.processToken = function (token) {\n var url = new URL(token);\n this.sessionId = url.searchParams.get('sessionId');\n var secret = url.searchParams.get('secret');\n var recorder = url.searchParams.get('recorder');\n if (!!secret) {\n this.openvidu.secret = secret;\n }\n if (!!recorder) {\n this.openvidu.recorder = true;\n }\n this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';\n };\n return Session;\n}());\nexports.Session = Session;\n//# sourceMappingURL=Session.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Session.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar WebRtcStats_1 = require(\"../OpenViduInternal/WebRtcStats/WebRtcStats\");\nvar PublisherSpeakingEvent_1 = require(\"../OpenViduInternal/Events/PublisherSpeakingEvent\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar kurentoUtils = require(\"../OpenViduInternal/KurentoUtils/kurento-utils-js\");\n/**\n * Represents each one of the media streams available in OpenVidu Server for certain session.\n * Each [[Publisher]] and [[Subscriber]] has an attribute of type Stream, as they give access\n * to one of them (sending and receiving it, respectively)\n */\nvar Stream = /** @class */ (function () {\n /**\n * @hidden\n */\n function Stream(session, options) {\n var _this = this;\n /**\n * @hidden\n */\n this.ee = new EventEmitter();\n this.isSubscribeToRemote = false;\n /**\n * @hidden\n */\n this.isLocalStreamReadyToPublish = false;\n /**\n * @hidden\n */\n this.isLocalStreamPublished = false;\n this.session = session;\n if (options.hasOwnProperty('id')) {\n // InboundStreamOptions: stream belongs to a Subscriber\n this.inboundStreamOpts = options;\n this.streamId = this.inboundStreamOpts.id;\n this.hasAudio = this.inboundStreamOpts.recvAudio;\n this.hasVideo = this.inboundStreamOpts.recvVideo;\n this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo;\n this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate;\n }\n else {\n // OutboundStreamOptions: stream belongs to a Publisher\n this.outboundStreamOpts = options;\n if (this.isSendVideo()) {\n if (this.isSendScreen()) {\n this.streamId = 'SCREEN';\n this.typeOfVideo = 'SCREEN';\n }\n else {\n this.streamId = 'CAMERA';\n this.typeOfVideo = 'CAMERA';\n }\n this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;\n }\n else {\n this.streamId = 'MICRO';\n delete this.typeOfVideo;\n }\n this.hasAudio = this.isSendAudio();\n this.hasVideo = this.isSendVideo();\n }\n this.ee.on('mediastream-updated', function () {\n _this.streamManager.updateMediaStream(_this.mediaStream);\n console.debug('Video srcObject [' + _this.mediaStream + '] updated in stream [' + _this.streamId + ']');\n });\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Stream.prototype.getMediaStream = function () {\n return this.mediaStream;\n };\n /**\n * @hidden\n */\n Stream.prototype.setMediaStream = function (mediaStream) {\n this.mediaStream = mediaStream;\n };\n /**\n * @hidden\n */\n Stream.prototype.updateMediaStreamInVideos = function () {\n this.ee.emitEvent('mediastream-updated');\n };\n /**\n * @hidden\n */\n Stream.prototype.getWebRtcPeer = function () {\n return this.webRtcPeer;\n };\n /**\n * @hidden\n */\n Stream.prototype.getRTCPeerConnection = function () {\n return this.webRtcPeer.peerConnection;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribeToMyRemote = function (value) {\n this.isSubscribeToRemote = value;\n };\n /**\n * @hidden\n */\n Stream.prototype.setOutboundStreamOptions = function (outboundStreamOpts) {\n this.outboundStreamOpts = outboundStreamOpts;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribe = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.initWebRtcPeerReceive()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.publish = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.isLocalStreamReadyToPublish) {\n _this.initWebRtcPeerSend()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n _this.ee.once('stream-ready-to-publish', function () {\n _this.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n }\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeWebRtcPeer = function () {\n if (this.webRtcPeer) {\n this.webRtcPeer.dispose();\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n this.stopWebRtcStats();\n console.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + \"WebRTCPeer from 'Stream' with id [\" + this.streamId + '] is now closed');\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeMediaStream = function () {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n delete this.mediaStream;\n }\n console.info((!!this.outboundStreamOpts ? 'Local ' : 'Remote ') + \"MediaStream from 'Stream' with id [\" + this.streamId + '] is now disposed');\n };\n /**\n * @hidden\n */\n Stream.prototype.displayMyRemote = function () {\n return this.isSubscribeToRemote;\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendAudio = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.audioSource !== null &&\n this.outboundStreamOpts.publisherProperties.audioSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendVideo = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource !== null &&\n this.outboundStreamOpts.publisherProperties.videoSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendScreen = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource === 'screen');\n };\n /**\n * @hidden\n */\n Stream.prototype.setSpeechEventIfNotExists = function () {\n if (!this.speechEvent) {\n var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {};\n harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50;\n harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50;\n this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.mediaStream, harkOptions);\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.enableSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.enableOnceSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disableSpeakingEvents = function () {\n this.speechEvent.stop();\n this.speechEvent = undefined;\n };\n /* Private methods */\n Stream.prototype.initWebRtcPeerSend = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var userMediaConstraints = {\n audio: _this.isSendAudio(),\n video: _this.isSendVideo()\n };\n var options = {\n videoStream: _this.mediaStream,\n mediaConstraints: userMediaConstraints,\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n iceServers: _this.session.openvidu.advancedConfiguration.iceServers\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to publish as '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('publishVideo', {\n sdpOffer: sdpOfferParam,\n doLoopback: _this.displayMyRemote() || false,\n audioActive: _this.isSendAudio(),\n videoActive: _this.isSendVideo(),\n typeOfVideo: ((_this.isSendVideo()) ? (_this.isSendScreen() ? 'SCREEN' : 'CAMERA') : ''),\n frameRate: !!_this.frameRate ? _this.frameRate : -1\n }, function (error, response) {\n if (error) {\n reject('Error on publishVideo: ' + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer)\n .then(function () {\n _this.isLocalStreamPublished = true;\n if (_this.displayMyRemote()) {\n // If remote now we can set the srcObject value of video elements\n // 'streamPlaying' event will be triggered\n _this.updateMediaStreamInVideos();\n }\n _this.ee.emitEvent('stream-created-by-publisher');\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n console.info(\"'Publisher' successfully published to session\");\n }\n });\n };\n if (_this.displayMyRemote()) {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (err) {\n if (err) {\n reject(err);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n else {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n });\n };\n Stream.prototype.initWebRtcPeerReceive = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var offerConstraints = {\n audio: _this.inboundStreamOpts.recvAudio,\n video: _this.inboundStreamOpts.recvVideo\n };\n console.debug(\"'Session.subscribe(Stream)' called. Constraints of generate SDP offer\", offerConstraints);\n var options = {\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n mediaConstraints: offerConstraints\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to subscribe to '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('receiveVideoFrom', {\n sender: _this.streamId,\n sdpOffer: sdpOfferParam\n }, function (error, response) {\n if (error) {\n reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error)));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n });\n };\n Stream.prototype.processSdpAnswer = function (sdpAnswer) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n console.debug(_this.streamId + ': set peer connection with recvd SDP answer', sdpAnswer);\n var streamId = _this.streamId;\n var peerConnection = _this.webRtcPeer.peerConnection;\n peerConnection.setRemoteDescription(answer, function () {\n // Update remote MediaStream object except when local stream\n if (!_this.isLocal() || _this.displayMyRemote()) {\n _this.mediaStream = peerConnection.getRemoteStreams()[0];\n console.debug('Peer remote stream', _this.mediaStream);\n if (!!_this.mediaStream) {\n _this.ee.emitEvent('mediastream-updated');\n if (!!_this.mediaStream.getAudioTracks()[0] && _this.session.speakingEventsEnabled) {\n _this.enableSpeakingEvents();\n }\n }\n }\n _this.initWebRtcStats();\n resolve();\n }, function (error) {\n reject(new Error(_this.streamId + ': Error setting SDP to the peer connection: ' + JSON.stringify(error)));\n });\n });\n };\n Stream.prototype.initWebRtcStats = function () {\n this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);\n this.webRtcStats.initWebRtcStats();\n };\n Stream.prototype.stopWebRtcStats = function () {\n if (!!this.webRtcStats && this.webRtcStats.isEnabled()) {\n this.webRtcStats.stopWebRtcStats();\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.isLocal = function () {\n // inbound options undefined and outbound options defined\n return (!this.inboundStreamOpts && !!this.outboundStreamOpts);\n };\n return Stream;\n}());\nexports.Stream = Stream;\n//# sourceMappingURL=Stream.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Stream.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Stream.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar StreamManagerEvent_1 = require(\"../OpenViduInternal/Events/StreamManagerEvent\");\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Interface in charge of displaying the media streams in the HTML DOM. This wraps any [[Publisher]] and [[Subscriber]] object.\n * You can insert as many video players fo the same Stream as you want by calling [[StreamManager.addVideoElement]] or\n * [[StreamManager.createVideoElement]].\n *\n * The use of StreamManager wrapper is particularly useful when you don't need to differentiate between Publisher or Subscriber streams or just\n * want to directly manage your own video elements (even more than one video element per Stream). This scenario is pretty common in\n * declarative, MVC frontend frameworks such as Angular, React or Vue.js\n */\nvar StreamManager = /** @class */ (function () {\n /**\n * @hidden\n */\n function StreamManager(stream, targetElement) {\n var _this = this;\n /**\n * All the videos displaying the Stream of this Publisher/Subscriber\n */\n this.videos = [];\n /**\n * @hidden\n */\n this.lazyLaunchVideoElementCreatedEvent = false;\n /**\n * @hidden\n */\n this.ee = new EventEmitter();\n this.stream = stream;\n this.stream.streamManager = this;\n this.remote = !this.stream.isLocal();\n if (!!targetElement) {\n var targEl = void 0;\n if (typeof targetElement === 'string') {\n targEl = document.getElementById(targetElement);\n }\n else if (targetElement instanceof HTMLElement) {\n targEl = targetElement;\n }\n if (!!targEl) {\n this.firstVideoElement = {\n targetElement: targEl,\n video: document.createElement('video'),\n id: ''\n };\n this.targetElement = targEl;\n this.element = targEl;\n }\n }\n this.canPlayListener = function () {\n if (_this.stream.isLocal()) {\n if (!_this.stream.displayMyRemote()) {\n console.info(\"Your local 'Stream' with id [\" + _this.stream.streamId + '] video is now playing');\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]);\n }\n else {\n console.info(\"Your own remote 'Stream' with id [\" + _this.stream.streamId + '] video is now playing');\n _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'remoteVideoPlaying')]);\n }\n }\n else {\n console.info(\"Remote 'Stream' with id [\" + _this.stream.streamId + '] video is now playing');\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]);\n }\n _this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(_this)]);\n };\n }\n /**\n * See [[EventDispatcher.on]]\n */\n StreamManager.prototype.on = function (type, handler) {\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]);\n this.lazyLaunchVideoElementCreatedEvent = false;\n }\n }\n if (type === 'streamPlaying' || type === 'videoPlaying') {\n if (this.videos[0] && this.videos[0].video &&\n this.videos[0].video.currentTime > 0 &&\n this.videos[0].video.paused === false &&\n this.videos[0].video.ended === false &&\n this.videos[0].video.readyState === 4) {\n this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this)]);\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]);\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n StreamManager.prototype.once = function (type, handler) {\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered once\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered once\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]);\n }\n }\n if (type === 'streamPlaying' || type === 'videoPlaying') {\n if (this.videos[0] && this.videos[0].video &&\n this.videos[0].video.currentTime > 0 &&\n this.videos[0].video.paused === false &&\n this.videos[0].video.ended === false &&\n this.videos[0].video.readyState === 4) {\n this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this)]);\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]);\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n StreamManager.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n return this;\n };\n /**\n * Makes `video` element parameter display this [[stream]]. This is useful when you are\n * [managing the video elements on your own](/docs/how-do-i/manage-videos/#you-take-care-of-the-video-players)\n *\n * Calling this method with a video already added to other Publisher/Subscriber will cause the video element to be\n * disassociated from that previous Publisher/Subscriber and to be associated to this one.\n *\n * @returns 1 if the video wasn't associated to any other Publisher/Subscriber and has been successfully added to this one.\n * 0 if the video was already added to this Publisher/Subscriber. -1 if the video was previously associated to any other\n * Publisher/Subscriber and has been successfully disassociated from that one and properly added to this one.\n */\n StreamManager.prototype.addVideoElement = function (video) {\n this.initializeVideoProperties(video);\n // If the video element is already part of this StreamManager do nothing\n for (var _i = 0, _a = this.videos; _i < _a.length; _i++) {\n var v = _a[_i];\n if (v.video === video) {\n return 0;\n }\n }\n var returnNumber = 1;\n this.initializeVideoProperties(video);\n for (var _b = 0, _c = this.stream.session.streamManagers; _b < _c.length; _b++) {\n var streamManager = _c[_b];\n if (streamManager.disassociateVideo(video)) {\n returnNumber = -1;\n break;\n }\n }\n this.stream.session.streamManagers.forEach(function (streamManager) {\n streamManager.disassociateVideo(video);\n });\n this.pushNewStreamManagerVideo({\n video: video,\n id: video.id\n });\n console.info('New video element associated to ', this);\n return returnNumber;\n };\n /**\n * Creates a new video element displaying this [[stream]]. This allows you to have multiple video elements displaying the same media stream.\n *\n * #### Events dispatched\n *\n * The Publisher/Subscriber object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM. See [[VideoElementEvent]]\n *\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher/Subscriber will be inserted\n * @param insertMode How the video element will be inserted accordingly to `targetElemet`\n */\n StreamManager.prototype.createVideoElement = function (targetElement, insertMode) {\n var targEl;\n if (typeof targetElement === 'string') {\n targEl = document.getElementById(targEl);\n if (!targEl) {\n throw new Error(\"The provided 'targetElement' couldn't be resolved to any HTML element: \" + targetElement);\n }\n }\n else if (targetElement instanceof HTMLElement) {\n targEl = targetElement;\n }\n else {\n throw new Error(\"The provided 'targetElement' couldn't be resolved to any HTML element: \" + targetElement);\n }\n var video = document.createElement('video');\n this.initializeVideoProperties(video);\n var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND;\n switch (insMode) {\n case VideoInsertMode_1.VideoInsertMode.AFTER:\n targEl.parentNode.insertBefore(video, targEl.nextSibling);\n break;\n case VideoInsertMode_1.VideoInsertMode.APPEND:\n targEl.appendChild(video);\n break;\n case VideoInsertMode_1.VideoInsertMode.BEFORE:\n targEl.parentNode.insertBefore(video, targEl);\n break;\n case VideoInsertMode_1.VideoInsertMode.PREPEND:\n targEl.insertBefore(video, targEl.childNodes[0]);\n break;\n case VideoInsertMode_1.VideoInsertMode.REPLACE:\n targEl.parentNode.replaceChild(video, targEl);\n break;\n default:\n insMode = VideoInsertMode_1.VideoInsertMode.APPEND;\n targEl.appendChild(video);\n break;\n }\n var v = {\n targetElement: targEl,\n video: video,\n insertMode: insMode,\n id: video.id\n };\n this.pushNewStreamManagerVideo(v);\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(v.video, this, 'videoElementCreated')]);\n this.lazyLaunchVideoElementCreatedEvent = !!this.firstVideoElement;\n return video;\n };\n /**\n * @hidden\n */\n StreamManager.prototype.initializeVideoProperties = function (video) {\n video.srcObject = this.stream.getMediaStream();\n video.autoplay = true;\n video.controls = false;\n if (!video.id) {\n video.id = (this.remote ? 'remote-' : 'local-') + 'video-' + this.stream.streamId;\n // DEPRECATED property: assign once the property id if the user provided a valid targetElement\n if (!this.id && !!this.targetElement) {\n this.id = video.id;\n }\n }\n if (!this.remote && !this.stream.displayMyRemote()) {\n video.muted = true;\n if (this.stream.outboundStreamOpts.publisherProperties.mirror) {\n this.mirrorVideo(video);\n }\n }\n };\n /**\n * @hidden\n */\n StreamManager.prototype.removeAllVideos = function () {\n var _this = this;\n for (var i = this.stream.session.streamManagers.length - 1; i >= 0; --i) {\n if (this.stream.session.streamManagers[i] === this) {\n this.stream.session.streamManagers.splice(i, 1);\n }\n }\n this.videos.slice().reverse().forEach(function (streamManagerVideo, index, videos) {\n // Remove oncanplay event listener (only OpenVidu browser one, not the user ones)\n streamManagerVideo.video.removeEventListener('canplay', _this.canPlayListener);\n if (!!streamManagerVideo.targetElement) {\n // Only remove videos created by OpenVidu Browser (those generated by passing a valid targetElement in OpenVidu.initPublisher and Session.subscribe\n // or those created by StreamManager.createVideoElement). These are also the videos that triggered a videoElementCreated event\n streamManagerVideo.video.parentNode.removeChild(streamManagerVideo.video);\n _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(streamManagerVideo.video, _this, 'videoElementDestroyed')]);\n _this.videos.splice(videos.length - 1 - index, 1);\n }\n else {\n // Remove srcObject in all videos managed by the user\n streamManagerVideo.video.srcObject = null;\n }\n });\n };\n /**\n * @hidden\n */\n StreamManager.prototype.disassociateVideo = function (video) {\n var disassociated = false;\n for (var i = 0; i < this.videos.length; i++) {\n if (this.videos[i].video === video) {\n this.videos.splice(i, 1);\n disassociated = true;\n console.info('Video element disassociated from ', this);\n break;\n }\n }\n return disassociated;\n };\n /**\n * @hidden\n */\n StreamManager.prototype.addPlayEventToFirstVideo = function () {\n if ((!!this.videos[0]) && (!!this.videos[0].video) && (this.videos[0].video.oncanplay === null)) {\n this.videos[0].video.addEventListener('canplay', this.canPlayListener);\n }\n };\n /**\n * @hidden\n */\n StreamManager.prototype.updateMediaStream = function (mediaStream) {\n this.videos.forEach(function (streamManagerVideo) {\n streamManagerVideo.video.srcObject = mediaStream;\n });\n };\n StreamManager.prototype.pushNewStreamManagerVideo = function (streamManagerVideo) {\n this.videos.push(streamManagerVideo);\n this.addPlayEventToFirstVideo();\n if (this.stream.session.streamManagers.indexOf(this) === -1) {\n this.stream.session.streamManagers.push(this);\n }\n };\n StreamManager.prototype.mirrorVideo = function (video) {\n video.style.transform = 'rotateY(180deg)';\n video.style.webkitTransform = 'rotateY(180deg)';\n };\n return StreamManager;\n}());\nexports.StreamManager = StreamManager;\n//# sourceMappingURL=StreamManager.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/StreamManager.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/StreamManager.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar StreamManager_1 = require(\"./StreamManager\");\n/**\n * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method\n */\nvar Subscriber = /** @class */ (function (_super) {\n __extends(Subscriber, _super);\n /**\n * @hidden\n */\n function Subscriber(stream, targEl, properties) {\n var _this = _super.call(this, stream, targEl) || this;\n _this.element = _this.targetElement;\n _this.stream = stream;\n _this.properties = properties;\n return _this;\n }\n /**\n * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToAudio = function (value) {\n this.stream.getMediaStream().getAudioTracks().forEach(function (track) {\n track.enabled = value;\n });\n console.info(\"'Subscriber' has \" + (value ? 'subscribed to' : 'unsubscribed from') + ' its audio stream');\n return this;\n };\n /**\n * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToVideo = function (value) {\n this.stream.getMediaStream().getVideoTracks().forEach(function (track) {\n track.enabled = value;\n });\n console.info(\"'Subscriber' has \" + (value ? 'subscribed to' : 'unsubscribed from') + ' its video stream');\n return this;\n };\n return Subscriber;\n}(StreamManager_1.StreamManager));\nexports.Subscriber = Subscriber;\n//# sourceMappingURL=Subscriber.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Subscriber.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState;\n(function (LocalRecorderState) {\n LocalRecorderState[\"READY\"] = \"READY\";\n LocalRecorderState[\"RECORDING\"] = \"RECORDING\";\n LocalRecorderState[\"PAUSED\"] = \"PAUSED\";\n LocalRecorderState[\"FINISHED\"] = \"FINISHED\";\n})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {}));\n//# sourceMappingURL=LocalRecorderState.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\n/**\n * Defines property [[OpenViduError.name]]\n */\nvar OpenViduErrorName;\n(function (OpenViduErrorName) {\n /**\n * Browser is not supported by OpenVidu.\n * Returned uppon unsuccessful [[Session.connect]]\n */\n OpenViduErrorName[\"BROWSER_NOT_SUPPORTED\"] = \"BROWSER_NOT_SUPPORTED\";\n /**\n * The user hasn't granted permissions to the required input device when the browser asked for them.\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]\n */\n OpenViduErrorName[\"DEVICE_ACCESS_DENIED\"] = \"DEVICE_ACCESS_DENIED\";\n /**\n * The user hasn't granted permissions to capture some desktop screen when the browser asked for them.\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]\n */\n OpenViduErrorName[\"SCREEN_CAPTURE_DENIED\"] = \"SCREEN_CAPTURE_DENIED\";\n /**\n * Browser does not support screen sharing.\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"SCREEN_SHARING_NOT_SUPPORTED\"] = \"SCREEN_SHARING_NOT_SUPPORTED\";\n /**\n * Only for Chrome, there's no screen sharing extension installed\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"SCREEN_EXTENSION_NOT_INSTALLED\"] = \"SCREEN_EXTENSION_NOT_INSTALLED\";\n /**\n * Only for Chrome, the screen sharing extension is installed but is disabled\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"SCREEN_EXTENSION_DISABLED\"] = \"SCREEN_EXTENSION_DISABLED\";\n /**\n * No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]])\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"INPUT_VIDEO_DEVICE_NOT_FOUND\"] = \"INPUT_VIDEO_DEVICE_NOT_FOUND\";\n /**\n * No audio input device found with the provided deviceId (property [[PublisherProperties.audioSource]])\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"INPUT_AUDIO_DEVICE_NOT_FOUND\"] = \"INPUT_AUDIO_DEVICE_NOT_FOUND\";\n /**\n * Method [[OpenVidu.initPublisher]] has been called with properties `videoSource` and `audioSource` of\n * [[PublisherProperties]] parameter both set to *false* or *null*\n */\n OpenViduErrorName[\"NO_INPUT_SOURCE_SET\"] = \"NO_INPUT_SOURCE_SET\";\n /**\n * Some media property of [[PublisherProperties]] such as `frameRate` or `resolution` is not supported\n * by the input devices (whenever it is possible they are automatically adjusted to the most similar value).\n * Returned uppon unsuccessful [[OpenVidu.initPublisher]]\n */\n OpenViduErrorName[\"PUBLISHER_PROPERTIES_ERROR\"] = \"PUBLISHER_PROPERTIES_ERROR\";\n /**\n * _Not in use yet_\n */\n OpenViduErrorName[\"OPENVIDU_PERMISSION_DENIED\"] = \"OPENVIDU_PERMISSION_DENIED\";\n /**\n * _Not in use yet_\n */\n OpenViduErrorName[\"OPENVIDU_NOT_CONNECTED\"] = \"OPENVIDU_NOT_CONNECTED\";\n /**\n * _Not in use yet_\n */\n OpenViduErrorName[\"GENERIC_ERROR\"] = \"GENERIC_ERROR\";\n})(OpenViduErrorName = exports.OpenViduErrorName || (exports.OpenViduErrorName = {}));\n/**\n * Simple object to identify runtime errors on the client side\n */\nvar OpenViduError = /** @class */ (function () {\n /**\n * @hidden\n */\n function OpenViduError(name, message) {\n this.name = name;\n this.message = message;\n }\n return OpenViduError;\n}());\nexports.OpenViduError = OpenViduError;\n//# sourceMappingURL=OpenViduError.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\n/**\n * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]]\n */\nvar VideoInsertMode;\n(function (VideoInsertMode) {\n /**\n * Video inserted after the target element (as next sibling)\n */\n VideoInsertMode[\"AFTER\"] = \"AFTER\";\n /**\n * Video inserted as last child of the target element\n */\n VideoInsertMode[\"APPEND\"] = \"APPEND\";\n /**\n * Video inserted before the target element (as previous sibling)\n */\n VideoInsertMode[\"BEFORE\"] = \"BEFORE\";\n /**\n * Video inserted as first child of the target element\n */\n VideoInsertMode[\"PREPEND\"] = \"PREPEND\";\n /**\n * Video replaces target element\n */\n VideoInsertMode[\"REPLACE\"] = \"REPLACE\";\n})(VideoInsertMode = exports.VideoInsertMode || (exports.VideoInsertMode = {}));\n//# sourceMappingURL=VideoInsertMode.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `connectionCreated`: dispatched by [[Session]]\n * - `connectionDestroyed`: dispatched by [[Session]]\n */\nvar ConnectionEvent = /** @class */ (function (_super) {\n __extends(ConnectionEvent, _super);\n /**\n * @hidden\n */\n function ConnectionEvent(cancelable, target, type, connection, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.connection = connection;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n ConnectionEvent.prototype.callDefaultBehaviour = function () { };\n return ConnectionEvent;\n}(Event_1.Event));\nexports.ConnectionEvent = ConnectionEvent;\n//# sourceMappingURL=ConnectionEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Event = /** @class */ (function () {\n /**\n * @hidden\n */\n function Event(cancelable, target, type) {\n this.hasBeenPrevented = false;\n this.cancelable = cancelable;\n this.target = target;\n this.type = type;\n }\n /**\n * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it\n */\n Event.prototype.isDefaultPrevented = function () {\n return this.hasBeenPrevented;\n };\n /**\n * Prevents the default behaviour of the event. The following events have a default behaviour:\n *\n * - `sessionDisconnected`: dispatched by [[Session]] object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or\n * by calling [[Subscriber.createVideoElement]]). For every video removed, each Subscriber object will also dispatch a `videoElementDestroyed` event.\n *\n * - `streamDestroyed`:\n * - If dispatched by a [[Publisher]] (*you* have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement`\n * in method [[OpenVidu.initPublisher]] or by calling [[Publisher.createVideoElement]]). For every video removed, the Publisher object will also dispatch a `videoElementDestroyed` event.\n * - If dispatched by [[Session]] (*other user* has unpublished): automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes any HTML video element associated to that Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or\n * by calling [[Subscriber.createVideoElement]]). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event.\n */\n Event.prototype.preventDefault = function () {\n // tslint:disable-next-line:no-empty\n this.callDefaultBehaviour = function () { };\n this.hasBeenPrevented = true;\n };\n return Event;\n}());\nexports.Event = Event;\n//# sourceMappingURL=Event.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `publisherStartSpeaking`: dispatched by [[Session]]\n * - `publisherStopSpeaking`: dispatched by [[Session]]\n *\n * More information:\n * - This events will only be triggered for **remote streams that have audio tracks**\n * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`,\n * keep in mind that this will also internally remove any 'publisherStartSpeaking' event\n * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]]\n */\nvar PublisherSpeakingEvent = /** @class */ (function (_super) {\n __extends(PublisherSpeakingEvent, _super);\n /**\n * @hidden\n */\n function PublisherSpeakingEvent(target, type, connection, streamId) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.connection = connection;\n _this.streamId = streamId;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n PublisherSpeakingEvent.prototype.callDefaultBehaviour = function () { };\n return PublisherSpeakingEvent;\n}(Event_1.Event));\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent;\n//# sourceMappingURL=PublisherSpeakingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `recordingStarted`: dispatched by [[Session]]\n * - `recordingStopped`: dispatched by [[Session]]\n */\nvar RecordingEvent = /** @class */ (function (_super) {\n __extends(RecordingEvent, _super);\n /**\n * @hidden\n */\n function RecordingEvent(target, type, id, name) {\n var _this = _super.call(this, false, target, type) || this;\n _this.id = id;\n if (name !== id) {\n _this.name = name;\n }\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n RecordingEvent.prototype.callDefaultBehaviour = function () { };\n return RecordingEvent;\n}(Event_1.Event));\nexports.RecordingEvent = RecordingEvent;\n//# sourceMappingURL=RecordingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines event `sessionDisconnected` dispatched by [[Session]]\n */\nvar SessionDisconnectedEvent = /** @class */ (function (_super) {\n __extends(SessionDisconnectedEvent, _super);\n /**\n * @hidden\n */\n function SessionDisconnectedEvent(target, reason) {\n var _this = _super.call(this, true, target, 'sessionDisconnected') || this;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n SessionDisconnectedEvent.prototype.callDefaultBehaviour = function () {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n var session = this.target;\n // Dispose and delete all remote Connections\n for (var connectionId in session.remoteConnections) {\n if (!!session.remoteConnections[connectionId].stream) {\n session.remoteConnections[connectionId].stream.disposeWebRtcPeer();\n session.remoteConnections[connectionId].stream.disposeMediaStream();\n if (session.remoteConnections[connectionId].stream.streamManager) {\n session.remoteConnections[connectionId].stream.streamManager.removeAllVideos();\n }\n delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId];\n session.remoteConnections[connectionId].dispose();\n }\n delete session.remoteConnections[connectionId];\n }\n };\n return SessionDisconnectedEvent;\n}(Event_1.Event));\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent;\n//# sourceMappingURL=SessionDisconnectedEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `signal`: dispatched by [[Session]]\n * - `signal:TYPE`: dispatched by [[Session]]\n */\nvar SignalEvent = /** @class */ (function (_super) {\n __extends(SignalEvent, _super);\n /**\n * @hidden\n */\n function SignalEvent(target, type, data, from) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.data = data;\n _this.from = from;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n SignalEvent.prototype.callDefaultBehaviour = function () { };\n return SignalEvent;\n}(Event_1.Event));\nexports.SignalEvent = SignalEvent;\n//# sourceMappingURL=SignalEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\nvar Publisher_1 = require(\"../../OpenVidu/Publisher\");\nvar Session_1 = require(\"../../OpenVidu/Session\");\n/**\n * Defines the following events:\n * - `streamCreated`: dispatched by [[Session]] and [[Publisher]]\n * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]]\n */\nvar StreamEvent = /** @class */ (function (_super) {\n __extends(StreamEvent, _super);\n /**\n * @hidden\n */\n function StreamEvent(cancelable, target, type, stream, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.stream = stream;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n StreamEvent.prototype.callDefaultBehaviour = function () {\n if (this.type === 'streamDestroyed') {\n if (this.target instanceof Session_1.Session) {\n // Remote Stream\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n this.stream.disposeWebRtcPeer();\n }\n else if (this.target instanceof Publisher_1.Publisher) {\n // Local Stream\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Publisher'\");\n this.stream.isLocalStreamReadyToPublish = false;\n }\n // Dispose the MediaStream local object\n this.stream.disposeMediaStream();\n // Remove from DOM all video elements associated to this Stream, if there's a StreamManager defined\n // (method Session.subscribe must have been called)\n if (this.stream.streamManager)\n this.stream.streamManager.removeAllVideos();\n // Delete stream from Session.remoteStreamsCreated map\n delete this.stream.session.remoteStreamsCreated[this.stream.streamId];\n // Delete StreamOptionsServer from remote Connection\n var remoteConnection = this.stream.session.remoteConnections[this.stream.connection.connectionId];\n if (!!remoteConnection && !!remoteConnection.options) {\n var streamOptionsServer = remoteConnection.options.streams;\n for (var i = streamOptionsServer.length - 1; i >= 0; --i) {\n if (streamOptionsServer[i].id === this.stream.streamId) {\n streamOptionsServer.splice(i, 1);\n }\n }\n }\n }\n };\n return StreamEvent;\n}(Event_1.Event));\nexports.StreamEvent = StreamEvent;\n//# sourceMappingURL=StreamEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `streamPlaying`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]])\n */\nvar StreamManagerEvent = /** @class */ (function (_super) {\n __extends(StreamManagerEvent, _super);\n /**\n * @hidden\n */\n function StreamManagerEvent(target) {\n return _super.call(this, false, target, 'streamPlaying') || this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n StreamManagerEvent.prototype.callDefaultBehaviour = function () { };\n return StreamManagerEvent;\n}(Event_1.Event));\nexports.StreamManagerEvent = StreamManagerEvent;\n//# sourceMappingURL=StreamManagerEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]] whenever a new HTML video element has been inserted into DOM by OpenVidu Browser library. See\n * [Manage video players](/docs/how-do-i/manage-videos) section.\n * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]] whenever an HTML video element has been removed from DOM by OpenVidu Browser library.\n */\nvar VideoElementEvent = /** @class */ (function (_super) {\n __extends(VideoElementEvent, _super);\n /**\n * @hidden\n */\n function VideoElementEvent(element, target, type) {\n var _this = _super.call(this, false, target, type) || this;\n _this.element = element;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n VideoElementEvent.prototype.callDefaultBehaviour = function () { };\n return VideoElementEvent;\n}(Event_1.Event));\nexports.VideoElementEvent = VideoElementEvent;\n//# sourceMappingURL=VideoElementEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module chunks = main","function Mapper() {\n var sources = {};\n this.forEach = function (callback) {\n for (var key in sources) {\n var source = sources[key];\n for (var key2 in source)\n callback(source[key2]);\n }\n ;\n };\n this.get = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return undefined;\n return ids[id];\n };\n this.remove = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return;\n delete ids[id];\n for (var i in ids) {\n return false;\n }\n delete sources[source];\n };\n this.set = function (value, id, source) {\n if (value == undefined)\n return this.remove(id, source);\n var ids = sources[source];\n if (ids == undefined)\n sources[source] = ids = {};\n ids[id] = value;\n };\n}\n;\nMapper.prototype.pop = function (id, source) {\n var value = this.get(id, source);\n if (value == undefined)\n return undefined;\n this.remove(id, source);\n return value;\n};\nmodule.exports = Mapper;\n//# sourceMappingURL=Mapper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module chunks = main","var JsonRpcClient = require('./jsonrpcclient');\nexports.JsonRpcClient = JsonRpcClient;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module chunks = main","var RpcBuilder = require('../');\nvar WebSocketWithReconnection = require('./transports/webSocketWithReconnection');\nDate.now = Date.now || function () {\n return +new Date;\n};\nvar PING_INTERVAL = 5000;\nvar RECONNECTING = 'RECONNECTING';\nvar CONNECTED = 'CONNECTED';\nvar DISCONNECTED = 'DISCONNECTED';\nvar Logger = console;\nfunction JsonRpcClient(configuration) {\n var self = this;\n var wsConfig = configuration.ws;\n var notReconnectIfNumLessThan = -1;\n var pingNextNum = 0;\n var enabledPings = true;\n var pingPongStarted = false;\n var pingInterval;\n var status = DISCONNECTED;\n var onreconnecting = wsConfig.onreconnecting;\n var onreconnected = wsConfig.onreconnected;\n var onconnected = wsConfig.onconnected;\n var onerror = wsConfig.onerror;\n configuration.rpc.pull = function (params, request) {\n request.reply(null, \"push\");\n };\n wsConfig.onreconnecting = function () {\n Logger.debug(\"--------- ONRECONNECTING -----------\");\n if (status === RECONNECTING) {\n Logger.error(\"Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it\");\n return;\n }\n status = RECONNECTING;\n if (onreconnecting) {\n onreconnecting();\n }\n };\n wsConfig.onreconnected = function () {\n Logger.debug(\"--------- ONRECONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n updateNotReconnectIfLessThan();\n usePing();\n if (onreconnected) {\n onreconnected();\n }\n };\n wsConfig.onconnected = function () {\n Logger.debug(\"--------- ONCONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n usePing();\n if (onconnected) {\n onconnected();\n }\n };\n wsConfig.onerror = function (error) {\n Logger.debug(\"--------- ONERROR -----------\");\n status = DISCONNECTED;\n if (onerror) {\n onerror(error);\n }\n };\n var ws = new WebSocketWithReconnection(wsConfig);\n Logger.debug('Connecting websocket to URI: ' + wsConfig.uri);\n var rpcBuilderOptions = {\n request_timeout: configuration.rpc.requestTimeout,\n ping_request_timeout: configuration.rpc.heartbeatRequestTimeout\n };\n var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) {\n Logger.debug('Received request: ' + JSON.stringify(request));\n try {\n var func = configuration.rpc[request.method];\n if (func === undefined) {\n Logger.error(\"Method \" + request.method + \" not registered in client\");\n }\n else {\n func(request.params, request);\n }\n }\n catch (err) {\n Logger.error('Exception processing request: ' + JSON.stringify(request));\n Logger.error(err);\n }\n });\n this.send = function (method, params, callback) {\n if (method !== 'ping') {\n Logger.debug('Request: method:' + method + \" params:\" + JSON.stringify(params));\n }\n var requestTime = Date.now();\n rpc.encode(method, params, function (error, result) {\n if (error) {\n try {\n Logger.error(\"ERROR:\" + error.message + \" in Request: method:\" +\n method + \" params:\" + JSON.stringify(params) + \" request:\" +\n error.request);\n if (error.data) {\n Logger.error(\"ERROR DATA:\" + JSON.stringify(error.data));\n }\n }\n catch (e) { }\n error.requestTime = requestTime;\n }\n if (callback) {\n if (result != undefined && result.value !== 'pong') {\n Logger.debug('Response: ' + JSON.stringify(result));\n }\n callback(error, result);\n }\n });\n };\n function updateNotReconnectIfLessThan() {\n Logger.debug(\"notReconnectIfNumLessThan = \" + pingNextNum + ' (old=' +\n notReconnectIfNumLessThan + ')');\n notReconnectIfNumLessThan = pingNextNum;\n }\n function sendPing() {\n if (enabledPings) {\n var params = null;\n if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) {\n params = {\n interval: configuration.heartbeat || PING_INTERVAL\n };\n }\n pingNextNum++;\n self.send('ping', params, (function (pingNum) {\n return function (error, result) {\n if (error) {\n Logger.debug(\"Error in ping request #\" + pingNum + \" (\" +\n error.message + \")\");\n if (pingNum > notReconnectIfNumLessThan) {\n enabledPings = false;\n updateNotReconnectIfLessThan();\n Logger.debug(\"Server did not respond to ping message #\" +\n pingNum + \". Reconnecting... \");\n ws.reconnectWs();\n }\n }\n };\n })(pingNextNum));\n }\n else {\n Logger.debug(\"Trying to send ping, but ping is not enabled\");\n }\n }\n function usePing() {\n if (!pingPongStarted) {\n Logger.debug(\"Starting ping (if configured)\");\n pingPongStarted = true;\n if (configuration.heartbeat != undefined) {\n pingInterval = setInterval(sendPing, configuration.heartbeat);\n sendPing();\n }\n }\n }\n this.close = function () {\n Logger.debug(\"Closing jsonRpcClient explicitly by client\");\n if (pingInterval != undefined) {\n Logger.debug(\"Clearing ping interval\");\n clearInterval(pingInterval);\n }\n pingPongStarted = false;\n enabledPings = false;\n if (configuration.sendCloseMessage) {\n Logger.debug(\"Sending close message\");\n this.send('closeSession', null, function (error, result) {\n if (error) {\n Logger.error(\"Error sending close message: \" + JSON.stringify(error));\n }\n ws.close();\n });\n }\n else {\n ws.close();\n }\n };\n this.forceClose = function (millis) {\n ws.forceClose(millis);\n };\n this.reconnect = function () {\n ws.reconnectWs();\n };\n}\nmodule.exports = JsonRpcClient;\n//# sourceMappingURL=jsonrpcclient.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module chunks = main","var WebSocketWithReconnection = require('./webSocketWithReconnection');\nexports.WebSocketWithReconnection = WebSocketWithReconnection;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module chunks = main","\"use strict\";\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar Logger = console;\nvar MAX_RETRIES = 2000;\nvar RETRY_TIME_MS = 3000;\nvar CONNECTING = 0;\nvar OPEN = 1;\nvar CLOSING = 2;\nvar CLOSED = 3;\nfunction WebSocketWithReconnection(config) {\n var closing = false;\n var registerMessageHandler;\n var wsUri = config.uri;\n var useSockJS = config.useSockJS;\n var reconnecting = false;\n var forcingDisconnection = false;\n var ws;\n if (useSockJS) {\n ws = new SockJS(wsUri);\n }\n else {\n ws = new WebSocket(wsUri);\n }\n ws.onopen = function () {\n logConnected(ws, wsUri);\n if (config.onconnected) {\n config.onconnected();\n }\n };\n ws.onerror = function (error) {\n Logger.error(\"Could not connect to \" + wsUri + \" (invoking onerror if defined)\", error);\n if (config.onerror) {\n config.onerror(error);\n }\n };\n function logConnected(ws, wsUri) {\n try {\n Logger.debug(\"WebSocket connected to \" + wsUri);\n }\n catch (e) {\n Logger.error(e);\n }\n }\n var reconnectionOnClose = function () {\n if (ws.readyState === CLOSED) {\n if (closing) {\n Logger.debug(\"Connection closed by user\");\n }\n else {\n Logger.debug(\"Connection closed unexpectecly. Reconnecting...\");\n reconnectToSameUri(MAX_RETRIES, 1);\n }\n }\n else {\n Logger.debug(\"Close callback from previous websocket. Ignoring it\");\n }\n };\n ws.onclose = reconnectionOnClose;\n function reconnectToSameUri(maxRetries, numRetries) {\n Logger.debug(\"reconnectToSameUri (attempt #\" + numRetries + \", max=\" + maxRetries + \")\");\n if (numRetries === 1) {\n if (reconnecting) {\n Logger.warn(\"Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.\");\n return;\n }\n else {\n reconnecting = true;\n }\n if (config.onreconnecting) {\n config.onreconnecting();\n }\n }\n if (forcingDisconnection) {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n else {\n if (config.newWsUriOnReconnection) {\n config.newWsUriOnReconnection(function (error, newWsUri) {\n if (error) {\n Logger.debug(error);\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, newWsUri);\n }\n });\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n }\n }\n function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) {\n Logger.debug(\"Reconnection attempt #\" + numRetries);\n ws.close();\n wsUri = reconnectWsUri || wsUri;\n var newWs;\n if (useSockJS) {\n newWs = new SockJS(wsUri);\n }\n else {\n newWs = new WebSocket(wsUri);\n }\n newWs.onopen = function () {\n Logger.debug(\"Reconnected after \" + numRetries + \" attempts...\");\n logConnected(newWs, wsUri);\n reconnecting = false;\n registerMessageHandler();\n if (config.onreconnected()) {\n config.onreconnected();\n }\n newWs.onclose = reconnectionOnClose;\n };\n var onErrorOrClose = function (error) {\n Logger.warn(\"Reconnection error: \", error);\n if (numRetries === maxRetries) {\n if (config.ondisconnect) {\n config.ondisconnect();\n }\n }\n else {\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n };\n newWs.onerror = onErrorOrClose;\n ws = newWs;\n }\n this.close = function () {\n closing = true;\n ws.close();\n };\n this.forceClose = function (millis) {\n Logger.debug(\"Testing: Force WebSocket close\");\n if (millis) {\n Logger.debug(\"Testing: Change wsUri for \" + millis + \" millis to simulate net failure\");\n var goodWsUri = wsUri;\n wsUri = \"wss://21.234.12.34.4:443/\";\n forcingDisconnection = true;\n setTimeout(function () {\n Logger.debug(\"Testing: Recover good wsUri \" + goodWsUri);\n wsUri = goodWsUri;\n forcingDisconnection = false;\n }, millis);\n }\n ws.close();\n };\n this.reconnectWs = function () {\n Logger.debug(\"reconnectWs\");\n reconnectToSameUri(MAX_RETRIES, 1, wsUri);\n };\n this.send = function (message) {\n ws.send(message);\n };\n this.addEventListener = function (type, callback) {\n registerMessageHandler = function () {\n ws.addEventListener(type, callback);\n };\n registerMessageHandler();\n };\n}\nmodule.exports = WebSocketWithReconnection;\n//# sourceMappingURL=webSocketWithReconnection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module chunks = main","var defineProperty_IE8 = false;\nif (Object.defineProperty) {\n try {\n Object.defineProperty({}, \"x\", {});\n }\n catch (e) {\n defineProperty_IE8 = true;\n }\n}\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== 'function') {\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n return fBound;\n };\n}\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\nvar packers = require('./packers');\nvar Mapper = require('./Mapper');\nvar BASE_TIMEOUT = 5000;\nfunction unifyResponseMethods(responseMethods) {\n if (!responseMethods)\n return {};\n for (var key in responseMethods) {\n var value = responseMethods[key];\n if (typeof value == 'string')\n responseMethods[key] =\n {\n response: value\n };\n }\n ;\n return responseMethods;\n}\n;\nfunction unifyTransport(transport) {\n if (!transport)\n return;\n if (transport instanceof Function)\n return { send: transport };\n if (transport.send instanceof Function)\n return transport;\n if (transport.postMessage instanceof Function) {\n transport.send = transport.postMessage;\n return transport;\n }\n if (transport.write instanceof Function) {\n transport.send = transport.write;\n return transport;\n }\n if (transport.onmessage !== undefined)\n return;\n if (transport.pause instanceof Function)\n return;\n throw new SyntaxError(\"Transport is not a function nor a valid object\");\n}\n;\nfunction RpcNotification(method, params) {\n if (defineProperty_IE8) {\n this.method = method;\n this.params = params;\n }\n else {\n Object.defineProperty(this, 'method', { value: method, enumerable: true });\n Object.defineProperty(this, 'params', { value: params, enumerable: true });\n }\n}\n;\nfunction RpcBuilder(packer, options, transport, onRequest) {\n var self = this;\n if (!packer)\n throw new SyntaxError('Packer is not defined');\n if (!packer.pack || !packer.unpack)\n throw new SyntaxError('Packer is invalid');\n var responseMethods = unifyResponseMethods(packer.responseMethods);\n if (options instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = options;\n transport = undefined;\n options = undefined;\n }\n ;\n if (options && options.send instanceof Function) {\n if (transport && !(transport instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n onRequest = transport;\n transport = options;\n options = undefined;\n }\n ;\n if (transport instanceof Function) {\n if (onRequest != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = transport;\n transport = undefined;\n }\n ;\n if (transport && transport.send instanceof Function)\n if (onRequest && !(onRequest instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n options = options || {};\n EventEmitter.call(this);\n if (onRequest)\n this.on('request', onRequest);\n if (defineProperty_IE8)\n this.peerID = options.peerID;\n else\n Object.defineProperty(this, 'peerID', { value: options.peerID });\n var max_retries = options.max_retries || 0;\n function transportMessage(event) {\n self.decode(event.data || event);\n }\n ;\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n if (transport) {\n if (transport.removeEventListener)\n transport.removeEventListener('message', transportMessage);\n else if (transport.removeListener)\n transport.removeListener('data', transportMessage);\n }\n ;\n if (value) {\n if (value.addEventListener)\n value.addEventListener('message', transportMessage);\n else if (value.addListener)\n value.addListener('data', transportMessage);\n }\n ;\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n this.setTransport(transport);\n var request_timeout = options.request_timeout || BASE_TIMEOUT;\n var ping_request_timeout = options.ping_request_timeout || request_timeout;\n var response_timeout = options.response_timeout || BASE_TIMEOUT;\n var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT;\n var requestID = 0;\n var requests = new Mapper();\n var responses = new Mapper();\n var processedResponses = new Mapper();\n var message2Key = {};\n function storeResponse(message, id, dest) {\n var response = {\n message: message,\n timeout: setTimeout(function () {\n responses.remove(id, dest);\n }, response_timeout)\n };\n responses.set(response, id, dest);\n }\n ;\n function storeProcessedResponse(ack, from) {\n var timeout = setTimeout(function () {\n processedResponses.remove(ack, from);\n }, duplicates_timeout);\n processedResponses.set(timeout, ack, from);\n }\n ;\n function RpcRequest(method, params, id, from, transport) {\n RpcNotification.call(this, method, params);\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n var response = responses.get(id, from);\n if (!(transport || self.getTransport())) {\n if (defineProperty_IE8)\n this.duplicated = Boolean(response);\n else\n Object.defineProperty(this, 'duplicated', {\n value: Boolean(response)\n });\n }\n var responseMethod = responseMethods[method];\n this.pack = packer.pack.bind(packer, this, id);\n this.reply = function (error, result, transport) {\n if (error instanceof Function || error && error.send instanceof Function) {\n if (result != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = error;\n result = null;\n error = undefined;\n }\n else if (result instanceof Function\n || result && result.send instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = result;\n result = null;\n }\n ;\n transport = unifyTransport(transport);\n if (response)\n clearTimeout(response.timeout);\n if (from != undefined) {\n if (error)\n error.dest = from;\n if (result)\n result.dest = from;\n }\n ;\n var message;\n if (error || result != undefined) {\n if (self.peerID != undefined) {\n if (error)\n error.from = self.peerID;\n else\n result.from = self.peerID;\n }\n if (responseMethod) {\n if (responseMethod.error == undefined && error)\n message =\n {\n error: error\n };\n else {\n var method = error\n ? responseMethod.error\n : responseMethod.response;\n message =\n {\n method: method,\n params: error || result\n };\n }\n }\n else\n message =\n {\n error: error,\n result: result\n };\n message = packer.pack(message, id);\n }\n else if (response)\n message = response.message;\n else\n message = packer.pack({ result: null }, id);\n storeResponse(message, id, from);\n transport = transport || this.getTransport() || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n }\n ;\n inherits(RpcRequest, RpcNotification);\n function cancel(message) {\n var key = message2Key[message];\n if (!key)\n return;\n delete message2Key[message];\n var request = requests.pop(key.id, key.dest);\n if (!request)\n return;\n clearTimeout(request.timeout);\n storeProcessedResponse(key.id, key.dest);\n }\n ;\n this.cancel = function (message) {\n if (message)\n return cancel(message);\n for (var message in message2Key)\n cancel(message);\n };\n this.close = function () {\n var transport = this.getTransport();\n if (transport && transport.close)\n transport.close();\n this.cancel();\n processedResponses.forEach(clearTimeout);\n responses.forEach(function (response) {\n clearTimeout(response.timeout);\n });\n };\n this.encode = function (method, params, dest, transport, callback) {\n if (params instanceof Function) {\n if (dest != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = params;\n transport = undefined;\n dest = undefined;\n params = undefined;\n }\n else if (dest instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = dest;\n transport = undefined;\n dest = undefined;\n }\n else if (transport instanceof Function) {\n if (callback != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = transport;\n transport = undefined;\n }\n ;\n if (self.peerID != undefined) {\n params = params || {};\n params.from = self.peerID;\n }\n ;\n if (dest != undefined) {\n params = params || {};\n params.dest = dest;\n }\n ;\n var message = {\n method: method,\n params: params\n };\n if (callback) {\n var id = requestID++;\n var retried = 0;\n message = packer.pack(message, id);\n function dispatchCallback(error, result) {\n self.cancel(message);\n callback(error, result);\n }\n ;\n var request = {\n message: message,\n callback: dispatchCallback,\n responseMethods: responseMethods[method] || {}\n };\n var encode_transport = unifyTransport(transport);\n function sendRequest(transport) {\n var rt = (method === 'ping' ? ping_request_timeout : request_timeout);\n request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++));\n message2Key[message] = { id: id, dest: dest };\n requests.set(request, id, dest);\n transport = transport || encode_transport || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n }\n ;\n function retry(transport) {\n transport = unifyTransport(transport);\n console.warn(retried + ' retry for request message:', message);\n var timeout = processedResponses.pop(id, dest);\n clearTimeout(timeout);\n return sendRequest(transport);\n }\n ;\n function timeout() {\n if (retried < max_retries)\n return retry(transport);\n var error = new Error('Request has timed out');\n error.request = message;\n error.retry = retry;\n dispatchCallback(error);\n }\n ;\n return sendRequest(transport);\n }\n ;\n message = packer.pack(message);\n transport = transport || this.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n this.decode = function (message, transport) {\n if (!message)\n throw new TypeError(\"Message is not defined\");\n try {\n message = packer.unpack(message);\n }\n catch (e) {\n return console.debug(e, message);\n }\n ;\n var id = message.id;\n var ack = message.ack;\n var method = message.method;\n var params = message.params || {};\n var from = params.from;\n var dest = params.dest;\n if (self.peerID != undefined && from == self.peerID)\n return;\n if (id == undefined && ack == undefined) {\n var notification = new RpcNotification(method, params);\n if (self.emit('request', notification))\n return;\n return notification;\n }\n ;\n function processRequest() {\n transport = unifyTransport(transport) || self.getTransport();\n if (transport) {\n var response = responses.get(id, from);\n if (response)\n return transport.send(response.message);\n }\n ;\n var idAck = (id != undefined) ? id : ack;\n var request = new RpcRequest(method, params, idAck, from, transport);\n if (self.emit('request', request))\n return;\n return request;\n }\n ;\n function processResponse(request, error, result) {\n request.callback(error, result);\n }\n ;\n function duplicatedResponse(timeout) {\n console.warn(\"Response already processed\", message);\n clearTimeout(timeout);\n storeProcessedResponse(ack, from);\n }\n ;\n if (method) {\n if (dest == undefined || dest == self.peerID) {\n var request = requests.get(ack, from);\n if (request) {\n var responseMethods = request.responseMethods;\n if (method == responseMethods.error)\n return processResponse(request, params);\n if (method == responseMethods.response)\n return processResponse(request, null, params);\n return processRequest();\n }\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n }\n return processRequest();\n }\n ;\n var error = message.error;\n var result = message.result;\n if (error && error.dest && error.dest != self.peerID)\n return;\n if (result && result.dest && result.dest != self.peerID)\n return;\n var request = requests.get(ack, from);\n if (!request) {\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n return console.warn(\"No callback was defined for this message\", message);\n }\n ;\n processResponse(request, error, result);\n };\n}\n;\ninherits(RpcBuilder, EventEmitter);\nRpcBuilder.RpcNotification = RpcNotification;\nmodule.exports = RpcBuilder;\nvar clients = require('./clients');\nvar transports = require('./clients/transports');\nRpcBuilder.clients = clients;\nRpcBuilder.clients.transports = transports;\nRpcBuilder.packers = packers;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module chunks = main","function pack(message, id) {\n var result = {\n jsonrpc: \"2.0\"\n };\n if (message.method) {\n result.method = message.method;\n if (message.params)\n result.params = message.params;\n if (id != undefined)\n result.id = id;\n }\n else if (id != undefined) {\n if (message.error) {\n if (message.result !== undefined)\n throw new TypeError(\"Both result and error are defined\");\n result.error = message.error;\n }\n else if (message.result !== undefined)\n result.result = message.result;\n else\n throw new TypeError(\"No result or error is defined\");\n result.id = id;\n }\n ;\n return JSON.stringify(result);\n}\n;\nfunction unpack(message) {\n var result = message;\n if (typeof message === 'string' || message instanceof String) {\n result = JSON.parse(message);\n }\n var version = result.jsonrpc;\n if (version !== '2.0')\n throw new TypeError(\"Invalid JsonRPC version '\" + version + \"': \" + message);\n if (result.method == undefined) {\n if (result.id == undefined)\n throw new TypeError(\"Invalid message: \" + message);\n var result_defined = result.result !== undefined;\n var error_defined = result.error !== undefined;\n if (result_defined && error_defined)\n throw new TypeError(\"Both result and error are defined: \" + message);\n if (!result_defined && !error_defined)\n throw new TypeError(\"No result or error is defined: \" + message);\n result.ack = result.id;\n delete result.id;\n }\n return result;\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=JsonRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module chunks = main","function pack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nfunction unpack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=XmlRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module chunks = main","var JsonRPC = require('./JsonRPC');\nvar XmlRPC = require('./XmlRPC');\nexports.JsonRPC = JsonRPC;\nexports.XmlRPC = XmlRPC;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module chunks = main","var freeice = require('freeice');\nvar inherits = require('inherits');\nvar UAParser = require('ua-parser-js');\nvar uuid = require('uuid');\nvar hark = require('hark');\nvar EventEmitter = require('events').EventEmitter;\nvar recursive = require('merge').recursive.bind(undefined, true);\nvar sdpTranslator = require('sdp-translator');\nvar logger = window.Logger || console;\nvar MEDIA_CONSTRAINTS = {\n audio: true,\n video: {\n width: 640,\n framerate: 15\n }\n};\nvar ua = (window && window.navigator) ? window.navigator.userAgent : '';\nvar parser = new UAParser(ua);\nvar browser = parser.getBrowser();\nvar usePlanB = false;\nif (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug(browser.name + \": using SDP PlanB\");\n usePlanB = true;\n}\nfunction noop(error) {\n if (error)\n logger.error(error);\n}\nfunction trackStop(track) {\n track.stop && track.stop();\n}\nfunction streamStop(stream) {\n stream.getTracks().forEach(trackStop);\n}\nvar dumpSDP = function (description) {\n if (typeof description === 'undefined' || description === null) {\n return '';\n }\n return 'type: ' + description.type + '\\r\\n' + description.sdp;\n};\nfunction bufferizeCandidates(pc, onerror) {\n var candidatesQueue = [];\n pc.addEventListener('signalingstatechange', function () {\n if (this.signalingState === 'stable') {\n while (candidatesQueue.length) {\n var entry = candidatesQueue.shift();\n pc.addIceCandidate(entry.candidate, entry.callback, entry.callback);\n }\n }\n });\n return function (candidate, callback) {\n callback = callback || onerror;\n switch (pc.signalingState) {\n case 'closed':\n callback(new Error('PeerConnection object is closed'));\n break;\n case 'stable':\n if (pc.remoteDescription) {\n pc.addIceCandidate(candidate, callback, callback);\n }\n break;\n default:\n candidatesQueue.push({\n candidate: candidate,\n callback: callback\n });\n }\n };\n}\nfunction removeFIDFromOffer(sdp) {\n var n = sdp.indexOf(\"a=ssrc-group:FID\");\n if (n > 0) {\n return sdp.slice(0, n);\n }\n else {\n return sdp;\n }\n}\nfunction getSimulcastInfo(videoStream) {\n var videoTracks = videoStream.getVideoTracks();\n if (!videoTracks.length) {\n logger.warn('No video tracks available in the video stream');\n return '';\n }\n var lines = [\n 'a=x-google-flag:conference',\n 'a=ssrc-group:SIM 1 2 3',\n 'a=ssrc:1 cname:localVideo',\n 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:1 mslabel:' + videoStream.id,\n 'a=ssrc:1 label:' + videoTracks[0].id,\n 'a=ssrc:2 cname:localVideo',\n 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:2 mslabel:' + videoStream.id,\n 'a=ssrc:2 label:' + videoTracks[0].id,\n 'a=ssrc:3 cname:localVideo',\n 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:3 mslabel:' + videoStream.id,\n 'a=ssrc:3 label:' + videoTracks[0].id\n ];\n lines.push('');\n return lines.join('\\n');\n}\nfunction WebRtcPeer(mode, options, callback) {\n if (!(this instanceof WebRtcPeer)) {\n return new WebRtcPeer(mode, options, callback);\n }\n WebRtcPeer.super_.call(this);\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n options = options || {};\n callback = (callback || noop).bind(this);\n var self = this;\n var localVideo = options.localVideo;\n var remoteVideo = options.remoteVideo;\n var videoStream = options.videoStream;\n var audioStream = options.audioStream;\n var mediaConstraints = options.mediaConstraints;\n var connectionConstraints = options.connectionConstraints;\n var pc = options.peerConnection;\n var sendSource = options.sendSource || 'webcam';\n var guid = uuid.v4();\n var configuration = recursive({\n iceServers: (!!options.iceServers && options.iceServers.length > 0) ? options.iceServers : freeice()\n }, options.configuration);\n var onicecandidate = options.onicecandidate;\n if (onicecandidate)\n this.on('icecandidate', onicecandidate);\n var oncandidategatheringdone = options.oncandidategatheringdone;\n if (oncandidategatheringdone) {\n this.on('candidategatheringdone', oncandidategatheringdone);\n }\n var simulcast = options.simulcast;\n var multistream = options.multistream;\n var interop = new sdpTranslator.Interop();\n var candidatesQueueOut = [];\n var candidategatheringdone = false;\n Object.defineProperties(this, {\n 'peerConnection': {\n get: function () {\n return pc;\n }\n },\n 'id': {\n value: options.id || guid,\n writable: false\n },\n 'remoteVideo': {\n get: function () {\n return remoteVideo;\n }\n },\n 'localVideo': {\n get: function () {\n return localVideo;\n }\n },\n 'currentFrame': {\n get: function () {\n if (!remoteVideo)\n return;\n if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA)\n throw new Error('No video stream data available');\n var canvas = document.createElement('canvas');\n canvas.width = remoteVideo.videoWidth;\n canvas.height = remoteVideo.videoHeight;\n canvas.getContext('2d').drawImage(remoteVideo, 0, 0);\n return canvas;\n }\n }\n });\n if (!pc) {\n pc = new RTCPeerConnection(configuration);\n }\n pc.addEventListener('icecandidate', function (event) {\n var candidate = event.candidate;\n if (EventEmitter.listenerCount(self, 'icecandidate') ||\n EventEmitter.listenerCount(self, 'candidategatheringdone')) {\n if (candidate) {\n var cand;\n if (multistream && usePlanB) {\n cand = interop.candidateToUnifiedPlan(candidate);\n }\n else {\n cand = candidate;\n }\n self.emit('icecandidate', cand);\n candidategatheringdone = false;\n }\n else if (!candidategatheringdone) {\n self.emit('candidategatheringdone');\n candidategatheringdone = true;\n }\n }\n else if (!candidategatheringdone) {\n candidatesQueueOut.push(candidate);\n if (!candidate)\n candidategatheringdone = true;\n }\n });\n pc.onaddstream = options.onaddstream;\n pc.onnegotiationneeded = options.onnegotiationneeded;\n this.on('newListener', function (event, listener) {\n if (event === 'icecandidate' || event === 'candidategatheringdone') {\n while (candidatesQueueOut.length) {\n var candidate = candidatesQueueOut.shift();\n if (!candidate === (event === 'candidategatheringdone')) {\n listener(candidate);\n }\n }\n }\n });\n var addIceCandidate = bufferizeCandidates(pc);\n this.addIceCandidate = function (iceCandidate, callback) {\n var candidate;\n if (multistream && usePlanB) {\n candidate = interop.candidateToPlanB(iceCandidate);\n }\n else {\n candidate = new RTCIceCandidate(iceCandidate);\n }\n logger.debug('Remote ICE candidate received', iceCandidate);\n callback = (callback || noop).bind(this);\n addIceCandidate(candidate, callback);\n };\n this.generateOffer = function (callback) {\n callback = callback.bind(this);\n var offerAudio = true;\n var offerVideo = true;\n if (mediaConstraints) {\n offerAudio = (typeof mediaConstraints.audio === 'boolean') ?\n mediaConstraints.audio : true;\n offerVideo = (typeof mediaConstraints.video === 'boolean') ?\n mediaConstraints.video : true;\n }\n var browserDependantConstraints = {\n offerToReceiveAudio: (mode !== 'sendonly' && offerAudio),\n offerToReceiveVideo: (mode !== 'sendonly' && offerVideo)\n };\n var constraints = browserDependantConstraints;\n logger.debug('constraints: ' + JSON.stringify(constraints));\n pc.createOffer(constraints).then(function (offer) {\n logger.debug('Created SDP offer');\n offer = mangleSdpToAddSimulcast(offer);\n return pc.setLocalDescription(offer);\n }).then(function () {\n var localDescription = pc.localDescription;\n logger.debug('Local description set', localDescription.sdp);\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n callback(null, localDescription.sdp, self.processAnswer.bind(self));\n }).catch(callback);\n };\n this.getLocalSessionDescriptor = function () {\n return pc.localDescription;\n };\n this.getRemoteSessionDescriptor = function () {\n return pc.remoteDescription;\n };\n function setRemoteVideo() {\n if (remoteVideo) {\n remoteVideo.pause();\n var stream = pc.getRemoteStreams()[0];\n remoteVideo.srcObject = stream;\n logger.debug('Remote stream:', stream);\n remoteVideo.load();\n }\n }\n this.showLocalVideo = function () {\n localVideo.srcObject = videoStream;\n localVideo.muted = true;\n };\n this.processAnswer = function (sdpAnswer, callback) {\n callback = (callback || noop).bind(this);\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n if (multistream && usePlanB) {\n var planBAnswer = interop.toPlanB(answer);\n logger.debug('asnwer::planB', dumpSDP(planBAnswer));\n answer = planBAnswer;\n }\n logger.debug('SDP answer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(answer, function () {\n setRemoteVideo();\n callback();\n }, callback);\n };\n this.processOffer = function (sdpOffer, callback) {\n callback = callback.bind(this);\n var offer = new RTCSessionDescription({\n type: 'offer',\n sdp: sdpOffer\n });\n if (multistream && usePlanB) {\n var planBOffer = interop.toPlanB(offer);\n logger.debug('offer::planB', dumpSDP(planBOffer));\n offer = planBOffer;\n }\n logger.debug('SDP offer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(offer).then(function () {\n return setRemoteVideo();\n }).then(function () {\n return pc.createAnswer();\n }).then(function (answer) {\n answer = mangleSdpToAddSimulcast(answer);\n logger.debug('Created SDP answer');\n return pc.setLocalDescription(answer);\n }).then(function () {\n var localDescription = pc.localDescription;\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n logger.debug('Local description set', localDescription.sdp);\n callback(null, localDescription.sdp);\n }).catch(callback);\n };\n function mangleSdpToAddSimulcast(answer) {\n if (simulcast) {\n if (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug('Adding multicast info');\n answer = new RTCSessionDescription({\n 'type': answer.type,\n 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream)\n });\n }\n else {\n logger.warn('Simulcast is only available in Chrome browser.');\n }\n }\n return answer;\n }\n function start() {\n if (pc.signalingState === 'closed') {\n callback('The peer connection object is in \"closed\" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue');\n }\n if (videoStream && localVideo) {\n self.showLocalVideo();\n }\n if (videoStream) {\n pc.addStream(videoStream);\n }\n if (audioStream) {\n pc.addStream(audioStream);\n }\n var browser = parser.getBrowser();\n if (mode === 'sendonly' &&\n (browser.name === 'Chrome' || browser.name === 'Chromium') &&\n browser.major === 39) {\n mode = 'sendrecv';\n }\n callback();\n }\n if (mode !== 'recvonly' && !videoStream && !audioStream) {\n function getMedia(constraints) {\n if (constraints === undefined) {\n constraints = MEDIA_CONSTRAINTS;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n videoStream = stream;\n start();\n }).catch(callback);\n }\n if (sendSource === 'webcam') {\n getMedia(mediaConstraints);\n }\n else {\n getScreenConstraints(sendSource, function (error, constraints_) {\n if (error)\n return callback(error);\n constraints = [mediaConstraints];\n constraints.unshift(constraints_);\n getMedia(recursive.apply(undefined, constraints));\n }, guid);\n }\n }\n else {\n setTimeout(start, 0);\n }\n this.on('_dispose', function () {\n if (localVideo) {\n localVideo.pause();\n localVideo.srcObject = null;\n localVideo.load();\n localVideo.muted = false;\n }\n if (remoteVideo) {\n remoteVideo.pause();\n remoteVideo.srcObject = null;\n remoteVideo.load();\n }\n self.removeAllListeners();\n if (window.cancelChooseDesktopMedia !== undefined) {\n window.cancelChooseDesktopMedia(guid);\n }\n });\n}\ninherits(WebRtcPeer, EventEmitter);\nfunction createEnableDescriptor(type) {\n var method = 'get' + type + 'Tracks';\n return {\n enumerable: true,\n get: function () {\n if (!this.peerConnection)\n return;\n var streams = this.peerConnection.getLocalStreams();\n if (!streams.length)\n return;\n for (var i = 0, stream; stream = streams[i]; i++) {\n var tracks = stream[method]();\n for (var j = 0, track; track = tracks[j]; j++)\n if (!track.enabled)\n return false;\n }\n return true;\n },\n set: function (value) {\n function trackSetEnable(track) {\n track.enabled = value;\n }\n this.peerConnection.getLocalStreams().forEach(function (stream) {\n stream[method]().forEach(trackSetEnable);\n });\n }\n };\n}\nObject.defineProperties(WebRtcPeer.prototype, {\n 'enabled': {\n enumerable: true,\n get: function () {\n return this.audioEnabled && this.videoEnabled;\n },\n set: function (value) {\n this.audioEnabled = this.videoEnabled = value;\n }\n },\n 'audioEnabled': createEnableDescriptor('Audio'),\n 'videoEnabled': createEnableDescriptor('Video')\n});\nWebRtcPeer.prototype.getLocalStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getLocalStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.getRemoteStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getRemoteStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.dispose = function () {\n logger.debug('Disposing WebRtcPeer');\n var pc = this.peerConnection;\n try {\n if (pc) {\n if (pc.signalingState === 'closed')\n return;\n pc.getLocalStreams().forEach(streamStop);\n pc.close();\n }\n }\n catch (err) {\n logger.warn('Exception disposing webrtc peer ' + err);\n }\n this.emit('_dispose');\n};\nfunction WebRtcPeerRecvonly(options, callback) {\n if (!(this instanceof WebRtcPeerRecvonly)) {\n return new WebRtcPeerRecvonly(options, callback);\n }\n WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback);\n}\ninherits(WebRtcPeerRecvonly, WebRtcPeer);\nfunction WebRtcPeerSendonly(options, callback) {\n if (!(this instanceof WebRtcPeerSendonly)) {\n return new WebRtcPeerSendonly(options, callback);\n }\n WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback);\n}\ninherits(WebRtcPeerSendonly, WebRtcPeer);\nfunction WebRtcPeerSendrecv(options, callback) {\n if (!(this instanceof WebRtcPeerSendrecv)) {\n return new WebRtcPeerSendrecv(options, callback);\n }\n WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback);\n}\ninherits(WebRtcPeerSendrecv, WebRtcPeer);\nfunction harkUtils(stream, options) {\n return hark(stream, options);\n}\nexports.bufferizeCandidates = bufferizeCandidates;\nexports.WebRtcPeerRecvonly = WebRtcPeerRecvonly;\nexports.WebRtcPeerSendonly = WebRtcPeerSendonly;\nexports.WebRtcPeerSendrecv = WebRtcPeerSendrecv;\nexports.hark = harkUtils;\n//# sourceMappingURL=WebRtcPeer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module chunks = main","var WebRtcPeer = require('./WebRtcPeer');\nexports.WebRtcPeer = WebRtcPeer;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module chunks = main","window.getScreenId = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback(null, 'firefox', {\n video: {\n mozMediaSource: 'window',\n mediaSource: 'window'\n }\n });\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeMediaSourceId) {\n if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {\n callback('permission-denied');\n }\n else {\n callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));\n window.removeEventListener('message', onIFrameCallback);\n }\n }\n setTimeout(postGetSourceIdMessage, 100);\n};\nfunction getScreenConstraints(error, sourceId) {\n var screen_constraints = {\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: error ? 'screen' : 'desktop',\n maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,\n maxHeight: window.screen.height > 1080 ? window.screen.height : 1080\n },\n optional: []\n }\n };\n if (sourceId) {\n screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;\n }\n return screen_constraints;\n}\nvar iframe;\nfunction postGetSourceIdMessage() {\n if (!iframe) {\n loadIFrame(postGetSourceIdMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetSourceIdMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n captureSourceId: true\n }, '*');\n}\nfunction loadIFrame(loadCallback) {\n if (iframe) {\n loadCallback();\n return;\n }\n iframe = document.createElement('iframe');\n iframe.onload = function () {\n iframe.isLoaded = true;\n loadCallback();\n };\n iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';\n iframe.style.display = 'none';\n (document.body || document.documentElement).appendChild(iframe);\n}\nwindow.getChromeExtensionStatus = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback('installed-enabled');\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus);\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n};\nfunction postGetChromeExtensionStatusMessage() {\n if (!iframe) {\n loadIFrame(postGetChromeExtensionStatusMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n getChromeExtensionStatus: true\n }, '*');\n}\nexports.getScreenId = getScreenId;\n//# sourceMappingURL=Screen-Capturing-Auto.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module chunks = main","var chromeMediaSource = 'screen';\nvar screenCallback;\nvar isFirefox = typeof window.InstallTrigger !== 'undefined';\nvar isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\nvar isChrome = !!window.chrome && !isOpera;\nwindow.addEventListener('message', function (event) {\n if (event.origin != window.location.origin) {\n return;\n }\n onMessageCallback(event.data);\n});\nfunction onMessageCallback(data) {\n if (data == 'PermissionDeniedError') {\n chromeMediaSource = 'PermissionDeniedError';\n if (screenCallback)\n return screenCallback('PermissionDeniedError');\n else\n throw new Error('PermissionDeniedError');\n }\n if (data == 'rtcmulticonnection-extension-loaded') {\n chromeMediaSource = 'desktop';\n }\n if (data.sourceId && screenCallback) {\n screenCallback(sourceId = data.sourceId);\n }\n}\nfunction isChromeExtensionAvailable(callback) {\n if (isFirefox)\n return callback(false);\n if (chromeMediaSource == 'desktop')\n return callback('isFirefox');\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback('unavailable');\n }\n else\n callback('available');\n }, 2000);\n}\nfunction getSourceId(callback) {\n if (!callback)\n throw '\"callback\" parameter is mandatory.';\n if (sourceId)\n return callback(sourceId);\n screenCallback = callback;\n window.postMessage('get-sourceId', '*');\n}\nfunction getChromeExtensionStatus(extensionid, callback) {\n if (isFirefox)\n return callback('not-chrome');\n if (arguments.length != 2) {\n callback = extensionid;\n extensionid = 'ajhifddimkapgcifgcodmmfdlknahffk';\n }\n var image = document.createElement('img');\n image.src = 'chrome-extension://' + extensionid + '/icon.png';\n image.onload = function () {\n chromeMediaSource = 'screen';\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback(extensionid == extensionid ? 'installed-enabled' : 'installed-disabled');\n }\n else\n callback('installed-enabled');\n }, 2000);\n };\n image.onerror = function () {\n callback('not-installed');\n };\n}\nfunction getScreenConstraints(callback) {\n sourceId = '';\n var firefoxScreenConstraints = {\n mozMediaSource: 'window',\n mediaSource: 'window'\n };\n if (isFirefox)\n return callback(null, firefoxScreenConstraints);\n var screen_constraints = {\n mandatory: {\n chromeMediaSource: chromeMediaSource,\n maxWidth: screen.width > 1920 ? screen.width : 1920,\n maxHeight: screen.height > 1080 ? screen.height : 1080\n },\n optional: []\n };\n if (chromeMediaSource == 'desktop' && !sourceId) {\n getSourceId(function () {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);\n });\n return;\n }\n if (chromeMediaSource == 'desktop') {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n }\n callback(null, screen_constraints);\n}\nexports.getScreenConstraints = getScreenConstraints;\nexports.isChromeExtensionAvailable = isChromeExtensionAvailable;\nexports.getChromeExtensionStatus = getChromeExtensionStatus;\nexports.getSourceId = getSourceId;\n//# sourceMappingURL=Screen-Capturing.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar platform = require(\"platform\");\nvar WebRtcStats = /** @class */ (function () {\n function WebRtcStats(stream) {\n this.stream = stream;\n this.webRtcStatsEnabled = false;\n this.statsInterval = 1;\n this.stats = {\n inbound: {\n audio: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0\n },\n video: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0,\n framesDecoded: 0,\n nackCount: 0\n }\n },\n outbound: {\n audio: {\n bytesSent: 0,\n packetsSent: 0\n },\n video: {\n bytesSent: 0,\n packetsSent: 0,\n framesEncoded: 0,\n nackCount: 0\n }\n }\n };\n }\n WebRtcStats.prototype.isEnabled = function () {\n return this.webRtcStatsEnabled;\n };\n WebRtcStats.prototype.initWebRtcStats = function () {\n var _this = this;\n var elastestInstrumentation = localStorage.getItem('elastest-instrumentation');\n if (elastestInstrumentation) {\n // ElasTest instrumentation object found in local storage\n console.warn('WebRtc stats enabled for stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n this.webRtcStatsEnabled = true;\n var instrumentation_1 = JSON.parse(elastestInstrumentation);\n this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds\n console.warn('localStorage item: ' + JSON.stringify(instrumentation_1));\n this.webRtcStatsIntervalId = setInterval(function () {\n _this.sendStatsToHttpEndpoint(instrumentation_1);\n }, this.statsInterval * 1000);\n return;\n }\n console.debug('WebRtc stats not enabled');\n };\n WebRtcStats.prototype.stopWebRtcStats = function () {\n if (this.webRtcStatsEnabled) {\n clearInterval(this.webRtcStatsIntervalId);\n console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n }\n };\n WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {\n var _this = this;\n var sendPost = function (json) {\n var http = new XMLHttpRequest();\n var url = instrumentation.webrtc.httpEndpoint;\n http.open('POST', url, true);\n http.setRequestHeader('Content-type', 'application/json');\n http.onreadystatechange = function () {\n if (http.readyState === 4 && http.status === 200) {\n console.log('WebRtc stats successfully sent to ' + url + ' for stream ' + _this.stream.streamId + ' of connection ' + _this.stream.connection.connectionId);\n }\n };\n http.send(json);\n };\n var f = function (stats) {\n if (platform.name.indexOf('Firefox') !== -1) {\n stats.forEach(function (stat) {\n var json = {};\n if ((stat.type === 'inbound-rtp') &&\n (\n // Avoid firefox empty outbound-rtp statistics\n stat.nackCount !== null &&\n stat.isRemote === false &&\n stat.id.startsWith('inbound') &&\n stat.remoteId.startsWith('inbound'))) {\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var jit = stat.jitter * 1000;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: jit,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.nackCount;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ((stat.type === 'outbound-rtp') &&\n (\n // Avoid firefox empty inbound-rtp statistics\n stat.isRemote === false &&\n stat.id.toLowerCase().includes('outbound'))) {\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n });\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {\n var key = _a[_i];\n var stat = stats[key];\n if (stat.type === 'ssrc') {\n var json = {};\n if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) ||\n (stat.mediaType === 'video' && 'qpSum' in stat))) {\n // inbound-rtp\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: stat.googJitterBufferMs,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.googNacksSent;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ('bytesSent' in stat) {\n // outbound-rtp\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n }\n }\n }\n };\n this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); });\n };\n WebRtcStats.prototype.standardizeReport = function (response) {\n if (platform.name.indexOf('Firefox') !== -1) {\n return response;\n }\n var standardReport = {};\n response.result().forEach(function (report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: report.type\n };\n report.names().forEach(function (name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n return standardReport;\n };\n WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) {\n var _this = this;\n if (platform.name.indexOf('Firefox') !== -1) {\n // getStats takes args in different order in Chrome and Firefox\n return pc.getStats(null, function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, failureCb);\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n // In Chrome, the first two arguments are reversed\n return pc.getStats(function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, null, failureCb);\n }\n };\n return WebRtcStats;\n}());\nexports.WebRtcStats = WebRtcStats;\n//# sourceMappingURL=WebRtcStats.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenVidu_1 = require(\"./OpenVidu/OpenVidu\");\nexports.OpenVidu = OpenVidu_1.OpenVidu;\nvar Session_1 = require(\"./OpenVidu/Session\");\nexports.Session = Session_1.Session;\nvar Publisher_1 = require(\"./OpenVidu/Publisher\");\nexports.Publisher = Publisher_1.Publisher;\nvar Subscriber_1 = require(\"./OpenVidu/Subscriber\");\nexports.Subscriber = Subscriber_1.Subscriber;\nvar StreamManager_1 = require(\"./OpenVidu/StreamManager\");\nexports.StreamManager = StreamManager_1.StreamManager;\nvar Stream_1 = require(\"./OpenVidu/Stream\");\nexports.Stream = Stream_1.Stream;\nvar Connection_1 = require(\"./OpenVidu/Connection\");\nexports.Connection = Connection_1.Connection;\nvar LocalRecorder_1 = require(\"./OpenVidu/LocalRecorder\");\nexports.LocalRecorder = LocalRecorder_1.LocalRecorder;\nvar LocalRecorderState_1 = require(\"./OpenViduInternal/Enums/LocalRecorderState\");\nexports.LocalRecorderState = LocalRecorderState_1.LocalRecorderState;\nvar OpenViduError_1 = require(\"./OpenViduInternal/Enums/OpenViduError\");\nexports.OpenViduError = OpenViduError_1.OpenViduError;\nvar VideoInsertMode_1 = require(\"./OpenViduInternal/Enums/VideoInsertMode\");\nexports.VideoInsertMode = VideoInsertMode_1.VideoInsertMode;\nvar Event_1 = require(\"./OpenViduInternal/Events/Event\");\nexports.Event = Event_1.Event;\nvar ConnectionEvent_1 = require(\"./OpenViduInternal/Events/ConnectionEvent\");\nexports.ConnectionEvent = ConnectionEvent_1.ConnectionEvent;\nvar PublisherSpeakingEvent_1 = require(\"./OpenViduInternal/Events/PublisherSpeakingEvent\");\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent_1.PublisherSpeakingEvent;\nvar RecordingEvent_1 = require(\"./OpenViduInternal/Events/RecordingEvent\");\nexports.RecordingEvent = RecordingEvent_1.RecordingEvent;\nvar SessionDisconnectedEvent_1 = require(\"./OpenViduInternal/Events/SessionDisconnectedEvent\");\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent_1.SessionDisconnectedEvent;\nvar SignalEvent_1 = require(\"./OpenViduInternal/Events/SignalEvent\");\nexports.SignalEvent = SignalEvent_1.SignalEvent;\nvar StreamEvent_1 = require(\"./OpenViduInternal/Events/StreamEvent\");\nexports.StreamEvent = StreamEvent_1.StreamEvent;\nvar StreamManagerEvent_1 = require(\"./OpenViduInternal/Events/StreamManagerEvent\");\nexports.StreamManagerEvent = StreamManagerEvent_1.StreamManagerEvent;\nvar VideoElementEvent_1 = require(\"./OpenViduInternal/Events/VideoElementEvent\");\nexports.VideoElementEvent = VideoElementEvent_1.VideoElementEvent;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/index.js\n// module id = ../../../../openvidu-browser/lib/index.js\n// module chunks = main","/* jshint node: true */\n'use strict';\n\nvar normalice = require('normalice');\n\n/**\n # freeice\n\n The `freeice` module is a simple way of getting random STUN or TURN server\n for your WebRTC application. The list of servers (just STUN at this stage)\n were sourced from this [gist](https://gist.github.com/zziuni/3741933).\n\n ## Example Use\n\n The following demonstrates how you can use `freeice` with\n [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n <<< examples/quickconnect.js\n\n As the `freeice` module generates ice servers in a list compliant with the\n WebRTC spec you will be able to use it with raw `RTCPeerConnection`\n constructors and other WebRTC libraries.\n\n ## Hey, don't use my STUN/TURN server!\n\n If for some reason your free STUN or TURN server ends up in the\n list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or\n [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json))\n that is used in this module, you can feel\n free to open an issue on this repository and those servers will be removed\n within 24 hours (or sooner). This is the quickest and probably the most\n polite way to have something removed (and provides us some visibility\n if someone opens a pull request requesting that a server is added).\n\n ## Please add my server!\n\n If you have a server that you wish to add to the list, that's awesome! I'm\n sure I speak on behalf of a whole pile of WebRTC developers who say thanks.\n To get it into the list, feel free to either open a pull request or if you\n find that process a bit daunting then just create an issue requesting\n the addition of the server (make sure you provide all the details, and if\n you have a Terms of Service then including that in the PR/issue would be\n awesome).\n\n ## I know of a free server, can I add it?\n\n Sure, if you do your homework and make sure it is ok to use (I'm currently\n in the process of reviewing the terms of those STUN servers included from\n the original list). If it's ok to go, then please see the previous entry\n for how to add it.\n\n ## Current List of Servers\n\n * current as at the time of last `README.md` file generation\n\n ### STUN\n\n <<< stun.json\n\n ### TURN\n\n <<< turn.json\n\n**/\n\nvar freeice = module.exports = function(opts) {\n // if a list of servers has been provided, then use it instead of defaults\n var servers = {\n stun: (opts || {}).stun || require('./stun.json'),\n turn: (opts || {}).turn || require('./turn.json')\n };\n\n var stunCount = (opts || {}).stunCount || 2;\n var turnCount = (opts || {}).turnCount || 0;\n var selected;\n\n function getServers(type, count) {\n var out = [];\n var input = [].concat(servers[type]);\n var idx;\n\n while (input.length && out.length < count) {\n idx = (Math.random() * input.length) | 0;\n out = out.concat(input.splice(idx, 1));\n }\n\n return out.map(function(url) {\n //If it's a not a string, don't try to \"normalice\" it otherwise using type:url will screw it up\n if ((typeof url !== 'string') && (! (url instanceof String))) {\n return url;\n } else {\n return normalice(type + ':' + url);\n }\n });\n }\n\n // add stun servers\n selected = [].concat(getServers('stun', stunCount));\n\n if (turnCount) {\n selected = selected.concat(getServers('turn', turnCount));\n }\n\n return selected;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js\n// module id = ../../../../openvidu-browser/node_modules/freeice/index.js\n// module chunks = main","module.exports = [\"stun.l.google.com:19302\",\"stun1.l.google.com:19302\",\"stun2.l.google.com:19302\",\"stun3.l.google.com:19302\",\"stun4.l.google.com:19302\",\"stun.ekiga.net\",\"stun.ideasip.com\",\"stun.schlund.de\",\"stun.stunprotocol.org:3478\",\"stun.voiparound.com\",\"stun.voipbuster.com\",\"stun.voipstunt.com\",\"stun.voxgratia.org\",\"stun.services.mozilla.com\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/stun.json\n// module chunks = main","module.exports = []\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/turn.json\n// module chunks = main","var WildEmitter = require('wildemitter');\n\nfunction getMaxVolume (analyser, fftBins) {\n var maxVolume = -Infinity;\n analyser.getFloatFrequencyData(fftBins);\n\n for(var i=4, ii=fftBins.length; i < ii; i++) {\n if (fftBins[i] > maxVolume && fftBins[i] < 0) {\n maxVolume = fftBins[i];\n }\n };\n\n return maxVolume;\n}\n\n\nvar audioContextType;\nif (typeof window !== 'undefined') {\n audioContextType = window.AudioContext || window.webkitAudioContext;\n}\n// use a single audio context due to hardware limits\nvar audioContext = null;\nmodule.exports = function(stream, options) {\n var harker = new WildEmitter();\n\n\n // make it not break in non-supported browsers\n if (!audioContextType) return harker;\n\n //Config\n var options = options || {},\n smoothing = (options.smoothing || 0.1),\n interval = (options.interval || 50),\n threshold = options.threshold,\n play = options.play,\n history = options.history || 10,\n running = true;\n\n //Setup Audio Context\n if (!audioContext) {\n audioContext = new audioContextType();\n }\n var sourceNode, fftBins, analyser;\n\n analyser = audioContext.createAnalyser();\n analyser.fftSize = 512;\n analyser.smoothingTimeConstant = smoothing;\n fftBins = new Float32Array(analyser.frequencyBinCount);\n\n if (stream.jquery) stream = stream[0];\n if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) {\n //Audio Tag\n sourceNode = audioContext.createMediaElementSource(stream);\n if (typeof play === 'undefined') play = true;\n threshold = threshold || -50;\n } else {\n //WebRTC Stream\n sourceNode = audioContext.createMediaStreamSource(stream);\n threshold = threshold || -50;\n }\n\n sourceNode.connect(analyser);\n if (play) analyser.connect(audioContext.destination);\n\n harker.speaking = false;\n\n harker.suspend = function() {\n audioContext.suspend();\n }\n harker.resume = function() {\n audioContext.resume();\n }\n Object.defineProperty(harker, 'state', { get: function() {\n return audioContext.state;\n }});\n audioContext.onstatechange = function() {\n harker.emit('state_change', audioContext.state);\n }\n\n harker.setThreshold = function(t) {\n threshold = t;\n };\n\n harker.setInterval = function(i) {\n interval = i;\n };\n\n harker.stop = function() {\n running = false;\n harker.emit('volume_change', -100, threshold);\n if (harker.speaking) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n analyser.disconnect();\n sourceNode.disconnect();\n };\n harker.speakingHistory = [];\n for (var i = 0; i < history; i++) {\n harker.speakingHistory.push(0);\n }\n\n // Poll the analyser node to determine if speaking\n // and emit events if changed\n var looper = function() {\n setTimeout(function() {\n\n //check if stop has been called\n if(!running) {\n return;\n }\n\n var currentVolume = getMaxVolume(analyser, fftBins);\n\n harker.emit('volume_change', currentVolume, threshold);\n\n var history = 0;\n if (currentVolume > threshold && !harker.speaking) {\n // trigger quickly, short history\n for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history >= 2) {\n harker.speaking = true;\n harker.emit('speaking');\n }\n } else if (currentVolume < threshold && harker.speaking) {\n for (var i = 0; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history == 0) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n }\n harker.speakingHistory.shift();\n harker.speakingHistory.push(0 + (currentVolume > threshold));\n\n looper();\n }, interval);\n };\n looper();\n\n\n return harker;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js\n// module id = ../../../../openvidu-browser/node_modules/hark/hark.js\n// module chunks = main","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js\n// module id = ../../../../openvidu-browser/node_modules/inherits/inherits_browser.js\n// module chunks = main","/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\r\n\r\n;(function(isNode) {\r\n\r\n\t/**\r\n\t * Merge one or more objects \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tvar Public = function(clone) {\r\n\r\n\t\treturn merge(clone === true, false, arguments);\r\n\r\n\t}, publicName = 'merge';\r\n\r\n\t/**\r\n\t * Merge two or more objects recursively \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tPublic.recursive = function(clone) {\r\n\r\n\t\treturn merge(clone === true, true, arguments);\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Clone the input removing any reference\r\n\t * @param mixed input\r\n\t * @return mixed\r\n\t */\r\n\r\n\tPublic.clone = function(input) {\r\n\r\n\t\tvar output = input,\r\n\t\t\ttype = typeOf(input),\r\n\t\t\tindex, size;\r\n\r\n\t\tif (type === 'array') {\r\n\r\n\t\t\toutput = [];\r\n\t\t\tsize = input.length;\r\n\r\n\t\t\tfor (index=0;index 1) {\n url = parts[1];\n parts = parts[0].split(':');\n\n // add the output credential and username\n output.username = parts[0];\n output.credential = (input || {}).credential || parts[1] || '';\n }\n\n output.url = protocol + url;\n output.urls = [ output.url ];\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js\n// module id = ../../../../openvidu-browser/node_modules/normalice/index.js\n// module chunks = main","/*!\n * Platform.js \n * Copyright 2014-2018 Benjamin Tan \n * Copyright 2011-2013 John-David Dalton \n * Available under MIT license \n */\n;(function() {\n 'use strict';\n\n /** Used to determine if values are of the language type `Object`. */\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n /** Used as a reference to the global object. */\n var root = (objectTypes[typeof window] && window) || this;\n\n /** Backup possible global object. */\n var oldRoot = root;\n\n /** Detect free variable `exports`. */\n var freeExports = objectTypes[typeof exports] && exports;\n\n /** Detect free variable `module`. */\n var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;\n\n /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */\n var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n /**\n * Used as the maximum length of an array-like object.\n * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)\n * for more details.\n */\n var maxSafeInteger = Math.pow(2, 53) - 1;\n\n /** Regular expression to detect Opera. */\n var reOpera = /\\bOpera/;\n\n /** Possible global object. */\n var thisBinding = this;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check for own properties of an object. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to resolve the internal `[[Class]]` of values. */\n var toString = objectProto.toString;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Capitalizes a string value.\n *\n * @private\n * @param {string} string The string to capitalize.\n * @returns {string} The capitalized string.\n */\n function capitalize(string) {\n string = String(string);\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n /**\n * A utility function to clean up the OS name.\n *\n * @private\n * @param {string} os The OS name to clean up.\n * @param {string} [pattern] A `RegExp` pattern matching the OS name.\n * @param {string} [label] A label for the OS.\n */\n function cleanupOS(os, pattern, label) {\n // Platform tokens are defined at:\n // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n var data = {\n '10.0': '10',\n '6.4': '10 Technical Preview',\n '6.3': '8.1',\n '6.2': '8',\n '6.1': 'Server 2008 R2 / 7',\n '6.0': 'Server 2008 / Vista',\n '5.2': 'Server 2003 / XP 64-bit',\n '5.1': 'XP',\n '5.01': '2000 SP1',\n '5.0': '2000',\n '4.0': 'NT',\n '4.90': 'ME'\n };\n // Detect Windows version from platform tokens.\n if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&\n (data = data[/[\\d.]+$/.exec(os)])) {\n os = 'Windows ' + data;\n }\n // Correct character case and cleanup string.\n os = String(os);\n\n if (pattern && label) {\n os = os.replace(RegExp(pattern, 'i'), label);\n }\n\n os = format(\n os.replace(/ ce$/i, ' CE')\n .replace(/\\bhpw/i, 'web')\n .replace(/\\bMacintosh\\b/, 'Mac OS')\n .replace(/_PowerPC\\b/i, ' OS')\n .replace(/\\b(OS X) [^ \\d]+/i, '$1')\n .replace(/\\bMac (OS X)\\b/, '$1')\n .replace(/\\/(\\d)/, ' $1')\n .replace(/_/g, '.')\n .replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i, '')\n .replace(/\\bx86\\.64\\b/gi, 'x86_64')\n .replace(/\\b(Windows Phone) OS\\b/, '$1')\n .replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/, '$1')\n .split(' on ')[0]\n );\n\n return os;\n }\n\n /**\n * An iteration utility for arrays and objects.\n *\n * @private\n * @param {Array|Object} object The object to iterate over.\n * @param {Function} callback The function called per iteration.\n */\n function each(object, callback) {\n var index = -1,\n length = object ? object.length : 0;\n\n if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {\n while (++index < length) {\n callback(object[index], index, object);\n }\n } else {\n forOwn(object, callback);\n }\n }\n\n /**\n * Trim and conditionally capitalize string values.\n *\n * @private\n * @param {string} string The string to format.\n * @returns {string} The formatted string.\n */\n function format(string) {\n string = trim(string);\n return /^(?:webOS|i(?:OS|P))/.test(string)\n ? string\n : capitalize(string);\n }\n\n /**\n * Iterates over an object's own properties, executing the `callback` for each.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} callback The function executed per own property.\n */\n function forOwn(object, callback) {\n for (var key in object) {\n if (hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n\n /**\n * Gets the internal `[[Class]]` of a value.\n *\n * @private\n * @param {*} value The value.\n * @returns {string} The `[[Class]]`.\n */\n function getClassOf(value) {\n return value == null\n ? capitalize(value)\n : toString.call(value).slice(8, -1);\n }\n\n /**\n * Host objects can return type values that are different from their actual\n * data type. The objects we are concerned with usually return non-primitive\n * types of \"object\", \"function\", or \"unknown\".\n *\n * @private\n * @param {*} object The owner of the property.\n * @param {string} property The property to check.\n * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.\n */\n function isHostType(object, property) {\n var type = object != null ? typeof object[property] : 'number';\n return !/^(?:boolean|number|string|undefined)$/.test(type) &&\n (type == 'object' ? !!object[property] : true);\n }\n\n /**\n * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.\n *\n * @private\n * @param {string} string The string to qualify.\n * @returns {string} The qualified string.\n */\n function qualify(string) {\n return String(string).replace(/([ -])(?!$)/g, '$1?');\n }\n\n /**\n * A bare-bones `Array#reduce` like utility function.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function called per iteration.\n * @returns {*} The accumulated result.\n */\n function reduce(array, callback) {\n var accumulator = null;\n each(array, function(value, index) {\n accumulator = callback(accumulator, value, index, array);\n });\n return accumulator;\n }\n\n /**\n * Removes leading and trailing whitespace from a string.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} The trimmed string.\n */\n function trim(string) {\n return String(string).replace(/^ +| +$/g, '');\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Creates a new platform object.\n *\n * @memberOf platform\n * @param {Object|string} [ua=navigator.userAgent] The user agent string or\n * context object.\n * @returns {Object} A platform object.\n */\n function parse(ua) {\n\n /** The environment context object. */\n var context = root;\n\n /** Used to flag when a custom context is provided. */\n var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';\n\n // Juggle arguments.\n if (isCustomContext) {\n context = ua;\n ua = null;\n }\n\n /** Browser navigator object. */\n var nav = context.navigator || {};\n\n /** Browser user agent string. */\n var userAgent = nav.userAgent || '';\n\n ua || (ua = userAgent);\n\n /** Used to flag when `thisBinding` is the [ModuleScope]. */\n var isModuleScope = isCustomContext || thisBinding == oldRoot;\n\n /** Used to detect if browser is like Chrome. */\n var likeChrome = isCustomContext\n ? !!nav.likeChrome\n : /\\bChrome\\b/.test(ua) && !/internal|\\n/i.test(toString.toString());\n\n /** Internal `[[Class]]` value shortcuts. */\n var objectClass = 'Object',\n airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',\n enviroClass = isCustomContext ? objectClass : 'Environment',\n javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),\n phantomClass = isCustomContext ? objectClass : 'RuntimeObject';\n\n /** Detect Java environments. */\n var java = /\\bJava/.test(javaClass) && context.java;\n\n /** Detect Rhino. */\n var rhino = java && getClassOf(context.environment) == enviroClass;\n\n /** A character to represent alpha. */\n var alpha = java ? 'a' : '\\u03b1';\n\n /** A character to represent beta. */\n var beta = java ? 'b' : '\\u03b2';\n\n /** Browser document object. */\n var doc = context.document || {};\n\n /**\n * Detect Opera browser (Presto-based).\n * http://www.howtocreate.co.uk/operaStuff/operaObject.html\n * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini\n */\n var opera = context.operamini || context.opera;\n\n /** Opera `[[Class]]`. */\n var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))\n ? operaClass\n : (opera = null);\n\n /*------------------------------------------------------------------------*/\n\n /** Temporary variable used over the script's lifetime. */\n var data;\n\n /** The CPU architecture. */\n var arch = ua;\n\n /** Platform description array. */\n var description = [];\n\n /** Platform alpha/beta indicator. */\n var prerelease = null;\n\n /** A flag to indicate that environment features should be used to resolve the platform. */\n var useFeatures = ua == userAgent;\n\n /** The browser/environment version. */\n var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();\n\n /** A flag to indicate if the OS ends with \"/ Version\" */\n var isSpecialCasedOS;\n\n /* Detectable layout engines (order is important). */\n var layout = getLayout([\n { 'label': 'EdgeHTML', 'pattern': 'Edge' },\n 'Trident',\n { 'label': 'WebKit', 'pattern': 'AppleWebKit' },\n 'iCab',\n 'Presto',\n 'NetFront',\n 'Tasman',\n 'KHTML',\n 'Gecko'\n ]);\n\n /* Detectable browser names (order is important). */\n var name = getName([\n 'Adobe AIR',\n 'Arora',\n 'Avant Browser',\n 'Breach',\n 'Camino',\n 'Electron',\n 'Epiphany',\n 'Fennec',\n 'Flock',\n 'Galeon',\n 'GreenBrowser',\n 'iCab',\n 'Iceweasel',\n 'K-Meleon',\n 'Konqueror',\n 'Lunascape',\n 'Maxthon',\n { 'label': 'Microsoft Edge', 'pattern': 'Edge' },\n 'Midori',\n 'Nook Browser',\n 'PaleMoon',\n 'PhantomJS',\n 'Raven',\n 'Rekonq',\n 'RockMelt',\n { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },\n 'SeaMonkey',\n { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Sleipnir',\n 'SlimBrowser',\n { 'label': 'SRWare Iron', 'pattern': 'Iron' },\n 'Sunrise',\n 'Swiftfox',\n 'Waterfox',\n 'WebPositive',\n 'Opera Mini',\n { 'label': 'Opera Mini', 'pattern': 'OPiOS' },\n 'Opera',\n { 'label': 'Opera', 'pattern': 'OPR' },\n 'Chrome',\n { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },\n { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },\n { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },\n { 'label': 'IE', 'pattern': 'IEMobile' },\n { 'label': 'IE', 'pattern': 'MSIE' },\n 'Safari'\n ]);\n\n /* Detectable products (order is important). */\n var product = getProduct([\n { 'label': 'BlackBerry', 'pattern': 'BB10' },\n 'BlackBerry',\n { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },\n { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },\n { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },\n { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },\n { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },\n { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },\n { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },\n { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },\n { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },\n 'Google TV',\n 'Lumia',\n 'iPad',\n 'iPod',\n 'iPhone',\n 'Kindle',\n { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Nexus',\n 'Nook',\n 'PlayBook',\n 'PlayStation Vita',\n 'PlayStation',\n 'TouchPad',\n 'Transformer',\n { 'label': 'Wii U', 'pattern': 'WiiU' },\n 'Wii',\n 'Xbox One',\n { 'label': 'Xbox 360', 'pattern': 'Xbox' },\n 'Xoom'\n ]);\n\n /* Detectable manufacturers. */\n var manufacturer = getManufacturer({\n 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },\n 'Archos': {},\n 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },\n 'Asus': { 'Transformer': 1 },\n 'Barnes & Noble': { 'Nook': 1 },\n 'BlackBerry': { 'PlayBook': 1 },\n 'Google': { 'Google TV': 1, 'Nexus': 1 },\n 'HP': { 'TouchPad': 1 },\n 'HTC': {},\n 'LG': {},\n 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },\n 'Motorola': { 'Xoom': 1 },\n 'Nintendo': { 'Wii U': 1, 'Wii': 1 },\n 'Nokia': { 'Lumia': 1 },\n 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },\n 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }\n });\n\n /* Detectable operating systems (order is important). */\n var os = getOS([\n 'Windows Phone',\n 'Android',\n 'CentOS',\n { 'label': 'Chrome OS', 'pattern': 'CrOS' },\n 'Debian',\n 'Fedora',\n 'FreeBSD',\n 'Gentoo',\n 'Haiku',\n 'Kubuntu',\n 'Linux Mint',\n 'OpenBSD',\n 'Red Hat',\n 'SuSE',\n 'Ubuntu',\n 'Xubuntu',\n 'Cygwin',\n 'Symbian OS',\n 'hpwOS',\n 'webOS ',\n 'webOS',\n 'Tablet OS',\n 'Tizen',\n 'Linux',\n 'Mac OS X',\n 'Macintosh',\n 'Mac',\n 'Windows 98;',\n 'Windows '\n ]);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Picks the layout engine from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected layout engine.\n */\n function getLayout(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the manufacturer from an array of guesses.\n *\n * @private\n * @param {Array} guesses An object of guesses.\n * @returns {null|string} The detected manufacturer.\n */\n function getManufacturer(guesses) {\n return reduce(guesses, function(result, value, key) {\n // Lookup the manufacturer by product or scan the UA for the manufacturer.\n return result || (\n value[product] ||\n value[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(product)] ||\n RegExp('\\\\b' + qualify(key) + '(?:\\\\b|\\\\w*\\\\d)', 'i').exec(ua)\n ) && key;\n });\n }\n\n /**\n * Picks the browser name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected browser name.\n */\n function getName(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the OS name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected OS name.\n */\n function getOS(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + '(?:/[\\\\d.]+|[ \\\\w.]*)', 'i').exec(ua)\n )) {\n result = cleanupOS(result, pattern, guess.label || guess);\n }\n return result;\n });\n }\n\n /**\n * Picks the product name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected product name.\n */\n function getProduct(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + ' *\\\\d+[.\\\\w_]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + ' *\\\\w+-[\\\\w]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)', 'i').exec(ua)\n )) {\n // Split by forward slash and append product version if needed.\n if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\\d.]+/.test(result[0])) {\n result[0] += ' ' + result[1];\n }\n // Correct character case and cleanup string.\n guess = guess.label || guess;\n result = format(result[0]\n .replace(RegExp(pattern, 'i'), guess)\n .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')\n .replace(RegExp('(' + guess + ')[-_.]?(\\\\w)', 'i'), '$1 $2'));\n }\n return result;\n });\n }\n\n /**\n * Resolves the version using an array of UA patterns.\n *\n * @private\n * @param {Array} patterns An array of UA patterns.\n * @returns {null|string} The detected version.\n */\n function getVersion(patterns) {\n return reduce(patterns, function(result, pattern) {\n return result || (RegExp(pattern +\n '(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;\n });\n }\n\n /**\n * Returns `platform.description` when the platform object is coerced to a string.\n *\n * @name toString\n * @memberOf platform\n * @returns {string} Returns `platform.description` if available, else an empty string.\n */\n function toStringPlatform() {\n return this.description || '';\n }\n\n /*------------------------------------------------------------------------*/\n\n // Convert layout to an array so we can add extra details.\n layout && (layout = [layout]);\n\n // Detect product names that contain their manufacturer's name.\n if (manufacturer && !product) {\n product = getProduct([manufacturer]);\n }\n // Clean up Google TV.\n if ((data = /\\bGoogle TV\\b/.exec(product))) {\n product = data[0];\n }\n // Detect simulators.\n if (/\\bSimulator\\b/i.test(ua)) {\n product = (product ? product + ' ' : '') + 'Simulator';\n }\n // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.\n if (name == 'Opera Mini' && /\\bOPiOS\\b/.test(ua)) {\n description.push('running in Turbo/Uncompressed mode');\n }\n // Detect IE Mobile 11.\n if (name == 'IE' && /\\blike iPhone OS\\b/.test(ua)) {\n data = parse(ua.replace(/like iPhone OS/, ''));\n manufacturer = data.manufacturer;\n product = data.product;\n }\n // Detect iOS.\n else if (/^iP/.test(product)) {\n name || (name = 'Safari');\n os = 'iOS' + ((data = / OS ([\\d_]+)/i.exec(ua))\n ? ' ' + data[1].replace(/_/g, '.')\n : '');\n }\n // Detect Kubuntu.\n else if (name == 'Konqueror' && !/buntu/i.test(os)) {\n os = 'Kubuntu';\n }\n // Detect Android browsers.\n else if ((manufacturer && manufacturer != 'Google' &&\n ((/Chrome/.test(name) && !/\\bMobile Safari\\b/i.test(ua)) || /\\bVita\\b/.test(product))) ||\n (/\\bAndroid\\b/.test(os) && /^Chrome/.test(name) && /\\bVersion\\//i.test(ua))) {\n name = 'Android Browser';\n os = /\\bAndroid\\b/.test(os) ? os : 'Android';\n }\n // Detect Silk desktop/accelerated modes.\n else if (name == 'Silk') {\n if (!/\\bMobi/i.test(ua)) {\n os = 'Android';\n description.unshift('desktop mode');\n }\n if (/Accelerated *= *true/i.test(ua)) {\n description.unshift('accelerated');\n }\n }\n // Detect PaleMoon identifying as Firefox.\n else if (name == 'PaleMoon' && (data = /\\bFirefox\\/([\\d.]+)\\b/.exec(ua))) {\n description.push('identifying as Firefox ' + data[1]);\n }\n // Detect Firefox OS and products running Firefox.\n else if (name == 'Firefox' && (data = /\\b(Mobile|Tablet|TV)\\b/i.exec(ua))) {\n os || (os = 'Firefox OS');\n product || (product = data[1]);\n }\n // Detect false positives for Firefox/Safari.\n else if (!name || (data = !/\\bMinefield\\b/i.test(ua) && /\\b(?:Firefox|Safari)\\b/.exec(name))) {\n // Escape the `/` for Firefox 1.\n if (name && !product && /[\\/,]|^[^(]+?\\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {\n // Clear name of false positives.\n name = null;\n }\n // Reassign a generic name.\n if ((data = product || manufacturer || os) &&\n (product || manufacturer || /\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(os))) {\n name = /[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(os) ? os : data) + ' Browser';\n }\n }\n // Add Chrome version to description for Electron.\n else if (name == 'Electron' && (data = (/\\bChrome\\/([\\d.]+)\\b/.exec(ua) || 0)[1])) {\n description.push('Chromium ' + data);\n }\n // Detect non-Opera (Presto-based) versions (order is important).\n if (!version) {\n version = getVersion([\n '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$))',\n 'Version',\n qualify(name),\n '(?:Firefox|Minefield|NetFront)'\n ]);\n }\n // Detect stubborn layout engines.\n if ((data =\n layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||\n /\\bOpera\\b/.test(name) && (/\\bOPR\\b/.test(ua) ? 'Blink' : 'Presto') ||\n /\\b(?:Midori|Nook|Safari)\\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||\n !layout && /\\bMSIE\\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||\n layout == 'WebKit' && /\\bPlayStation\\b(?! Vita\\b)/i.test(name) && 'NetFront'\n )) {\n layout = [data];\n }\n // Detect Windows Phone 7 desktop mode.\n if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n name += ' Mobile';\n os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n description.unshift('desktop mode');\n }\n // Detect Windows Phone 8.x desktop mode.\n else if (/\\bWPDesktop\\b/i.test(ua)) {\n name = 'IE Mobile';\n os = 'Windows Phone 8.x';\n description.unshift('desktop mode');\n version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n }\n // Detect IE 11 identifying as other browsers.\n else if (name != 'IE' && layout == 'Trident' && (data = /\\brv:([\\d.]+)/.exec(ua))) {\n if (name) {\n description.push('identifying as ' + name + (version ? ' ' + version : ''));\n }\n name = 'IE';\n version = data[1];\n }\n // Leverage environment features.\n if (useFeatures) {\n // Detect server-side environments.\n // Rhino has a global function while others have a global object.\n if (isHostType(context, 'global')) {\n if (java) {\n data = java.lang.System;\n arch = data.getProperty('os.arch');\n os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');\n }\n if (rhino) {\n try {\n version = context.require('ringo/engine').version.join('.');\n name = 'RingoJS';\n } catch(e) {\n if ((data = context.system) && data.global.system == context.system) {\n name = 'Narwhal';\n os || (os = data[0].os || null);\n }\n }\n if (!name) {\n name = 'Rhino';\n }\n }\n else if (\n typeof context.process == 'object' && !context.process.browser &&\n (data = context.process)\n ) {\n if (typeof data.versions == 'object') {\n if (typeof data.versions.electron == 'string') {\n description.push('Node ' + data.versions.node);\n name = 'Electron';\n version = data.versions.electron;\n } else if (typeof data.versions.nw == 'string') {\n description.push('Chromium ' + version, 'Node ' + data.versions.node);\n name = 'NW.js';\n version = data.versions.nw;\n }\n }\n if (!name) {\n name = 'Node.js';\n arch = data.arch;\n os = data.platform;\n version = /[\\d.]+/.exec(data.version);\n version = version ? version[0] : null;\n }\n }\n }\n // Detect Adobe AIR.\n else if (getClassOf((data = context.runtime)) == airRuntimeClass) {\n name = 'Adobe AIR';\n os = data.flash.system.Capabilities.os;\n }\n // Detect PhantomJS.\n else if (getClassOf((data = context.phantom)) == phantomClass) {\n name = 'PhantomJS';\n version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);\n }\n // Detect IE compatibility modes.\n else if (typeof doc.documentMode == 'number' && (data = /\\bTrident\\/(\\d+)/i.exec(ua))) {\n // We're in compatibility mode when the Trident version + 4 doesn't\n // equal the document mode.\n version = [version, doc.documentMode];\n if ((data = +data[1] + 4) != version[1]) {\n description.push('IE ' + version[1] + ' mode');\n layout && (layout[1] = '');\n version[1] = data;\n }\n version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];\n }\n // Detect IE 11 masking as other browsers.\n else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\\b/.test(name)) {\n description.push('masking as ' + name + ' ' + version);\n name = 'IE';\n version = '11.0';\n layout = ['Trident'];\n os = 'Windows';\n }\n os = os && format(os);\n }\n // Detect prerelease phases.\n if (version && (data =\n /(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(version) ||\n /(?:alpha|beta)(?: ?\\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||\n /\\bMinefield\\b/i.test(ua) && 'a'\n )) {\n prerelease = /b/i.test(data) ? 'beta' : 'alpha';\n version = version.replace(RegExp(data + '\\\\+?$'), '') +\n (prerelease == 'beta' ? beta : alpha) + (/\\d+\\+?/.exec(data) || '');\n }\n // Detect Firefox Mobile.\n if (name == 'Fennec' || name == 'Firefox' && /\\b(?:Android|Firefox OS)\\b/.test(os)) {\n name = 'Firefox Mobile';\n }\n // Obscure Maxthon's unreliable version.\n else if (name == 'Maxthon' && version) {\n version = version.replace(/\\.[\\d.]+/, '.x');\n }\n // Detect Xbox 360 and Xbox One.\n else if (/\\bXbox\\b/i.test(product)) {\n if (product == 'Xbox 360') {\n os = null;\n }\n if (product == 'Xbox 360' && /\\bIEMobile\\b/.test(ua)) {\n description.unshift('mobile mode');\n }\n }\n // Add mobile postfix.\n else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&\n (os == 'Windows CE' || /Mobi/i.test(ua))) {\n name += ' Mobile';\n }\n // Detect IE platform preview.\n else if (name == 'IE' && useFeatures) {\n try {\n if (context.external === null) {\n description.unshift('platform preview');\n }\n } catch(e) {\n description.unshift('embedded');\n }\n }\n // Detect BlackBerry OS version.\n // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp\n else if ((/\\bBlackBerry\\b/.test(product) || /\\bBB10\\b/.test(ua)) && (data =\n (RegExp(product.replace(/ +/g, ' *') + '/([.\\\\d]+)', 'i').exec(ua) || 0)[1] ||\n version\n )) {\n data = [data, /BB10/.test(ua)];\n os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];\n version = null;\n }\n // Detect Opera identifying/masking itself as another browser.\n // http://www.opera.com/support/kb/view/843/\n else if (this != forOwn && product != 'Wii' && (\n (useFeatures && opera) ||\n (/Opera/.test(name) && /\\b(?:MSIE|Firefox)\\b/i.test(ua)) ||\n (name == 'Firefox' && /\\bOS X (?:\\d+\\.){2,}/.test(os)) ||\n (name == 'IE' && (\n (os && !/^Win/.test(os) && version > 5.5) ||\n /\\bWindows XP\\b/.test(os) && version > 8 ||\n version == 8 && !/\\bTrident\\b/.test(ua)\n ))\n ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {\n // When \"identifying\", the UA contains both Opera and the other browser's name.\n data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');\n if (reOpera.test(name)) {\n if (/\\bIE\\b/.test(data) && os == 'Mac OS') {\n os = null;\n }\n data = 'identify' + data;\n }\n // When \"masking\", the UA contains only the other browser's name.\n else {\n data = 'mask' + data;\n if (operaClass) {\n name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));\n } else {\n name = 'Opera';\n }\n if (/\\bIE\\b/.test(data)) {\n os = null;\n }\n if (!useFeatures) {\n version = null;\n }\n }\n layout = ['Presto'];\n description.push(data);\n }\n // Detect WebKit Nightly and approximate Chrome/Safari versions.\n if ((data = (/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n // Correct build number for numeric comparison.\n // (e.g. \"532.5\" becomes \"532.05\")\n data = [parseFloat(data.replace(/\\.(\\d)$/, '.0$1')), data];\n // Nightly builds are postfixed with a \"+\".\n if (name == 'Safari' && data[1].slice(-1) == '+') {\n name = 'WebKit Nightly';\n prerelease = 'alpha';\n version = data[1].slice(0, -1);\n }\n // Clear incorrect browser versions.\n else if (version == data[1] ||\n version == (data[2] = (/\\bSafari\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n version = null;\n }\n // Use the full Chrome version when available.\n data[1] = (/\\bChrome\\/([\\d.]+)/i.exec(ua) || 0)[1];\n // Detect Blink layout engine.\n if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {\n layout = ['Blink'];\n }\n // Detect JavaScriptCore.\n // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi\n if (!useFeatures || (!likeChrome && !data[1])) {\n layout && (layout[1] = 'like Safari');\n data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8');\n } else {\n layout && (layout[1] = 'like Chrome');\n data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');\n }\n // Add the postfix of \".x\" or \"+\" for approximate versions.\n layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));\n // Obscure version for some Safari 1-2 releases.\n if (name == 'Safari' && (!version || parseInt(version) > 45)) {\n version = data;\n }\n }\n // Detect Opera desktop modes.\n if (name == 'Opera' && (data = /\\bzbov|zvav$/.exec(os))) {\n name += ' ';\n description.unshift('desktop mode');\n if (data == 'zvav') {\n name += 'Mini';\n version = null;\n } else {\n name += 'Mobile';\n }\n os = os.replace(RegExp(' *' + data + '$'), '');\n }\n // Detect Chrome desktop mode.\n else if (name == 'Safari' && /\\bChrome\\b/.exec(layout && layout[1])) {\n description.unshift('desktop mode');\n name = 'Chrome Mobile';\n version = null;\n\n if (/\\bOS X\\b/.test(os)) {\n manufacturer = 'Apple';\n os = 'iOS 4.3+';\n } else {\n os = null;\n }\n }\n // Strip incorrect OS versions.\n if (version && version.indexOf((data = /[\\d.]+$/.exec(os))) == 0 &&\n ua.indexOf('/' + data + '-') > -1) {\n os = trim(os.replace(data, ''));\n }\n // Add layout engine.\n if (layout && !/\\b(?:Avant|Nook)\\b/.test(name) && (\n /Browser|Lunascape|Maxthon/.test(name) ||\n name != 'Safari' && /^iOS/.test(os) && /\\bSafari\\b/.test(layout[1]) ||\n /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) {\n // Don't add layout details to description if they are falsey.\n (data = layout[layout.length - 1]) && description.push(data);\n }\n // Combine contextual information.\n if (description.length) {\n description = ['(' + description.join('; ') + ')'];\n }\n // Append manufacturer to description.\n if (manufacturer && product && product.indexOf(manufacturer) < 0) {\n description.push('on ' + manufacturer);\n }\n // Append product to description.\n if (product) {\n description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);\n }\n // Parse the OS into an object.\n if (os) {\n data = / ([\\d.+]+)$/.exec(os);\n isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';\n os = {\n 'architecture': 32,\n 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,\n 'version': data ? data[1] : null,\n 'toString': function() {\n var version = this.version;\n return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');\n }\n };\n }\n // Add browser/OS architecture.\n if ((data = /\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(arch)) && !/\\bi686\\b/i.test(arch)) {\n if (os) {\n os.architecture = 64;\n os.family = os.family.replace(RegExp(' *' + data), '');\n }\n if (\n name && (/\\bWOW64\\b/i.test(ua) ||\n (useFeatures && /\\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\\bWin64; x64\\b/i.test(ua)))\n ) {\n description.unshift('32-bit');\n }\n }\n // Chrome 39 and above on OS X is always 64-bit.\n else if (\n os && /^OS X/.test(os.family) &&\n name == 'Chrome' && parseFloat(version) >= 39\n ) {\n os.architecture = 64;\n }\n\n ua || (ua = null);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The platform object.\n *\n * @name platform\n * @type Object\n */\n var platform = {};\n\n /**\n * The platform description.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.description = ua;\n\n /**\n * The name of the browser's layout engine.\n *\n * The list of common layout engines include:\n * \"Blink\", \"EdgeHTML\", \"Gecko\", \"Trident\" and \"WebKit\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.layout = layout && layout[0];\n\n /**\n * The name of the product's manufacturer.\n *\n * The list of manufacturers include:\n * \"Apple\", \"Archos\", \"Amazon\", \"Asus\", \"Barnes & Noble\", \"BlackBerry\",\n * \"Google\", \"HP\", \"HTC\", \"LG\", \"Microsoft\", \"Motorola\", \"Nintendo\",\n * \"Nokia\", \"Samsung\" and \"Sony\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.manufacturer = manufacturer;\n\n /**\n * The name of the browser/environment.\n *\n * The list of common browser names include:\n * \"Chrome\", \"Electron\", \"Firefox\", \"Firefox for iOS\", \"IE\",\n * \"Microsoft Edge\", \"PhantomJS\", \"Safari\", \"SeaMonkey\", \"Silk\",\n * \"Opera Mini\" and \"Opera\"\n *\n * Mobile versions of some browsers have \"Mobile\" appended to their name:\n * eg. \"Chrome Mobile\", \"Firefox Mobile\", \"IE Mobile\" and \"Opera Mobile\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.name = name;\n\n /**\n * The alpha/beta release indicator.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.prerelease = prerelease;\n\n /**\n * The name of the product hosting the browser.\n *\n * The list of common products include:\n *\n * \"BlackBerry\", \"Galaxy S4\", \"Lumia\", \"iPad\", \"iPod\", \"iPhone\", \"Kindle\",\n * \"Kindle Fire\", \"Nexus\", \"Nook\", \"PlayBook\", \"TouchPad\" and \"Transformer\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.product = product;\n\n /**\n * The browser's user agent string.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.ua = ua;\n\n /**\n * The browser/environment version.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.version = name && version;\n\n /**\n * The name of the operating system.\n *\n * @memberOf platform\n * @type Object\n */\n platform.os = os || {\n\n /**\n * The CPU architecture the OS is built for.\n *\n * @memberOf platform.os\n * @type number|null\n */\n 'architecture': null,\n\n /**\n * The family of the OS.\n *\n * Common values include:\n * \"Windows\", \"Windows Server 2008 R2 / 7\", \"Windows Server 2008 / Vista\",\n * \"Windows XP\", \"OS X\", \"Ubuntu\", \"Debian\", \"Fedora\", \"Red Hat\", \"SuSE\",\n * \"Android\", \"iOS\" and \"Windows Phone\"\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'family': null,\n\n /**\n * The version of the OS.\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'version': null,\n\n /**\n * Returns the OS string.\n *\n * @memberOf platform.os\n * @returns {string} The OS string.\n */\n 'toString': function() { return 'null'; }\n };\n\n platform.parse = parse;\n platform.toString = toStringPlatform;\n\n if (platform.version) {\n description.unshift(version);\n }\n if (platform.name) {\n description.unshift(name);\n }\n if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {\n description.push(product ? '(' + os + ')' : 'on ' + os);\n }\n if (description.length) {\n platform.description = description.join(' ');\n }\n return platform;\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Export platform.\n var platform = parse();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose platform on the global object to prevent errors when platform is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n root.platform = platform;\n\n // Define as an anonymous module so platform can be aliased through path mapping.\n define(function() {\n return platform;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && freeModule) {\n // Export for CommonJS support.\n forOwn(platform, function(value, key) {\n freeExports[key] = value;\n });\n }\n else {\n // Export to the global object.\n root.platform = platform;\n }\n}.call(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/platform/platform.js\n// module id = ../../../../openvidu-browser/node_modules/platform/platform.js\n// module chunks = main","var grammar = module.exports = {\n v: [{\n name: 'version',\n reg: /^(\\d*)$/\n }],\n o: [{ //o=- 20518 0 IN IP4 203.0.113.1\n // NB: sessionId will be a String in most cases because it is huge\n name: 'origin',\n reg: /^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\n format: \"%s %s %d %s IP%d %s\"\n }],\n // default parsing of these only (though some of these feel outdated)\n s: [{ name: 'name' }],\n i: [{ name: 'description' }],\n u: [{ name: 'uri' }],\n e: [{ name: 'email' }],\n p: [{ name: 'phone' }],\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\n //k: [{}], // outdated thing ignored\n t: [{ //t=0 0\n name: 'timing',\n reg: /^(\\d*) (\\d*)/,\n names: ['start', 'stop'],\n format: \"%d %d\"\n }],\n c: [{ //c=IN IP4 10.47.197.26\n name: 'connection',\n reg: /^IN IP(\\d) (\\S*)/,\n names: ['version', 'ip'],\n format: \"IN IP%d %s\"\n }],\n b: [{ //b=AS:4000\n push: 'bandwidth',\n reg: /^(TIAS|AS|CT|RR|RS):(\\d*)/,\n names: ['type', 'limit'],\n format: \"%s:%s\"\n }],\n m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31\n // NB: special - pushes to session\n // TODO: rtp/fmtp should be filtered by the payloads found here?\n reg: /^(\\w*) (\\d*) ([\\w\\/]*)(?: (.*))?/,\n names: ['type', 'port', 'protocol', 'payloads'],\n format: \"%s %d %s %s\"\n }],\n a: [\n { //a=rtpmap:110 opus/48000/2\n push: 'rtp',\n reg: /^rtpmap:(\\d*) ([\\w\\-]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,\n names: ['payload', 'codec', 'rate', 'encoding'],\n format: function (o) {\n return (o.encoding) ?\n \"rtpmap:%d %s/%s/%s\":\n o.rate ?\n \"rtpmap:%d %s/%s\":\n \"rtpmap:%d %s\";\n }\n },\n {\n //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\n //a=fmtp:111 minptime=10; useinbandfec=1\n push: 'fmtp',\n reg: /^fmtp:(\\d*) ([\\S| ]*)/,\n names: ['payload', 'config'],\n format: \"fmtp:%d %s\"\n },\n { //a=control:streamid=0\n name: 'control',\n reg: /^control:(.*)/,\n format: \"control:%s\"\n },\n { //a=rtcp:65179 IN IP4 193.84.77.194\n name: 'rtcp',\n reg: /^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,\n names: ['port', 'netType', 'ipVer', 'address'],\n format: function (o) {\n return (o.address != null) ?\n \"rtcp:%d %s IP%d %s\":\n \"rtcp:%d\";\n }\n },\n { //a=rtcp-fb:98 trr-int 100\n push: 'rtcpFbTrrInt',\n reg: /^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,\n names: ['payload', 'value'],\n format: \"rtcp-fb:%d trr-int %d\"\n },\n { //a=rtcp-fb:98 nack rpsi\n push: 'rtcpFb',\n reg: /^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,\n names: ['payload', 'type', 'subtype'],\n format: function (o) {\n return (o.subtype != null) ?\n \"rtcp-fb:%s %s %s\":\n \"rtcp-fb:%s %s\";\n }\n },\n { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n //a=extmap:1/recvonly URI-gps-string\n push: 'ext',\n reg: /^extmap:([\\w_\\/]*) (\\S*)(?: (\\S*))?/,\n names: ['value', 'uri', 'config'], // value may include \"/direction\" suffix\n format: function (o) {\n return (o.config != null) ?\n \"extmap:%s %s %s\":\n \"extmap:%s %s\";\n }\n },\n {\n //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\n push: 'crypto',\n reg: /^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,\n names: ['id', 'suite', 'config', 'sessionConfig'],\n format: function (o) {\n return (o.sessionConfig != null) ?\n \"crypto:%d %s %s %s\":\n \"crypto:%d %s %s\";\n }\n },\n { //a=setup:actpass\n name: 'setup',\n reg: /^setup:(\\w*)/,\n format: \"setup:%s\"\n },\n { //a=mid:1\n name: 'mid',\n reg: /^mid:([^\\s]*)/,\n format: \"mid:%s\"\n },\n { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\n name: 'msid',\n reg: /^msid:(.*)/,\n format: \"msid:%s\"\n },\n { //a=ptime:20\n name: 'ptime',\n reg: /^ptime:(\\d*)/,\n format: \"ptime:%d\"\n },\n { //a=maxptime:60\n name: 'maxptime',\n reg: /^maxptime:(\\d*)/,\n format: \"maxptime:%d\"\n },\n { //a=sendrecv\n name: 'direction',\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\n },\n { //a=ice-lite\n name: 'icelite',\n reg: /^(ice-lite)/\n },\n { //a=ice-ufrag:F7gI\n name: 'iceUfrag',\n reg: /^ice-ufrag:(\\S*)/,\n format: \"ice-ufrag:%s\"\n },\n { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g\n name: 'icePwd',\n reg: /^ice-pwd:(\\S*)/,\n format: \"ice-pwd:%s\"\n },\n { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\n name: 'fingerprint',\n reg: /^fingerprint:(\\S*) (\\S*)/,\n names: ['type', 'hash'],\n format: \"fingerprint:%s %s\"\n },\n {\n //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\n //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0\n //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0\n //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0\n //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0\n push:'candidates',\n reg: /^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?/,\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'],\n format: function (o) {\n var str = \"candidate:%s %d %s %d %s %d typ %s\";\n\n str += (o.raddr != null) ? \" raddr %s rport %d\" : \"%v%v\";\n\n // NB: candidate has three optional chunks, so %void middles one if it's missing\n str += (o.tcptype != null) ? \" tcptype %s\" : \"%v\";\n\n if (o.generation != null) {\n str += \" generation %d\";\n }\n return str;\n }\n },\n { //a=end-of-candidates (keep after the candidates line for readability)\n name: 'endOfCandidates',\n reg: /^(end-of-candidates)/\n },\n { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\n name: 'remoteCandidates',\n reg: /^remote-candidates:(.*)/,\n format: \"remote-candidates:%s\"\n },\n { //a=ice-options:google-ice\n name: 'iceOptions',\n reg: /^ice-options:(\\S*)/,\n format: \"ice-options:%s\"\n },\n { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\n push: \"ssrcs\",\n reg: /^ssrc:(\\d*) ([\\w_]*):(.*)/,\n names: ['id', 'attribute', 'value'],\n format: \"ssrc:%d %s:%s\"\n },\n { //a=ssrc-group:FEC 1 2\n push: \"ssrcGroups\",\n reg: /^ssrc-group:(\\w*) (.*)/,\n names: ['semantics', 'ssrcs'],\n format: \"ssrc-group:%s %s\"\n },\n { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\n name: \"msidSemantic\",\n reg: /^msid-semantic:\\s?(\\w*) (\\S*)/,\n names: ['semantic', 'token'],\n format: \"msid-semantic: %s %s\" // space after \":\" is not accidental\n },\n { //a=group:BUNDLE audio video\n push: 'groups',\n reg: /^group:(\\w*) (.*)/,\n names: ['type', 'mids'],\n format: \"group:%s %s\"\n },\n { //a=rtcp-mux\n name: 'rtcpMux',\n reg: /^(rtcp-mux)/\n },\n { //a=rtcp-rsize\n name: 'rtcpRsize',\n reg: /^(rtcp-rsize)/\n },\n { // any a= that we don't understand is kepts verbatim on media.invalid\n push: 'invalid',\n names: [\"value\"]\n }\n ]\n};\n\n// set sensible defaults to avoid polluting the grammar with boring details\nObject.keys(grammar).forEach(function (key) {\n var objs = grammar[key];\n objs.forEach(function (obj) {\n if (!obj.reg) {\n obj.reg = /(.*)/;\n }\n if (!obj.format) {\n obj.format = \"%s\";\n }\n });\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module chunks = main","var parser = require('./parser');\nvar writer = require('./writer');\n\nexports.write = writer;\nexports.parse = parser.parse;\nexports.parseFmtpConfig = parser.parseFmtpConfig;\nexports.parsePayloads = parser.parsePayloads;\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module chunks = main","var toIntIfInt = function (v) {\n return String(Number(v)) === v ? Number(v) : v;\n};\n\nvar attachProperties = function (match, location, names, rawName) {\n if (rawName && !names) {\n location[rawName] = toIntIfInt(match[1]);\n }\n else {\n for (var i = 0; i < names.length; i += 1) {\n if (match[i+1] != null) {\n location[names[i]] = toIntIfInt(match[i+1]);\n }\n }\n }\n};\n\nvar parseReg = function (obj, location, content) {\n var needsBlank = obj.name && obj.names;\n if (obj.push && !location[obj.push]) {\n location[obj.push] = [];\n }\n else if (needsBlank && !location[obj.name]) {\n location[obj.name] = {};\n }\n var keyLocation = obj.push ?\n {} : // blank object that will be pushed\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\n\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\n\n if (obj.push) {\n location[obj.push].push(keyLocation);\n }\n};\n\nvar grammar = require('./grammar');\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\n\nexports.parse = function (sdp) {\n var session = {}\n , media = []\n , location = session; // points at where properties go under (one of the above)\n\n // parse lines we understand\n sdp.split(/(\\r\\n|\\r|\\n)/).filter(validLine).forEach(function (l) {\n var type = l[0];\n var content = l.slice(2);\n if (type === 'm') {\n media.push({rtp: [], fmtp: []});\n location = media[media.length-1]; // point at latest media line\n }\n\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\n var obj = grammar[type][j];\n if (obj.reg.test(content)) {\n return parseReg(obj, location, content);\n }\n }\n });\n\n session.media = media; // link it up\n return session;\n};\n\nvar fmtpReducer = function (acc, expr) {\n var s = expr.split('=');\n if (s.length === 2) {\n acc[s[0]] = toIntIfInt(s[1]);\n }\n return acc;\n};\n\nexports.parseFmtpConfig = function (str) {\n return str.split(/\\;\\s?/).reduce(fmtpReducer, {});\n};\n\nexports.parsePayloads = function (str) {\n return str.split(' ').map(Number);\n};\n\nexports.parseRemoteCandidates = function (str) {\n var candidates = [];\n var parts = str.split(' ').map(toIntIfInt);\n for (var i = 0; i < parts.length; i += 3) {\n candidates.push({\n component: parts[i],\n ip: parts[i + 1],\n port: parts[i + 2]\n });\n }\n return candidates;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module chunks = main","var grammar = require('./grammar');\n\n// customized util.format - discards excess arguments and can void middle ones\nvar formatRegExp = /%[sdv%]/g;\nvar format = function (formatStr) {\n var i = 1;\n var args = arguments;\n var len = args.length;\n return formatStr.replace(formatRegExp, function (x) {\n if (i >= len) {\n return x; // missing argument\n }\n var arg = args[i];\n i += 1;\n switch (x) {\n case '%%':\n return '%';\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg);\n case '%v':\n return '';\n }\n });\n // NB: we discard excess arguments - they are typically undefined from makeLine\n};\n\nvar makeLine = function (type, obj, location) {\n var str = obj.format instanceof Function ?\n (obj.format(obj.push ? location : location[obj.name])) :\n obj.format;\n\n var args = [type + '=' + str];\n if (obj.names) {\n for (var i = 0; i < obj.names.length; i += 1) {\n var n = obj.names[i];\n if (obj.name) {\n args.push(location[obj.name][n]);\n }\n else { // for mLine and push attributes\n args.push(location[obj.names[i]]);\n }\n }\n }\n else {\n args.push(location[obj.name]);\n }\n return format.apply(null, args);\n};\n\n// RFC specified order\n// TODO: extend this with all the rest\nvar defaultOuterOrder = [\n 'v', 'o', 's', 'i',\n 'u', 'e', 'p', 'c',\n 'b', 't', 'r', 'z', 'a'\n];\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\n\n\nmodule.exports = function (session, opts) {\n opts = opts || {};\n // ensure certain properties exist\n if (session.version == null) {\n session.version = 0; // \"v=0\" must be there (only defined version atm)\n }\n if (session.name == null) {\n session.name = \" \"; // \"s= \" must be there if no meaningful name set\n }\n session.media.forEach(function (mLine) {\n if (mLine.payloads == null) {\n mLine.payloads = \"\";\n }\n });\n\n var outerOrder = opts.outerOrder || defaultOuterOrder;\n var innerOrder = opts.innerOrder || defaultInnerOrder;\n var sdp = [];\n\n // loop through outerOrder for matching properties on session\n outerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in session && session[obj.name] != null) {\n sdp.push(makeLine(type, obj, session));\n }\n else if (obj.push in session && session[obj.push] != null) {\n session[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n\n // then for each media line, follow the innerOrder\n session.media.forEach(function (mLine) {\n sdp.push(makeLine('m', grammar.m[0], mLine));\n\n innerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in mLine && mLine[obj.name] != null) {\n sdp.push(makeLine(type, obj, mLine));\n }\n else if (obj.push in mLine && mLine[obj.push] != null) {\n mLine[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n });\n\n return sdp.join('\\r\\n') + '\\r\\n';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l = this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!arrayEquals.apply(this[i], [array[i]]))\n return false;\n } else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal:\n // {x:20} != {x:20}\n return false;\n }\n }\n return true;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexports.Interop = require('./interop');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* global RTCSessionDescription */\n/* global RTCIceCandidate */\n/* jshint -W097 */\n\"use strict\";\n\nvar transform = require('./transform');\nvar arrayEquals = require('./array-equals');\n\nfunction Interop() {\n\n /**\n * This map holds the most recent Unified Plan offer/answer SDP that was\n * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and\n * the SDP string as values.\n *\n * @type {{}}\n */\n this.cache = {\n mlB2UMap : {},\n mlU2BMap : {}\n };\n}\n\nmodule.exports = Interop;\n\n/**\n * Changes the candidate args to match with the related Unified Plan\n */\nInterop.prototype.candidateToUnifiedPlan = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex];\n /* TODO: change sdpMid to (audio|video)-SSRC */\n\n return cand;\n};\n\n/**\n * Changes the candidate args to match with the related Plan B\n */\nInterop.prototype.candidateToPlanB = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n if (cand.sdpMid.indexOf('audio') === 0) {\n cand.sdpMid = 'audio';\n } else if (cand.sdpMid.indexOf('video') === 0) {\n cand.sdpMid = 'video';\n } else {\n throw new Error('candidate with ' + cand.sdpMid + ' not allowed');\n }\n\n cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex];\n\n return cand;\n};\n\n/**\n * Returns the index of the first m-line with the given media type and with a\n * direction which allows sending, in the last Unified Plan description with\n * type \"answer\" converted to Plan B. Returns {null} if there is no saved\n * answer, or if none of its m-lines with the given type allow sending.\n * @param type the media type (\"audio\" or \"video\").\n * @returns {*}\n */\nInterop.prototype.getFirstSendingIndexFromAnswer = function(type) {\n if (!this.cache.answer) {\n return null;\n }\n\n var session = transform.parse(this.cache.answer);\n if (session && session.media && Array.isArray(session.media)){\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type == type &&\n (!session.media[i].direction /* default to sendrecv */ ||\n session.media[i].direction === 'sendrecv' ||\n session.media[i].direction === 'sendonly')){\n return i;\n }\n }\n }\n\n return null;\n};\n\n/**\n * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A\n * PeerConnection wrapper transforms the SDP to Plan B before passing it to the\n * application.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toPlanB = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n // Objectify the SDP for easier manipulation.\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Unified Plan SDP. Plan B\n // SDP has a video, an audio and a data \"channel\" at most.\n if (session.media.length <= 3 && session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Unified Plan.');\n return desc;\n }\n\n //#endregion\n\n // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443\n var sdp = desc.sdp;\n var rewrite = false;\n for (var i = 0; i < session.media.length; i++) {\n var uLine = session.media[i];\n uLine.rtp.forEach(function(rtp) {\n if (rtp.codec === 'NULL')\n {\n rewrite = true;\n var offer = transform.parse(self.cache.offer);\n rtp.codec = offer.media[i].rtp[0].codec;\n }\n });\n }\n if (rewrite) {\n sdp = transform.write(session);\n }\n\n // Unified Plan SDP is our \"precious\". Cache it for later use in the Plan B\n // -> Unified Plan transformation.\n this.cache[desc.type] = sdp;\n\n //#region Convert from Unified Plan to Plan B.\n\n // We rebuild the session.media array.\n var media = session.media;\n session.media = [];\n\n // Associative array that maps channel types to channel objects for fast\n // access to channel objects by their type, e.g. type2bl['audio']->channel\n // obj.\n var type2bl = {};\n\n // Used to build the group:BUNDLE value after the channels construction\n // loop.\n var types = [];\n\n media.forEach(function(uLine) {\n // rtcp-mux is required in the Plan B SDP.\n if ((typeof uLine.rtcpMux !== 'string' ||\n uLine.rtcpMux !== 'rtcp-mux') &&\n uLine.direction !== 'inactive') {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'without the rtcp-mux attribute were found.');\n }\n\n // If we don't have a channel for this uLine.type OR the selected is\n // inactive, then select this uLine as the channel basis.\n if (typeof type2bl[uLine.type] === 'undefined' ||\n type2bl[uLine.type].direction === 'inactive') {\n type2bl[uLine.type] = uLine;\n }\n\n if (uLine.protocol != type2bl[uLine.type].protocol) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different protocols and this library does not have ' +\n 'support for that');\n }\n\n if (uLine.payloads != type2bl[uLine.type].payloads) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different payloads and this library does not have ' +\n 'support for that');\n }\n\n });\n\n // Implode the Unified Plan m-lines/tracks into Plan B channels.\n media.forEach(function(uLine) {\n if (uLine.type === 'application') {\n session.media.push(uLine);\n types.push(uLine.mid);\n return;\n }\n\n // Add sources to the channel and handle a=msid.\n if (typeof uLine.sources === 'object') {\n Object.keys(uLine.sources).forEach(function(ssrc) {\n if (typeof type2bl[uLine.type].sources !== 'object')\n type2bl[uLine.type].sources = {};\n\n // Assign the sources to the channel.\n type2bl[uLine.type].sources[ssrc] =\n uLine.sources[ssrc];\n\n if (typeof uLine.msid !== 'undefined') {\n // In Plan B the msid is an SSRC attribute. Also, we don't\n // care about the obsolete label and mslabel attributes.\n //\n // Note that it is not guaranteed that the uLine will\n // have an msid. recvonly channels in particular don't have\n // one.\n type2bl[uLine.type].sources[ssrc].msid =\n uLine.msid;\n }\n // NOTE ssrcs in ssrc groups will share msids, as\n // draft-uberti-rtcweb-plan-00 mandates.\n });\n }\n\n // Add ssrc groups to the channel.\n if (typeof uLine.ssrcGroups !== 'undefined' &&\n Array.isArray(uLine.ssrcGroups)) {\n\n // Create the ssrcGroups array, if it's not defined.\n if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' ||\n !Array.isArray(type2bl[uLine.type].ssrcGroups)) {\n type2bl[uLine.type].ssrcGroups = [];\n }\n\n type2bl[uLine.type].ssrcGroups =\n type2bl[uLine.type].ssrcGroups.concat(\n uLine.ssrcGroups);\n }\n\n if (type2bl[uLine.type] === uLine) {\n // Plan B mids are in ['audio', 'video', 'data']\n uLine.mid = uLine.type;\n\n // Plan B doesn't support/need the bundle-only attribute.\n delete uLine.bundleOnly;\n\n // In Plan B the msid is an SSRC attribute.\n delete uLine.msid;\n\n\t if (uLine.type == media[0].type) {\n\t types.unshift(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.unshift(uLine);\n\t } else {\n\t types.push(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.push(uLine);\n\t }\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group with the new mids.\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = types.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n/* follow rules defined in RFC4145 */\nfunction addSetupAttr(uLine) {\n if (typeof uLine.setup === 'undefined') {\n return;\n }\n\n if (uLine.setup === \"active\") {\n uLine.setup = \"passive\";\n } else if (uLine.setup === \"passive\") {\n uLine.setup = \"active\";\n }\n}\n\n/**\n * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A\n * PeerConnection wrapper transforms the SDP to Unified Plan before passing it\n * to FF.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toUnifiedPlan = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Plan B SDP. Plan B SDP has\n // a video, an audio and a data \"channel\" at most.\n if (session.media.length > 3 || !session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Plan B.');\n return desc;\n }\n\n // Make sure this Plan B SDP can be converted to a Unified Plan SDP.\n var mids = [];\n session.media.forEach(function(m) {\n mids.push(m.mid);\n });\n\n var hasBundle = false;\n if (typeof session.groups !== 'undefined' &&\n Array.isArray(session.groups)) {\n hasBundle = session.groups.every(function(g) {\n return g.type !== 'BUNDLE' ||\n arrayEquals.apply(g.mids.sort(), [mids.sort()]);\n });\n }\n\n if (!hasBundle) {\n var mustBeBundle = false;\n\n session.media.forEach(function(m) {\n if (m.direction !== 'inactive') {\n mustBeBundle = true;\n }\n });\n\n if (mustBeBundle) {\n throw new Error(\"Cannot convert to Unified Plan because m-lines that\" +\n \" are not bundled were found.\");\n }\n }\n\n //#endregion\n\n\n //#region Convert from Plan B to Unified Plan.\n\n // Unfortunately, a Plan B offer/answer doesn't have enough information to\n // rebuild an equivalent Unified Plan offer/answer.\n //\n // For example, if this is a local answer (in Unified Plan style) that we\n // convert to Plan B prior to handing it over to the application (the\n // PeerConnection wrapper called us, for instance, after a successful\n // createAnswer), we want to remember the m-line at which we've seen the\n // (local) SSRC. That's because when the application wants to do call the\n // SLD method, forcing us to do the inverse transformation (from Plan B to\n // Unified Plan), we need to know to which m-line to assign the (local)\n // SSRC. We also need to know all the other m-lines that the original\n // answer had and include them in the transformed answer as well.\n //\n // Another example is if this is a remote offer that we convert to Plan B\n // prior to giving it to the application, we want to remember the mid at\n // which we've seen the (remote) SSRC.\n //\n // In the iteration that follows, we use the cached Unified Plan (if it\n // exists) to assign mids to ssrcs.\n\n var type;\n if (desc.type === 'answer') {\n type = 'offer';\n } else if (desc.type === 'offer') {\n type = 'answer';\n } else {\n throw new Error(\"Type '\" + desc.type + \"' not supported.\");\n }\n\n var cached;\n if (typeof this.cache[type] !== 'undefined') {\n cached = transform.parse(this.cache[type]);\n }\n\n var recvonlySsrcs = {\n audio: {},\n video: {}\n };\n\n // A helper map that sends mids to m-line objects. We use it later to\n // rebuild the Unified Plan style session.media array.\n var mid2ul = {};\n var bIdx = 0;\n var uIdx = 0;\n\n var sources2ul = {};\n\n var candidates;\n var iceUfrag;\n var icePwd;\n var fingerprint;\n var payloads = {};\n var rtcpFb = {};\n var rtp = {};\n\n session.media.forEach(function(bLine) {\n if ((typeof bLine.rtcpMux !== 'string' ||\n bLine.rtcpMux !== 'rtcp-mux') &&\n bLine.direction !== 'inactive') {\n throw new Error(\"Cannot convert to Unified Plan because m-lines \" +\n \"without the rtcp-mux attribute were found.\");\n }\n\n if (bLine.type === 'application') {\n mid2ul[bLine.mid] = bLine;\n return;\n }\n\n // With rtcp-mux and bundle all the channels should have the same ICE\n // stuff.\n var sources = bLine.sources;\n var ssrcGroups = bLine.ssrcGroups;\n var port = bLine.port;\n\n /* Chrome adds different candidates even using bundle, so we concat the candidates list */\n if (typeof bLine.candidates != 'undefined') {\n if (typeof candidates != 'undefined') {\n candidates = candidates.concat(bLine.candidates);\n } else {\n candidates = bLine.candidates;\n }\n }\n\n if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) {\n throw new Error(\"Only BUNDLE supported, iceUfrag must be the same for all m-lines.\\n\" +\n \"\\tLast iceUfrag: \" + iceUfrag + \"\\n\" +\n \"\\tNew iceUfrag: \" + bLine.iceUfrag\n );\n }\n\n if (typeof bLine.iceUfrag != 'undefined') {\n iceUfrag = bLine.iceUfrag;\n }\n\n if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) {\n throw new Error(\"Only BUNDLE supported, icePwd must be the same for all m-lines.\\n\" +\n \"\\tLast icePwd: \" + icePwd + \"\\n\" +\n \"\\tNew icePwd: \" + bLine.icePwd\n );\n }\n\n if (typeof bLine.icePwd != 'undefined') {\n icePwd = bLine.icePwd;\n }\n\n if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') &&\n (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) {\n throw new Error(\"Only BUNDLE supported, fingerprint must be the same for all m-lines.\\n\" +\n \"\\tLast fingerprint: \" + JSON.stringify(fingerprint) + \"\\n\" +\n \"\\tNew fingerprint: \" + JSON.stringify(bLine.fingerprint)\n );\n }\n\n if (typeof bLine.fingerprint != 'undefined') {\n fingerprint = bLine.fingerprint;\n }\n\n payloads[bLine.type] = bLine.payloads;\n rtcpFb[bLine.type] = bLine.rtcpFb;\n rtp[bLine.type] = bLine.rtp;\n\n // inverted ssrc group map\n var ssrc2group = {};\n if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) {\n ssrcGroups.forEach(function (ssrcGroup) {\n // XXX This might brake if an SSRC is in more than one group\n // for some reason.\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs.forEach(function (ssrc) {\n if (typeof ssrc2group[ssrc] === 'undefined') {\n ssrc2group[ssrc] = [];\n }\n\n ssrc2group[ssrc].push(ssrcGroup);\n });\n }\n });\n }\n\n // ssrc to m-line index.\n var ssrc2ml = {};\n\n if (typeof sources === 'object') {\n\n // We'll use the \"bLine\" object as a prototype for each new \"mLine\"\n // that we create, but first we need to clean it up a bit.\n delete bLine.sources;\n delete bLine.ssrcGroups;\n delete bLine.candidates;\n delete bLine.iceUfrag;\n delete bLine.icePwd;\n delete bLine.fingerprint;\n delete bLine.port;\n delete bLine.mid;\n\n // Explode the Plan B channel sources with one m-line per source.\n Object.keys(sources).forEach(function(ssrc) {\n\n // The (unified) m-line for this SSRC. We either create it from\n // scratch or, if it's a grouped SSRC, we re-use a related\n // mline. In other words, if the source is grouped with another\n // source, put the two together in the same m-line.\n var uLine;\n\n // We assume here that we are the answerer in the O/A, so any\n // offers which we translate come from the remote side, while\n // answers are local. So the check below is to make that we\n // handle receive-only SSRCs in a special way only if they come\n // from the remote side.\n if (desc.type==='offer') {\n // We want to detect SSRCs which are used by a remote peer\n // in an m-line with direction=recvonly (i.e. they are\n // being used for RTCP only).\n // This information would have gotten lost if the remote\n // peer used Unified Plan and their local description was\n // translated to Plan B. So we use the lack of an MSID\n // attribute to deduce a \"receive only\" SSRC.\n if (!sources[ssrc].msid) {\n recvonlySsrcs[bLine.type][ssrc] = sources[ssrc];\n // Receive-only SSRCs must not create new m-lines. We\n // will assign them to an existing m-line later.\n return;\n }\n }\n\n if (typeof ssrc2group[ssrc] !== 'undefined' &&\n Array.isArray(ssrc2group[ssrc])) {\n ssrc2group[ssrc].some(function (ssrcGroup) {\n // ssrcGroup.ssrcs *is* an Array, no need to check\n // again here.\n return ssrcGroup.ssrcs.some(function (related) {\n if (typeof ssrc2ml[related] === 'object') {\n uLine = ssrc2ml[related];\n return true;\n }\n });\n });\n }\n\n if (typeof uLine === 'object') {\n // the m-line already exists. Just add the source.\n uLine.sources[ssrc] = sources[ssrc];\n delete sources[ssrc].msid;\n } else {\n // Use the \"bLine\" as a prototype for the \"uLine\".\n uLine = Object.create(bLine);\n ssrc2ml[ssrc] = uLine;\n\n if (typeof sources[ssrc].msid !== 'undefined') {\n // Assign the msid of the source to the m-line. Note\n // that it is not guaranteed that the source will have\n // msid. In particular \"recvonly\" sources don't have an\n // msid. Note that \"recvonly\" is a term only defined\n // for m-lines.\n uLine.msid = sources[ssrc].msid;\n delete sources[ssrc].msid;\n }\n\n // We assign one SSRC per media line.\n uLine.sources = {};\n uLine.sources[ssrc] = sources[ssrc];\n uLine.ssrcGroups = ssrc2group[ssrc];\n\n // Use the cached Unified Plan SDP (if it exists) to assign\n // SSRCs to mids.\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n\n cached.media.forEach(function (m) {\n if (typeof m.sources === 'object') {\n Object.keys(m.sources).forEach(function (s) {\n if (s === ssrc) {\n uLine.mid = m.mid;\n }\n });\n }\n });\n }\n\n if (typeof uLine.mid === 'undefined') {\n\n // If this is an SSRC that we see for the first time\n // assign it a new mid. This is typically the case when\n // this method is called to transform a remote\n // description for the first time or when there is a\n // new SSRC in the remote description because a new\n // peer has joined the conference. Local SSRCs should\n // have already been added to the map in the toPlanB\n // method.\n //\n // Because FF generates answers in Unified Plan style,\n // we MUST already have a cached answer with all the\n // local SSRCs mapped to some m-line/mid.\n\n uLine.mid = [bLine.type, '-', ssrc].join('');\n }\n\n // Include the candidates in the 1st media line.\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n sources2ul[uIdx] = uLine.sources;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n uIdx++;\n }\n });\n } else {\n var uLine = bLine;\n\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n }\n\n bIdx++;\n });\n\n // Rebuild the media array in the right order and add the missing mLines\n // (missing from the Plan B SDP).\n session.media = [];\n mids = []; // reuse\n\n if (desc.type === 'answer') {\n\n // The media lines in the answer must match the media lines in the\n // offer. The order is important too. Here we assume that Firefox is\n // the answerer, so we merely have to use the reconstructed (unified)\n // answer to update the cached (unified) answer accordingly.\n //\n // In the general case, one would have to use the cached (unified)\n // offer to find the m-lines that are missing from the reconstructed\n // answer, potentially grabbing them from the cached (unified) answer.\n // One has to be careful with this approach because inactive m-lines do\n // not always have an mid, making it tricky (impossible?) to find where\n // exactly and which m-lines are missing from the reconstructed answer.\n\n for (var i = 0; i < cached.media.length; i++) {\n var uLine = cached.media[i];\n\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (typeof sources2ul[i] === 'undefined') {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'recvonly';\n else if (uLine.direction === 'sendonly')\n uLine.direction = 'inactive';\n } else {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'sendrecv';\n else if (uLine.direction === 'recvonly')\n uLine.direction = 'sendonly';\n }\n\n uLine.sources = sources2ul[i];\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n\n uLine.rtp = rtp[uLine.type];\n uLine.payloads = payloads[uLine.type];\n uLine.rtcpFb = rtcpFb[uLine.type];\n\n session.media.push(uLine);\n\n if (typeof uLine.mid === 'string') {\n // inactive lines don't/may not have an mid.\n mids.push(uLine.mid);\n }\n }\n } else {\n\n // SDP offer/answer (and the JSEP spec) forbids removing an m-section\n // under any circumstances. If we are no longer interested in sending a\n // track, we just remove the msid and ssrc attributes and set it to\n // either a=recvonly (as the reofferer, we must use recvonly if the\n // other side was previously sending on the m-section, but we can also\n // leave the possibility open if it wasn't previously in use), or\n // a=inactive.\n\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n cached.media.forEach(function(uLine) {\n mids.push(uLine.mid);\n if (typeof mid2ul[uLine.mid] !== 'undefined') {\n session.media.push(mid2ul[uLine.mid]);\n } else {\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (!uLine.direction\n || uLine.direction === 'sendrecv') {\n uLine.direction = 'sendonly';\n }\n if (!uLine.direction\n || uLine.direction === 'recvonly') {\n uLine.direction = 'inactive';\n }\n\n addSetupAttr (uLine);\n session.media.push(uLine);\n }\n });\n }\n\n // Add all the remaining (new) m-lines of the transformed SDP.\n Object.keys(mid2ul).forEach(function(mid) {\n if (mids.indexOf(mid) === -1) {\n mids.push(mid);\n if (mid2ul[mid].direction === 'recvonly') {\n // This is a remote recvonly channel. Add its SSRC to the\n // appropriate sendrecv or sendonly channel.\n // TODO(gp) what if we don't have sendrecv/sendonly\n // channel?\n\n var done = false;\n\n session.media.some(function (uLine) {\n if ((uLine.direction === 'sendrecv' ||\n uLine.direction === 'sendonly') &&\n uLine.type === mid2ul[mid].type) {\n // mid2ul[mid] shouldn't have any ssrc-groups\n Object.keys(mid2ul[mid].sources).forEach(\n function (ssrc) {\n uLine.sources[ssrc] =\n mid2ul[mid].sources[ssrc];\n });\n\n done = true;\n return true;\n }\n });\n\n if (!done) {\n session.media.push(mid2ul[mid]);\n }\n } else {\n session.media.push(mid2ul[mid]);\n }\n }\n });\n }\n\n // After we have constructed the Plan Unified m-lines we can figure out\n // where (in which m-line) to place the 'recvonly SSRCs'.\n // Note: we assume here that we are the answerer in the O/A, so any offers\n // which we translate come from the remote side, while answers are local\n // (and so our last local description is cached as an 'answer').\n [\"audio\", \"video\"].forEach(function (type) {\n if (!session || !session.media || !Array.isArray(session.media))\n return;\n\n var idx = null;\n if (Object.keys(recvonlySsrcs[type]).length > 0) {\n idx = self.getFirstSendingIndexFromAnswer(type);\n if (idx === null){\n // If this is the first offer we receive, we don't have a\n // cached answer. Assume that we will be sending media using\n // the first m-line for each media type.\n\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type === type) {\n idx = i;\n break;\n }\n }\n }\n }\n\n if (idx && session.media.length > idx) {\n var mLine = session.media[idx];\n Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) {\n if (mLine.sources && mLine.sources[ssrc]) {\n console.warn(\"Replacing an existing SSRC.\");\n }\n if (!mLine.sources) {\n mLine.sources = {};\n }\n\n mLine.sources[ssrc] = recvonlySsrcs[type][ssrc];\n });\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group (since we regenerated the mids)\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = mids.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n // Cache the transformed SDP (Unified Plan) for later re-use in this\n // function.\n this.cache[desc.type] = resStr;\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar transform = require('sdp-transform');\n\nexports.write = function(session, opts) {\n\n if (typeof session !== 'undefined' &&\n typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // expand sources to ssrcs\n if (typeof mLine.sources !== 'undefined' &&\n Object.keys(mLine.sources).length !== 0) {\n mLine.ssrcs = [];\n Object.keys(mLine.sources).forEach(function (ssrc) {\n var source = mLine.sources[ssrc];\n Object.keys(source).forEach(function (attribute) {\n mLine.ssrcs.push({\n id: ssrc,\n attribute: attribute,\n value: source[attribute]\n });\n });\n });\n delete mLine.sources;\n }\n\n // join ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' ');\n }\n });\n }\n });\n }\n\n // join group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) {\n g.mids = g.mids.join(' ');\n }\n });\n }\n\n return transform.write(session, opts);\n};\n\nexports.parse = function(sdp) {\n var session = transform.parse(sdp);\n\n if (typeof session !== 'undefined' && typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // group sources attributes by ssrc\n if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {\n mLine.sources = {};\n mLine.ssrcs.forEach(function (ssrc) {\n if (!mLine.sources[ssrc.id])\n mLine.sources[ssrc.id] = {};\n mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value;\n });\n\n delete mLine.ssrcs;\n }\n\n // split ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs === 'string') {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' ');\n }\n });\n }\n });\n }\n // split group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids === 'string') {\n g.mids = g.mids.split(' ');\n }\n });\n }\n\n return session;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module chunks = main","/*!\n * UAParser.js v0.7.18\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 or MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.18',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]*)/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]*)/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge|edgios|edgea)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [[NAME, 'Edge'], VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(qqbrowserlite)\\/([\\w\\.]+)/i // QQBrowserLite\n ], [NAME, VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /(BIDUBrowser)[\\/\\s]?([\\w\\.]+)/i // Baidu Browser\n ], [NAME, VERSION], [\n\n /(2345Explorer)[\\/\\s]?([\\w\\.]+)/i // 2345 Browser\n ], [NAME, VERSION], [\n\n /(MetaSr)[\\/\\s]?([\\w\\.]+)/i // SouGouBrowser\n ], [NAME], [\n\n /(LBBROWSER)/i // LieBao Browser\n ], [NAME], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([\\w\\.-]+)$/i,\n\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]*)/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/.+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/.+silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]*)/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w*)/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]*)/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?:?(\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w*)/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]*)/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w*)/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+;\\s(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d?\\w?)[\\s_]*(?:plus)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+))\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)(?:[\\s_]*[\\w\\s]+))\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i, // OnePlus\n /android.+oneplus\\s(a\\d{4})\\s+build/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/\\s]+(Venue[\\d\\s]{2,7})\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+;\\s(k88)\\sbuild/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2})\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(\\w{5})\\sbuild/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?\\w{0,9})\\sbuild/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?\\w{0,9})\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(\\w{1,9})\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q\\w{1,9})\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android[\\w\\.\\s\\-]{0,9});.+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9}).+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]*)/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]*)/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]*)/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]{2,4}(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.])*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module id = ../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module chunks = main","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/index.js\n// module chunks = main","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module chunks = main","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v1.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v4.js\n// module chunks = main","/*\r\nWildEmitter.js is a slim little event emitter by @henrikjoreteg largely based\r\non @visionmedia's Emitter from UI Kit.\r\n\r\nWhy? I wanted it standalone.\r\n\r\nI also wanted support for wildcard emitters like this:\r\n\r\nemitter.on('*', function (eventName, other, event, payloads) {\r\n\r\n});\r\n\r\nemitter.on('somenamespace*', function (eventName, payloads) {\r\n\r\n});\r\n\r\nPlease note that callbacks triggered by wildcard registered events also get\r\nthe event name as the first argument.\r\n*/\r\n\r\nmodule.exports = WildEmitter;\r\n\r\nfunction WildEmitter() { }\r\n\r\nWildEmitter.mixin = function (constructor) {\r\n var prototype = constructor.prototype || constructor;\r\n\r\n prototype.isWildEmitter= true;\r\n\r\n // Listen on the given `event` with `fn`. Store a group name if present.\r\n prototype.on = function (event, groupName, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n func._groupName = group;\r\n (this.callbacks[event] = this.callbacks[event] || []).push(func);\r\n return this;\r\n };\r\n\r\n // Adds an `event` listener that will be invoked a single\r\n // time then automatically removed.\r\n prototype.once = function (event, groupName, fn) {\r\n var self = this,\r\n hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n function on() {\r\n self.off(event, on);\r\n func.apply(this, arguments);\r\n }\r\n this.on(event, group, on);\r\n return this;\r\n };\r\n\r\n // Unbinds an entire group\r\n prototype.releaseGroup = function (groupName) {\r\n this.callbacks = this.callbacks || {};\r\n var item, i, len, handlers;\r\n for (item in this.callbacks) {\r\n handlers = this.callbacks[item];\r\n for (i = 0, len = handlers.length; i < len; i++) {\r\n if (handlers[i]._groupName === groupName) {\r\n //console.log('removing');\r\n // remove it and shorten the array we're looping through\r\n handlers.splice(i, 1);\r\n i--;\r\n len--;\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n // Remove the given callback for `event` or all\r\n // registered callbacks.\r\n prototype.off = function (event, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var callbacks = this.callbacks[event],\r\n i;\r\n\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (arguments.length === 1) {\r\n delete this.callbacks[event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n i = callbacks.indexOf(fn);\r\n callbacks.splice(i, 1);\r\n if (callbacks.length === 0) {\r\n delete this.callbacks[event];\r\n }\r\n return this;\r\n };\r\n\r\n /// Emit `event` with the given args.\r\n // also calls any `*` handlers\r\n prototype.emit = function (event) {\r\n this.callbacks = this.callbacks || {};\r\n var args = [].slice.call(arguments, 1),\r\n callbacks = this.callbacks[event],\r\n specialCallbacks = this.getWildcardCallbacks(event),\r\n i,\r\n len,\r\n item,\r\n listeners;\r\n\r\n if (callbacks) {\r\n listeners = callbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, args);\r\n }\r\n }\r\n\r\n if (specialCallbacks) {\r\n len = specialCallbacks.length;\r\n listeners = specialCallbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, [event].concat(args));\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Helper for for finding special wildcard event handlers that match the event\r\n prototype.getWildcardCallbacks = function (eventName) {\r\n this.callbacks = this.callbacks || {};\r\n var item,\r\n split,\r\n result = [];\r\n\r\n for (item in this.callbacks) {\r\n split = item.split('*');\r\n if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {\r\n result = result.concat(this.callbacks[item]);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n};\r\n\r\nWildEmitter.mixin(WildEmitter);\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module id = ../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module chunks = main","/*!\n * EventEmitter v5.2.4 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = ../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module chunks = main","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/$$_lazy_route_resource lazy\n// module id = ./src/$$_lazy_route_resource lazy recursive\n// module chunks = main","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.css\n// module id = ./src/app/app.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.html\n// module id = ./src/app/app.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { InfoService } from 'app/services/info.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n} from '@angular/material';\n\n@NgModule({\n imports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n exports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n})\nexport class AppMaterialModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.material.module.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http';\nimport { RouterModule } from '@angular/router';\nimport 'hammerjs';\n\nimport { routing } from './app.routing';\nimport { AppMaterialModule } from 'app/app.material.module';\n\nimport { InfoService } from './services/info.service';\nimport { RestService } from './services/rest.service';\n\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from './components/session-details/session-details.component';\nimport { CredentialsDialogComponent } from './components/dashboard/credentials-dialog.component';\nimport { LayoutBestFitComponent } from './components/layouts/layout-best-fit/layout-best-fit.component';\nimport { OpenViduVideoComponent } from './components/layouts/ov-video.component';\n\n\n@NgModule({\n declarations: [\n AppComponent,\n DashboardComponent,\n SessionDetailsComponent,\n CredentialsDialogComponent,\n LayoutBestFitComponent,\n OpenViduVideoComponent,\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpModule,\n routing,\n AppMaterialModule,\n FlexLayoutModule\n ],\n entryComponents: [\n CredentialsDialogComponent,\n ],\n providers: [InfoService, RestService],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DashboardComponent } from 'app/components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from 'app/components/session-details/session-details.component';\nimport { LayoutBestFitComponent } from 'app/components/layouts/layout-best-fit/layout-best-fit.component';\n\nconst appRoutes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n pathMatch: 'full'\n },\n {\n path: 'session/:sessionId',\n component: SessionDetailsComponent,\n pathMatch: 'full'\n },\n {\n path: 'layout-best-fit/:sessionId/:secret',\n component: LayoutBestFitComponent,\n pathMatch: 'full'\n }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.routing.ts","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n selector: 'app-credentials-dialog',\n template: `\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n `,\n styles: [`\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n `],\n})\nexport class CredentialsDialogComponent {\n\n public myReference: MatDialogRef;\n secret: string;\n\n constructor() { }\n\n testVideo() {\n this.myReference.close(this.secret);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/credentials-dialog.component.ts","module.exports = \"#dashboard-div {\\n padding: 20px;\\n}\\n\\n#log {\\n height: 90%;\\n}\\n\\n#log-content {\\n height: 90%;\\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\\n overflow-y: auto;\\n overflow-x: hidden\\n}\\n\\nul {\\n margin: 0;\\n}\\n\\n#test-btn {\\n text-transform: uppercase;\\n float: right;\\n}\\n\\nmat-card-title button.blue {\\n color: #ffffff;\\n background-color: #0088aa;\\n}\\n\\nmat-card-title button.yellow {\\n color: rgba(0, 0, 0, 0.87);\\n background-color: #ffcc00;\\n}\\n\\nmat-spinner {\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tick-div {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tooltip-tick {\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n z-index: 2;\\n}\\n\\n.circ {\\n opacity: 0;\\n stroke-dasharray: 130;\\n stroke-dashoffset: 130;\\n -webkit-transition: all 1s;\\n transition: all 1s;\\n}\\n\\n.tick {\\n stroke-dasharray: 50;\\n stroke-dashoffset: 50;\\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\\n transition: stroke-dashoffset 1s 0.5s ease-out;\\n}\\n\\n.drawn+svg .path {\\n opacity: 1;\\n stroke-dashoffset: 0;\\n}\\n\\n#mirrored-video {\\n position: relative;\\n}\\n\\n/* Pure CSS loader */\\n\\n#loader {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#loader * {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::after {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::before {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n.loader-1 {\\n height: 100px;\\n width: 100px;\\n -webkit-animation: loader-1-1 4.8s linear infinite;\\n animation: loader-1-1 4.8s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loader-1 span {\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n -webkit-animation: loader-1-2 1.2s linear infinite;\\n animation: loader-1-2 1.2s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n }\\n}\\n\\n@keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n transform: rotate(220deg);\\n }\\n}\\n\\n.loader-1 span::after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n border: 8px solid #4d4d4d;\\n border-radius: 50%;\\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n}\\n\\n@-webkit-keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n }\\n}\\n\\n@keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n transform: rotate(140deg);\\n }\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.css\n// module id = ./src/app/components/dashboard/dashboard.component.css\n// module chunks = main","module.exports = \"
\\n\\n
\\n \\n Server events\\n \\n lock_outline\\n \\n \\n \\n \\n
    \\n
  • \\n

    {{i}}

    \\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n \\n Test the connection\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n

{{msg}}

\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.html\n// module id = ./src/app/components/dashboard/dashboard.component.html\n// module chunks = main","import { Component, OnInit, ViewChild, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport { Subscription } from 'rxjs/Subscription';\n\nimport { InfoService } from '../../services/info.service';\nimport { RestService } from '../../services/rest.service';\n\nimport { OpenVidu, Session } from 'openvidu-browser';\nimport { CredentialsDialogComponent } from './credentials-dialog.component';\n\ndeclare const $;\n\n@Component({\n selector: 'app-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\nexport class DashboardComponent implements OnInit, OnDestroy {\n\n websocket: WebSocket;\n\n @ViewChild('scrollMe') private myScrollContainer: ElementRef;\n lockScroll = false;\n\n infoSubscription: Subscription;\n info = [];\n\n session: Session;\n\n testStatus = 'DISCONNECTED';\n testButton = 'Test';\n tickClass = 'trigger';\n showSpinner = false;\n msgChain = [];\n\n openviduPublicUrl: string;\n\n constructor(private infoService: InfoService, private restService: RestService, public dialog: MatDialog) {\n // Subscription to info updated event raised by InfoService\n this.infoSubscription = this.infoService.newInfo$.subscribe(\n info => {\n this.info.push(info);\n this.scrollToBottom();\n });\n }\n\n ngOnInit() {\n\n const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';\n const port = (location.port) ? (':' + location.port) : '';\n\n this.websocket = new WebSocket(protocol + location.hostname + port + '/info');\n\n this.websocket.onopen = (event) => {\n console.log('Info websocket connected');\n };\n this.websocket.onclose = (event) => {\n console.log('Info websocket closed');\n };\n this.websocket.onerror = (event) => {\n console.log('Info websocket error');\n };\n this.websocket.onmessage = (event) => {\n console.log('Info websocket message');\n console.log(event.data);\n this.infoService.updateInfo(event.data);\n };\n\n this.restService.getOpenViduPublicUrl()\n .then(url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n })\n .catch(error => {\n console.error(error);\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n // On window closed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n ngOnDestroy() {\n // On component destroyed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n toggleTestVideo() {\n if (!this.session) {\n this.testVideo();\n } else {\n this.endTestVideo();\n }\n }\n\n testVideo() {\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n if (!this.openviduPublicUrl) {\n this.restService.getOpenViduPublicUrl()\n .then((url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(token: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect(token)\n .then(() => {\n\n this.testStatus = 'CONNECTED';\n\n const publisherRemote = OV.initPublisher('mirrored-video', {\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n },\n e => {\n if (!!e) {\n console.error(e);\n }\n }\n );\n\n publisherRemote.on('accessAllowed', () => {\n this.msgChain.push('Camera access allowed');\n });\n\n publisherRemote.on('accessDenied', () => {\n this.endTestVideo();\n this.msgChain.push('Camera access denied');\n });\n\n publisherRemote.on('videoElementCreated', (video) => {\n this.showSpinner = true;\n this.msgChain.push('Video element created');\n });\n\n publisherRemote.on('remoteVideoPlaying', (video) => {\n this.msgChain.push('Remote video playing');\n this.testButton = 'End test';\n this.testStatus = 'PLAYING';\n this.showSpinner = false;\n });\n\n publisherRemote.subscribeToRemote();\n this.session.publish(publisherRemote);\n\n })\n .catch(error => {\n if (error.code === 401) { // User unauthorized error. OpenVidu security is active\n this.endTestVideo();\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n });\n } else {\n console.error(error);\n }\n });\n }\n\n endTestVideo() {\n this.session.disconnect();\n this.session = null;\n this.testStatus = 'DISCONNECTED';\n this.testButton = 'Test';\n this.showSpinner = false;\n this.info = [];\n this.msgChain = [];\n }\n\n scrollToBottom(): void {\n try {\n if (!this.lockScroll) {\n this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;\n }\n } catch (err) {\n console.error('[Error]:' + err.toString());\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/dashboard.component.ts","module.exports = \".bounds {\\n background-color: black;\\n overflow: hidden;\\n cursor: none !important;\\n position: absolute;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n}\\n\\napp-ov-video video {\\n -o-object-fit: cover;\\n object-fit: cover;\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n}\\n\\n/*!\\n * Copyright (c) 2017 TokBox, Inc.\\n * Released under the MIT license\\n * http://opensource.org/licenses/MIT\\n */\\n\\n.custom-class {\\n min-height: 0px !important;\\n}\\n\\n/**\\n * OT Base styles\\n */\\n\\n/* Root OT object, this is where our CSS reset happens */\\n\\n.OT_root, .OT_root * {\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n vertical-align: baseline;\\n}\\n\\n.OT_dialog-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_dialog-centering-child {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_dialog {\\n position: relative;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n max-width: 576px;\\n margin-right: auto;\\n margin-left: auto;\\n padding: 36px;\\n text-align: center;\\n /* centers all the inline content */\\n background-color: #363636;\\n color: #fff;\\n -webkit-box-shadow: 2px 4px 6px #999;\\n box-shadow: 2px 4px 6px #999;\\n font-family: 'Didact Gothic', sans-serif;\\n font-size: 13px;\\n line-height: 1.4;\\n}\\n\\n.OT_dialog * {\\n font-family: inherit;\\n -webkit-box-sizing: inherit;\\n box-sizing: inherit;\\n}\\n\\n.OT_closeButton {\\n color: #999999;\\n cursor: pointer;\\n font-size: 32px;\\n line-height: 36px;\\n position: absolute;\\n right: 18px;\\n top: 0;\\n}\\n\\n.OT_dialog-messages {\\n text-align: center;\\n}\\n\\n.OT_dialog-messages-main {\\n margin-bottom: 36px;\\n line-height: 36px;\\n font-weight: 300;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-messages-minor {\\n margin-bottom: 18px;\\n font-size: 13px;\\n line-height: 18px;\\n color: #A4A4A4;\\n}\\n\\n.OT_dialog-messages-minor strong {\\n color: #ffffff;\\n}\\n\\n.OT_dialog-actions-card {\\n display: inline-block;\\n}\\n\\n.OT_dialog-button-title {\\n margin-bottom: 18px;\\n line-height: 18px;\\n font-weight: 300;\\n text-align: center;\\n font-size: 14px;\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title label {\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title a, .OT_dialog-button-title a:link, .OT_dialog-button-title a:active {\\n color: #02A1DE;\\n}\\n\\n.OT_dialog-button-title strong {\\n color: #ffffff;\\n font-weight: 100;\\n display: block;\\n}\\n\\n.OT_dialog-button {\\n display: inline-block;\\n margin-bottom: 18px;\\n padding: 0 1em;\\n background-color: #1CA3DC;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n.OT_dialog-button:disabled {\\n cursor: not-allowed;\\n opacity: 0.5;\\n}\\n\\n.OT_dialog-button-large {\\n line-height: 36px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n font-weight: 100;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-button-small {\\n line-height: 18px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n background-color: #444444;\\n color: #999999;\\n font-size: 16px;\\n}\\n\\n.OT_dialog-progress-bar {\\n display: inline-block;\\n /* prevents margin collapse */\\n width: 100%;\\n margin-top: 5px;\\n margin-bottom: 41px;\\n border: 1px solid #4E4E4E;\\n height: 8px;\\n}\\n\\n.OT_dialog-progress-bar-fill {\\n height: 100%;\\n background-color: #29A4DA;\\n}\\n\\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\\n line-height: 54px;\\n font-size: 48px;\\n font-weight: 100;\\n}\\n\\n/* Helpers */\\n\\n.OT_centered {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n margin: 0;\\n}\\n\\n.OT_dialog-hidden {\\n display: none;\\n}\\n\\n.OT_dialog-button-block {\\n display: block;\\n}\\n\\n.OT_dialog-no-natural-margin {\\n margin-bottom: 0;\\n}\\n\\n/* Publisher and Subscriber styles */\\n\\n.OT_publisher, .OT_subscriber {\\n position: relative;\\n min-width: 48px;\\n min-height: 48px;\\n}\\n\\n.OT_publisher .OT_video-element, .OT_subscriber .OT_video-element {\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n -webkit-transform-origin: 0 0;\\n transform-origin: 0 0;\\n}\\n\\n/* Styles that are applied when the video element should be mirrored */\\n\\n.OT_publisher.OT_mirrored .OT_video-element {\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n -webkit-transform-origin: 50% 50%;\\n transform-origin: 50% 50%;\\n}\\n\\n.OT_subscriber_error {\\n background-color: #000;\\n color: #fff;\\n text-align: center;\\n}\\n\\n.OT_subscriber_error>p {\\n padding: 20px;\\n}\\n\\n/* The publisher/subscriber name/mute background */\\n\\n.OT_publisher .OT_bar, .OT_subscriber .OT_bar, .OT_publisher .OT_name, .OT_subscriber .OT_name, .OT_publisher .OT_archiving, .OT_subscriber .OT_archiving, .OT_publisher .OT_archiving-status, .OT_subscriber .OT_archiving-status, .OT_publisher .OT_archiving-light-box, .OT_subscriber .OT_archiving-light-box {\\n -webkit-box-sizing: border-box;\\n -ms-box-sizing: border-box;\\n box-sizing: border-box;\\n top: 0;\\n left: 0;\\n right: 0;\\n display: block;\\n height: 34px;\\n position: absolute;\\n}\\n\\n.OT_publisher .OT_bar, .OT_subscriber .OT_bar {\\n background: rgba(0, 0, 0, 0.4);\\n}\\n\\n.OT_publisher .OT_edge-bar-item, .OT_subscriber .OT_edge-bar-item {\\n z-index: 1;\\n /* required to get audio level meter underneath */\\n}\\n\\n/* The publisher/subscriber name panel/archiving status bar */\\n\\n.OT_publisher .OT_name, .OT_subscriber .OT_name {\\n background-color: transparent;\\n color: #ffffff;\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n padding: 0 4px 0 36px;\\n}\\n\\n.OT_publisher .OT_archiving-status, .OT_subscriber .OT_archiving-status {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n left: 34px;\\n padding: 0 4px;\\n color: rgba(255, 255, 255, 0.8);\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n}\\n\\n.OT_micro .OT_archiving-status, .OT_micro:hover .OT_archiving-status, .OT_mini .OT_archiving-status, .OT_mini:hover .OT_archiving-status {\\n display: none;\\n}\\n\\n.OT_publisher .OT_archiving-light-box, .OT_subscriber .OT_archiving-light-box {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n right: auto;\\n width: 34px;\\n height: 34px;\\n}\\n\\n.OT_archiving-light {\\n width: 7px;\\n height: 7px;\\n border-radius: 30px;\\n position: absolute;\\n top: 14px;\\n left: 14px;\\n background-color: #575757;\\n -webkit-box-shadow: 0 0 5px 1px #575757;\\n box-shadow: 0 0 5px 1px #575757;\\n}\\n\\n.OT_archiving-light.OT_active {\\n background-color: #970d13;\\n animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n -moz-animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n -moz-animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n.OT_mini .OT_bar, .OT_bar.OT_mode-mini, .OT_bar.OT_mode-mini-auto {\\n bottom: 0;\\n height: auto;\\n}\\n\\n.OT_mini .OT_name.OT_mode-off, .OT_mini .OT_name.OT_mode-on, .OT_mini .OT_name.OT_mode-auto, .OT_mini:hover .OT_name.OT_mode-auto {\\n display: none;\\n}\\n\\n.OT_publisher .OT_name, .OT_subscriber .OT_name {\\n left: 10px;\\n right: 37px;\\n height: 34px;\\n padding-left: 0;\\n}\\n\\n.OT_publisher .OT_mute, .OT_subscriber .OT_mute {\\n border: none;\\n cursor: pointer;\\n display: block;\\n position: absolute;\\n text-align: center;\\n text-indent: -9999em;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n}\\n\\n.OT_publisher .OT_mute, .OT_subscriber .OT_mute {\\n right: 0;\\n top: 0;\\n border-left: 1px solid rgba(255, 255, 255, 0.2);\\n height: 36px;\\n width: 37px;\\n}\\n\\n.OT_mini .OT_mute, .OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold, .OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\\n top: 50%;\\n left: 50%;\\n right: auto;\\n margin-top: -18px;\\n margin-left: -18.5px;\\n border-left: none;\\n}\\n\\n.OT_publisher .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII=);\\n background-position: 9px 5px;\\n}\\n\\n.OT_publisher .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);\\n background-position: 9px 4px;\\n}\\n\\n.OT_subscriber .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\\n background-position: 8px 7px;\\n}\\n\\n.OT_subscriber .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\\n background-position: 7px 7px;\\n}\\n\\n/**\\n * Styles for display modes\\n *\\n * Note: It's important that these completely control the display and opacity\\n * attributes, no other selectors should atempt to change them.\\n */\\n\\n/* Default display mode transitions for various chrome elements */\\n\\n.OT_publisher .OT_edge-bar-item, .OT_subscriber .OT_edge-bar-item {\\n -webkit-transition-property: top, bottom, opacity;\\n transition-property: top, bottom, opacity;\\n -webkit-transition-duration: 0.5s;\\n transition-duration: 0.5s;\\n -webkit-transition-timing-function: ease-in;\\n transition-timing-function: ease-in;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_mode-off, .OT_publisher .OT_edge-bar-item.OT_mode-auto, .OT_subscriber .OT_edge-bar-item.OT_mode-auto, .OT_publisher .OT_edge-bar-item.OT_mode-mini-auto, .OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\\n top: -25px;\\n opacity: 0;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-auto, .OT_publisher .OT_mute.OT_mode-mini-auto, .OT_subscriber .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off, .OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\\n top: auto;\\n bottom: -25px;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-on, .OT_subscriber .OT_edge-bar-item.OT_mode-on, .OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold, .OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold, .OT_publisher:hover .OT_edge-bar-item.OT_mode-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto, .OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\\n top: 0;\\n opacity: 1;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-on, .OT_mini:hover .OT_mute.OT_mode-auto, .OT_mute.OT_mode-mini, .OT_root:hover .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on, .OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on, .OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto, .OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\\n top: auto;\\n bottom: 0;\\n opacity: 1;\\n}\\n\\n/* Contains the video element, used to fix video letter-boxing */\\n\\n.OT_widget-container {\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n background-color: #000000;\\n overflow: hidden;\\n}\\n\\n/* Load animation */\\n\\n.OT_root .OT_video-loading {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n background-color: rgba(0, 0, 0, .75);\\n}\\n\\n.OT_root .OT_video-loading .OT_video-loading-spinner {\\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzMiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZSIgeDI9IjEiIHkxPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjMzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii42NiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJmIiB4Mj0iMSIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuNjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwIDEgMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\\n position: absolute;\\n width: 32px;\\n height: 32px;\\n left: 50%;\\n top: 50%;\\n margin-left: -16px;\\n margin-top: -16px;\\n -webkit-animation: OT_spin 2s linear infinite;\\n animation: OT_spin 2s linear infinite;\\n}\\n\\n@-webkit-keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.OT_publisher.OT_loading .OT_video-loading, .OT_subscriber.OT_loading .OT_video-loading {\\n display: block;\\n}\\n\\n.OT_video-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_video-container {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_video-poster {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n opacity: .25;\\n background-repeat: no-repeat;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\n background-size: auto 76%;\\n}\\n\\n.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: cover;\\n object-fit: cover;\\n}\\n\\n/* Workaround for iOS freezing issue when cropping videos */\\n\\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\\n\\n@media only screen and (orientation: portrait) {\\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: contain !important;\\n object-fit: contain !important;\\n }\\n}\\n\\n.OT_fit-mode-contain .OT_video-element {\\n -o-object-fit: contain;\\n object-fit: contain;\\n}\\n\\n.OT_fit-mode-cover .OT_video-poster {\\n background-position: center bottom;\\n}\\n\\n.OT_fit-mode-contain .OT_video-poster {\\n background-position: center;\\n}\\n\\n.OT_audio-level-meter {\\n position: absolute;\\n width: 25%;\\n max-width: 224px;\\n min-width: 21px;\\n top: 0;\\n right: 0;\\n overflow: hidden;\\n}\\n\\n.OT_audio-level-meter:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__bar {\\n position: absolute;\\n width: 192%;\\n /* meter value can overflow of 8% */\\n height: 192%;\\n top: -96%/* half of the size */\\n ;\\n right: -96%;\\n border-radius: 50%;\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_audio-level-meter__audio-only-img {\\n position: absolute;\\n top: 22%;\\n right: 15%;\\n width: 40%;\\n opacity: .7;\\n background: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\\n}\\n\\n.OT_audio-level-meter__audio-only-img:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__value {\\n position: absolute;\\n border-radius: 50%;\\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\\n}\\n\\n.OT_audio-level-meter.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_audio-level-meter.OT_mode-on, .OT_audio-only .OT_audio-level-meter.OT_mode-auto {\\n display: block;\\n}\\n\\n.OT_audio-only.OT_publisher .OT_video-element, .OT_audio-only.OT_subscriber .OT_video-element {\\n display: none;\\n}\\n\\n.OT_video-disabled-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: bottom right;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 3px;\\n right: 3px;\\n}\\n\\n.OT_video-disabled {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ciAZvbQjQ+RDahpBBKd5ZZsqN758hmImk4KQHnpDd8UwSkCyJarx07d4+3BeKJmlMHyX4qaRxpBCmNFE4KENvHDpAutVERn1kCVBMfeRRgYvZnx62wZPdnZkw92VQA5GClQXYRBze2S+iJmpPVVoJLA9l9QKokjcWKTCT1R5rhLg70NuSsziT16diIKkuAjibrTpJNDkn/e17CahtAjlAWJAYkb29Sb1LE9Rs391kILk8mVkyuIpuZcLKUlEmKkra1WuSTNuesEPzwoEploSVAh9Oiz+BIyd9dOHhtx4OEpFpVg6gbNK3yXX1j48N6U5Dz5i/gc/FDrMY3sTLiSMEkXxGxzUEUAGnbxlPaksMlHUXWAlHS8URCPseSohZbCSLjSSU7ixLXdzhIWVKq4Y7t2a/2bN0qGeKly1fYsVmk6RgIDz4J0bonyUOcjeYqm/8hRoYbWkigV2NH9CHAS60EkUkkw47hSRs6FqT1LR5AVcsrueXlK1d5AO+RpmBrZZEiefByytPCanRGNLZY0uF52gNDYr9sCRB8MHY0SJu2OJWKS2WQV65e4y31DmkCImEi0hBfufRime0RIhpbKen0/Ny9OYNW2ghyYytABjNIaxNuKttAWk6HPLn0k0FevdZwFinPWFIuKZbUV16NVko6jbWSDoPO3pOf8K0jQWLSQ0S9bdpkYck+m7vfWpAiHfKgBsZiGSSt0FqcTeU8WETqAHE2CgcAVd3Gkm4MD3xXYeI6B4NMItvKbcUpQ9gP+KMWnSsW+TaYJtoo+avBWLoKoK0CCSDud+7eXWQGZAXqV3YoQjQCfixJ8+fzj9ta3JHhlUeJ8wJOY2ws6eRKpPS3oqTvHAESEz9ya0naXL5WH6pt3FqSOhTHkTcKEXc6k1POh4Q9YJu/03TT4a8PoGMFI4i2EqSbOZAYaBkpCyD92RkG6KCSbjI/H0HEISBnlOZPFdcEzI2GTO4KBZICGKyAKLTEmJOB2txf5MbgohBINCl4FTqmpJMB2W+HiRn1Q2l6lXyPmiEP6VVE2TfGoaMYrHyPdtAnyI0jEOn9RLWmNEhvBBE7SjpFQZaShtLK+1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-warning {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U5JXgX5G6nSvSq1R5LATR7aYGkwMG1RSwkWABH+4jUb3vT/uJ1Z0xpjraTBRltrxUQhksIRmgTJyy69+Pv99tv3qYX6FxgU+fU33352xGEHf5wisU7nNWJpZRMkAjZ6aIN1mwV7h29Jo2wCHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_audio-blocked-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n}\\n\\n.OT_audio-blocked {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 90px auto;\\n}\\n\\n.OT_container-audio-blocked {\\n cursor: pointer;\\n}\\n\\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\\n display: none;\\n}\\n\\n.OT_container-audio-blocked .OT_mute {\\n display: none;\\n}\\n\\n.OT_audio-blocked-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_video-unsupported {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 58px auto;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin-top: -30px;\\n}\\n\\n.OT_video-unsupported-bar {\\n display: none;\\n position: absolute;\\n width: 192%;\\n /* copy the size of the audio meter bar for symmetry */\\n height: 192%;\\n top: -96%/* half of the size */\\n ;\\n left: -96%;\\n border-radius: 50%;\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_video-unsupported-img {\\n display: none;\\n position: absolute;\\n top: 11%;\\n left: 15%;\\n width: 70%;\\n opacity: .7;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: 100% auto;\\n}\\n\\n.OT_video-unsupported-img:before {\\n /* makes the height of the container 93% of its width (90/97 px) */\\n content: '';\\n display: block;\\n padding-top: 93%;\\n}\\n\\n.OT_video-unsupported-text {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-align: center;\\n height: 100%;\\n margin-top: 40px;\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module chunks = main","module.exports = \"
\\n
\\n
\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener, ViewEncapsulation, ApplicationRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { OpenVidu, Session, Stream, Subscriber, StreamEvent, StreamManagerEvent } from 'openvidu-browser';\n\nimport { OpenViduLayout } from '../openvidu-layout';\n\n@Component({\n selector: 'app-layout-best-fit',\n templateUrl: './layout-best-fit.component.html',\n styleUrls: ['./layout-best-fit.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LayoutBestFitComponent implements OnInit, OnDestroy {\n\n openviduLayout: OpenViduLayout;\n sessionId: string;\n secret: string;\n\n session: Session;\n subscribers: Subscriber[] = [];\n\n layout: any;\n resizeTimeout;\n numberOfScreenStreams = 0;\n\n layoutOptions = {\n maxRatio: 3 / 2, // The narrowest ratio that will be used (default 2x3)\n minRatio: 9 / 16, // The widest ratio that will be used (default 16x9)\n fixedRatio: false, /* If this is true then the aspect ratio of the video is maintained\n and minRatio and maxRatio are ignored (default false) */\n bigClass: 'OV_big', // The class to add to elements that should be sized bigger\n bigPercentage: 0.8, // The maximum percentage of space the big ones should take up\n bigFixedRatio: false, // fixedRatio for the big ones\n bigMaxRatio: 3 / 2, // The narrowest ratio to use for the big elements (default 2x3)\n bigMinRatio: 9 / 16, // The widest ratio to use for the big elements (default 16x9)\n bigFirst: true, // Whether to place the big one in the top left (true) or bottom right\n animate: true // Whether you want to animate the transitions\n };\n\n constructor(private route: ActivatedRoute, private appRef: ApplicationRef) {\n this.route.params.subscribe(params => {\n this.sessionId = params.sessionId;\n this.secret = params.secret;\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n this.leaveSession();\n }\n\n @HostListener('window:resize', ['$event'])\n sizeChange(event) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.openviduLayout.updateLayout();\n }, 20);\n }\n\n ngOnDestroy() {\n this.leaveSession();\n }\n\n ngOnInit() {\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.session.on('streamCreated', (event: StreamEvent) => {\n let changeFixedRatio = false;\n if (event.stream.typeOfVideo === 'SCREEN') {\n this.numberOfScreenStreams++;\n changeFixedRatio = true;\n }\n const subscriber: Subscriber = this.session.subscribe(event.stream, undefined);\n subscriber.on('streamPlaying', (e: StreamManagerEvent) => {\n const video: HTMLVideoElement = subscriber.videos[0].video;\n video.parentElement.parentElement.classList.remove('custom-class');\n this.updateLayout(changeFixedRatio);\n });\n this.addSubscriber(subscriber);\n });\n\n this.session.on('streamDestroyed', (event: StreamEvent) => {\n let changeFixedRatio = false;\n if (event.stream.typeOfVideo === 'SCREEN') {\n this.numberOfScreenStreams--;\n changeFixedRatio = true;\n }\n this.deleteSubscriber(event.stream.streamManager);\n this.updateLayout(changeFixedRatio);\n });\n\n const token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';\n this.session.connect(token)\n .catch(error => {\n console.error(error);\n })\n\n this.openviduLayout = new OpenViduLayout();\n this.openviduLayout.initLayoutContainer(document.getElementById('layout'), this.layoutOptions);\n }\n\n private addSubscriber(subscriber: Subscriber): void {\n this.subscribers.push(subscriber);\n this.appRef.tick();\n }\n\n private deleteSubscriber(subscriber: Subscriber): void {\n let index = -1;\n for (let i = 0; i < this.subscribers.length; i++) {\n if (this.subscribers[i] === subscriber) {\n index = i;\n break;\n }\n }\n if (index > -1) {\n this.subscribers.splice(index, 1);\n }\n this.appRef.tick();\n }\n\n leaveSession() {\n if (this.session) { this.session.disconnect(); };\n this.subscribers = [];\n this.session = null;\n }\n\n updateLayout(changeFixedRatio: boolean) {\n if (changeFixedRatio) {\n this.layoutOptions.fixedRatio = this.numberOfScreenStreams > 0;\n this.openviduLayout.setLayoutOptions(this.layoutOptions);\n }\n this.openviduLayout.updateLayout();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","declare var $: any;\n\nexport interface OpenViduLayoutOptions {\n maxRatio: number;\n minRatio: number;\n fixedRatio: boolean;\n animate: any;\n bigClass: string;\n bigPercentage: any;\n bigFixedRatio: any;\n bigMaxRatio: any;\n bigMinRatio: any;\n bigFirst: any;\n}\n\nexport class OpenViduLayout {\n\n private layoutContainer: HTMLElement;\n private opts: OpenViduLayoutOptions;\n\n private fixAspectRatio(elem: HTMLVideoElement, width: number) {\n const sub: HTMLVideoElement = elem.querySelector('.OT_root');\n if (sub) {\n // If this is the parent of a subscriber or publisher then we need\n // to force the mutation observer on the publisher or subscriber to\n // trigger to get it to fix it's layout\n const oldWidth = sub.style.width;\n sub.style.width = width + 'px';\n // sub.style.height = height + 'px';\n sub.style.width = oldWidth || '';\n }\n }\n\n private positionElement(elem: HTMLVideoElement, x: number, y: number, width: number, height: number, animate: any) {\n const targetPosition = {\n left: x + 'px',\n top: y + 'px',\n width: width + 'px',\n height: height + 'px'\n };\n\n this.fixAspectRatio(elem, width);\n\n if (animate && $) {\n $(elem).stop();\n $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing',\n () => {\n this.fixAspectRatio(elem, width);\n if (animate.complete) { animate.complete.call(this); }\n });\n } else {\n $(elem).css(targetPosition);\n }\n this.fixAspectRatio(elem, width);\n }\n\n private getVideoRatio(elem: HTMLVideoElement) {\n if (!elem) {\n return 3 / 4;\n }\n const video: HTMLVideoElement = elem.querySelector('video');\n if (video && video.videoHeight && video.videoWidth) {\n return video.videoHeight / video.videoWidth;\n } else if (elem.videoHeight && elem.videoWidth) {\n return elem.videoHeight / elem.videoWidth;\n }\n return 3 / 4;\n }\n\n private getCSSNumber(elem: HTMLElement, prop: string) {\n const cssStr = $(elem).css(prop);\n return cssStr ? parseInt(cssStr, 10) : 0;\n }\n\n // Really cheap UUID function\n private cheapUUID() {\n return (Math.random() * 100000000).toFixed(0);\n }\n\n private getHeight(elem: HTMLElement) {\n const heightStr = $(elem).css('height');\n return heightStr ? parseInt(heightStr, 10) : 0;\n }\n\n private getWidth(elem: HTMLElement) {\n const widthStr = $(elem).css('width');\n return widthStr ? parseInt(widthStr, 10) : 0;\n }\n\n private getBestDimensions(minR: number, maxR: number, count: number, WIDTH: number, HEIGHT: number, targetHeight: number) {\n let maxArea,\n targetCols,\n targetRows,\n targetWidth,\n tWidth,\n tHeight,\n tRatio;\n\n // Iterate through every possible combination of rows and columns\n // and see which one has the least amount of whitespace\n for (let i = 1; i <= count; i++) {\n const colsAux = i;\n const rowsAux = Math.ceil(count / colsAux);\n\n // Try taking up the whole height and width\n tHeight = Math.floor(HEIGHT / rowsAux);\n tWidth = Math.floor(WIDTH / colsAux);\n\n tRatio = tHeight / tWidth;\n if (tRatio > maxR) {\n // We went over decrease the height\n tRatio = maxR;\n tHeight = tWidth * tRatio;\n } else if (tRatio < minR) {\n // We went under decrease the width\n tRatio = minR;\n tWidth = tHeight / tRatio;\n }\n\n const area = (tWidth * tHeight) * count;\n\n // If this width and height takes up the most space then we're going with that\n if (maxArea === undefined || (area > maxArea)) {\n maxArea = area;\n targetHeight = tHeight;\n targetWidth = tWidth;\n targetCols = colsAux;\n targetRows = rowsAux;\n }\n }\n return {\n maxArea: maxArea,\n targetCols: targetCols,\n targetRows: targetRows,\n targetHeight: targetHeight,\n targetWidth: targetWidth,\n ratio: targetHeight / targetWidth\n };\n };\n\n private arrange(children: HTMLVideoElement[], WIDTH: number, HEIGHT: number, offsetLeft: number, offsetTop: number, fixedRatio: boolean,\n minRatio: number, maxRatio: number, animate: any) {\n\n let targetHeight;\n\n const count = children.length;\n let dimensions;\n\n if (!fixedRatio) {\n dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight);\n } else {\n // Use the ratio of the first video element we find to approximate\n const ratio = this.getVideoRatio(children.length > 0 ? children[0] : null);\n dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight);\n }\n\n // Loop through each stream in the container and place it inside\n let x = 0,\n y = 0;\n const rows = [];\n let row;\n // Iterate through the children and create an array with a new item for each row\n // and calculate the width of each row so that we know if we go over the size and need\n // to adjust\n for (let i = 0; i < children.length; i++) {\n if (i % dimensions.targetCols === 0) {\n // This is a new row\n row = {\n children: [],\n width: 0,\n height: 0\n };\n rows.push(row);\n }\n const elem: HTMLVideoElement = children[i];\n row.children.push(elem);\n let targetWidth = dimensions.targetWidth;\n targetHeight = dimensions.targetHeight;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = targetHeight / this.getVideoRatio(elem);\n }\n row.width += targetWidth;\n row.height = targetHeight;\n }\n // Calculate total row height adjusting if we go too wide\n let totalRowHeight = 0;\n let remainingShortRows = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width > WIDTH) {\n // Went over on the width, need to adjust the height proportionally\n row.height = Math.floor(row.height * (WIDTH / row.width));\n row.width = WIDTH;\n } else if (row.width < WIDTH) {\n remainingShortRows += 1;\n }\n totalRowHeight += row.height;\n }\n if (totalRowHeight < HEIGHT && remainingShortRows > 0) {\n // We can grow some of the rows, we're not taking up the whole height\n let remainingHeightDiff = HEIGHT - totalRowHeight;\n totalRowHeight = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width < WIDTH) {\n // Evenly distribute the extra height between the short rows\n let extraHeight = remainingHeightDiff / remainingShortRows;\n if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) {\n // We can't go that big or we'll go too wide\n extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height);\n }\n row.width += Math.floor((extraHeight / row.height) * row.width);\n row.height += extraHeight;\n remainingHeightDiff -= extraHeight;\n remainingShortRows -= 1;\n }\n totalRowHeight += row.height;\n }\n }\n // vertical centering\n y = ((HEIGHT - (totalRowHeight)) / 2);\n // Iterate through each row and place each child\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n // center the row\n const rowMarginLeft = ((WIDTH - row.width) / 2);\n x = rowMarginLeft;\n for (let j = 0; j < row.children.length; j++) {\n const elem: HTMLVideoElement = row.children[j];\n\n let targetWidth = dimensions.targetWidth;\n targetHeight = row.height;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem));\n }\n elem.style.position = 'absolute';\n // $(elem).css('position', 'absolute');\n const actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') -\n this.getCSSNumber(elem, 'paddingRight') -\n this.getCSSNumber(elem, 'marginLeft') -\n this.getCSSNumber(elem, 'marginRight') -\n this.getCSSNumber(elem, 'borderLeft') -\n this.getCSSNumber(elem, 'borderRight');\n\n const actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') -\n this.getCSSNumber(elem, 'paddingBottom') -\n this.getCSSNumber(elem, 'marginTop') -\n this.getCSSNumber(elem, 'marginBottom') -\n this.getCSSNumber(elem, 'borderTop') -\n this.getCSSNumber(elem, 'borderBottom');\n\n this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate);\n x += targetWidth;\n }\n y += targetHeight;\n }\n }\n\n private filterDisplayNone(element: HTMLElement) {\n return element.style.display !== 'none';\n }\n\n updateLayout() {\n if (this.layoutContainer.style.display === 'none') {\n return;\n }\n let id = this.layoutContainer.id;\n if (!id) {\n id = 'OT_' + this.cheapUUID();\n this.layoutContainer.id = id;\n }\n\n const HEIGHT = this.getHeight(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderTop') -\n this.getCSSNumber(this.layoutContainer, 'borderBottom');\n const WIDTH = this.getWidth(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderLeft') -\n this.getCSSNumber(this.layoutContainer, 'borderRight');\n\n const availableRatio = HEIGHT / WIDTH;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n let bigOffsetTop = 0;\n let bigOffsetLeft = 0;\n\n const bigOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass),\n this.filterDisplayNone);\n const smallOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'),\n this.filterDisplayNone);\n\n if (bigOnes.length > 0 && smallOnes.length > 0) {\n let bigWidth, bigHeight;\n\n if (availableRatio > this.getVideoRatio(bigOnes[0])) {\n // We are tall, going to take up the whole width and arrange small\n // guys at the bottom\n bigWidth = WIDTH;\n bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage);\n offsetTop = bigHeight;\n bigOffsetTop = HEIGHT - offsetTop;\n } else {\n // We are wide, going to take up the whole height and arrange the small\n // guys on the right\n bigHeight = HEIGHT;\n bigWidth = Math.floor(WIDTH * this.opts.bigPercentage);\n offsetLeft = bigWidth;\n bigOffsetLeft = WIDTH - offsetLeft;\n }\n if (this.opts.bigFirst) {\n this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio,\n this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop,\n this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate);\n }\n } else if (bigOnes.length > 0 && smallOnes.length === 0) {\n this.\n // We only have one bigOne just center it\n arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n }\n }\n\n initLayoutContainer(container, opts) {\n this.opts = {\n maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2,\n minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16,\n fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false,\n animate: (opts.animate != null) ? opts.animate : false,\n bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big',\n bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8,\n bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false,\n bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2,\n bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16,\n bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true\n };\n this.layoutContainer = typeof (container) === 'string' ? $(container) : container;\n }\n\n setLayoutOptions(options: OpenViduLayoutOptions) {\n this.opts = options;\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/openvidu-layout.ts","import { Component, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';\nimport { Subscriber } from 'openvidu-browser';\n\n@Component({\n selector: 'app-ov-video',\n template: ''\n})\nexport class OpenViduVideoComponent implements AfterViewInit {\n\n @ViewChild('videoElement') elementRef: ElementRef;\n\n _subscriber: Subscriber;\n\n ngAfterViewInit() {\n this._subscriber.addVideoElement(this.elementRef.nativeElement);\n }\n\n @Input()\n set subscriber(subscriber: Subscriber) {\n this._subscriber = subscriber;\n if (!!this.elementRef) {\n this._subscriber.addVideoElement(this.elementRef.nativeElement);\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/ov-video.component.ts","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.css\n// module id = ./src/app/components/session-details/session-details.component.css\n// module chunks = main","module.exports = \"

\\n session-details works!\\n

\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.html\n// module id = ./src/app/components/session-details/session-details.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-session-details',\n templateUrl: './session-details.component.html',\n styleUrls: ['./session-details.component.css']\n})\nexport class SessionDetailsComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/session-details/session-details.component.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class InfoService {\n\n info: string;\n newInfo$: Subject;\n\n constructor() {\n this.newInfo$ = new Subject();\n }\n\n getInfo() {\n return this.info;\n }\n\n updateInfo(info: string) {\n this.info = info;\n this.newInfo$.next(info);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/info.service.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class RestService {\n\n private openviduPublicUrl: string;\n\n getOpenViduPublicUrl(): Promise {\n return new Promise((resolve, reject) => {\n if (!!this.openviduPublicUrl) {\n resolve(this.openviduPublicUrl);\n } else {\n const url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') +\n '/config/openvidu-publicurl';\n const http = new XMLHttpRequest();\n\n http.onreadystatechange = () => {\n if (http.readyState === 4) {\n if (http.status === 200) {\n this.openviduPublicUrl = http.responseText;\n resolve(http.responseText);\n } else {\n reject('Error getting OpenVidu publicurl');\n }\n };\n }\n http.open('GET', url, true);\n http.send();\n }\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/rest.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/main.e4ef2b4aa5c302f2916e.js b/openvidu-server/src/main/resources/static/main.e4ef2b4aa5c302f2916e.js new file mode 100644 index 00000000..0d9364f1 --- /dev/null +++ b/openvidu-server/src/main/resources/static/main.e4ef2b4aa5c302f2916e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+27z":function(e,t){function n(e,t){var n={audio:!1,video:{mandatory:{chromeMediaSource:e?"screen":"desktop",maxWidth:window.screen.width>1920?window.screen.width:1920,maxHeight:window.screen.height>1080?window.screen.height:1080},optional:[]}};return t&&(n.video.mandatory.chromeMediaSourceId=t),n}var r;function i(){r?r.isLoaded?r.contentWindow.postMessage({captureSourceId:!0},"*"):setTimeout(i,100):o(i)}function o(e){r?e():((r=document.createElement("iframe")).onload=function(){r.isLoaded=!0,e()},r.src="https://www.webrtc-experiment.com/getSourceId/",r.style.display="none",(document.body||document.documentElement).appendChild(r))}function s(){r?r.isLoaded?r.contentWindow.postMessage({getChromeExtensionStatus:!0},"*"):setTimeout(s,100):o(s)}window.getScreenId=function(e){navigator.mozGetUserMedia?e(null,"firefox",{video:{mozMediaSource:"window",mediaSource:"window"}}):(window.addEventListener("message",function t(r){r.data&&(r.data.chromeMediaSourceId&&("PermissionDeniedError"===r.data.chromeMediaSourceId?e("permission-denied"):e(null,r.data.chromeMediaSourceId,n(null,r.data.chromeMediaSourceId)),window.removeEventListener("message",t)),r.data.chromeExtensionStatus&&(e(r.data.chromeExtensionStatus,null,n(r.data.chromeExtensionStatus)),window.removeEventListener("message",t)))}),setTimeout(i,100))},window.getChromeExtensionStatus=function(e){navigator.mozGetUserMedia?e("installed-enabled"):(window.addEventListener("message",function t(n){n.data&&(n.data.chromeExtensionStatus&&e(n.data.chromeExtensionStatus),window.removeEventListener("message",t))}),setTimeout(s,100))},t.getScreenId=getScreenId},"+FKC":function(e,t,n){"use strict";t.__esModule=!0;var r=n("+qwt");t.WebRtcStats=function(){function e(e){this.stream=e,this.webRtcStatsEnabled=!1,this.statsInterval=1,this.stats={inbound:{audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0,nackCount:0}},outbound:{audio:{bytesSent:0,packetsSent:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,nackCount:0}}}}return e.prototype.isEnabled=function(){return this.webRtcStatsEnabled},e.prototype.initWebRtcStats=function(){var e=this,t=localStorage.getItem("elastest-instrumentation");if(t){console.warn("WebRtc stats enabled for stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId),this.webRtcStatsEnabled=!0;var n=JSON.parse(t);return this.statsInterval=n.webrtc.interval,console.warn("localStorage item: "+JSON.stringify(n)),void(this.webRtcStatsIntervalId=setInterval(function(){e.sendStatsToHttpEndpoint(n)},1e3*this.statsInterval))}console.debug("WebRtc stats not enabled")},e.prototype.stopWebRtcStats=function(){this.webRtcStatsEnabled&&(clearInterval(this.webRtcStatsIntervalId),console.warn("WebRtc stats stopped for disposed stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId))},e.prototype.sendStatsToHttpEndpoint=function(e){var t=this,n=function(n){var r=new XMLHttpRequest,i=e.webrtc.httpEndpoint;r.open("POST",i,!0),r.setRequestHeader("Content-type","application/json"),r.onreadystatechange=function(){4===r.readyState&&200===r.status&&console.log("WebRtc stats successfully sent to "+i+" for stream "+t.stream.streamId+" of connection "+t.stream.connection.connectionId)},r.send(n)};this.getStatsAgnostic(this.stream.getRTCPeerConnection(),function(i){if(-1!==r.name.indexOf("Firefox"))i.forEach(function(r){var i={};if("inbound-rtp"===r.type&&null!==r.nackCount&&!1===r.isRemote&&r.id.startsWith("inbound")&&r.remoteId.startsWith("inbound")){var o="webrtc_inbound_"+r.mediaType+"_"+r.ssrc,s={bytesReceived:(r.bytesReceived-t.stats.inbound[r.mediaType].bytesReceived)/t.statsInterval,jitter:1e3*r.jitter,packetsReceived:(r.packetsReceived-t.stats.inbound[r.mediaType].packetsReceived)/t.statsInterval,packetsLost:(r.packetsLost-t.stats.inbound[r.mediaType].packetsLost)/t.statsInterval},a={bytesReceived:"bytes",jitter:"ms",packetsReceived:"packets",packetsLost:"packets"};"video"===r.mediaType&&(s.framesDecoded=(r.framesDecoded-t.stats.inbound.video.framesDecoded)/t.statsInterval,s.nackCount=(r.nackCount-t.stats.inbound.video.nackCount)/t.statsInterval,a.framesDecoded="frames",a.nackCount="packets",t.stats.inbound.video.framesDecoded=r.framesDecoded,t.stats.inbound.video.nackCount=r.nackCount),t.stats.inbound[r.mediaType].bytesReceived=r.bytesReceived,t.stats.inbound[r.mediaType].packetsReceived=r.packetsReceived,t.stats.inbound[r.mediaType].packetsLost=r.packetsLost,(i={"@timestamp":new Date(r.timestamp).toISOString(),exec:e.exec,component:e.component,stream:"webRtc",type:o,stream_type:"composed_metrics",units:a})[o]=s,n(JSON.stringify(i))}else"outbound-rtp"===r.type&&!1===r.isRemote&&r.id.toLowerCase().includes("outbound")&&(o="webrtc_outbound_"+r.mediaType+"_"+r.ssrc,s={bytesSent:(r.bytesSent-t.stats.outbound[r.mediaType].bytesSent)/t.statsInterval,packetsSent:(r.packetsSent-t.stats.outbound[r.mediaType].packetsSent)/t.statsInterval},a={bytesSent:"bytes",packetsSent:"packets"},"video"===r.mediaType&&(s.framesEncoded=(r.framesEncoded-t.stats.outbound.video.framesEncoded)/t.statsInterval,a.framesEncoded="frames",t.stats.outbound.video.framesEncoded=r.framesEncoded),t.stats.outbound[r.mediaType].bytesSent=r.bytesSent,t.stats.outbound[r.mediaType].packetsSent=r.packetsSent,(i={"@timestamp":new Date(r.timestamp).toISOString(),exec:e.exec,component:e.component,stream:"webRtc",type:o,stream_type:"composed_metrics",units:a})[o]=s,n(JSON.stringify(i)))});else if(-1!==r.name.indexOf("Chrome"))for(var o=0,s=Object.keys(i);o0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},n.prototype.removeListener=function(e,t){var n,o,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},"+qwt":function(e,t,n){(function(e){var r;(function(){"use strict";var i={function:!0,object:!0},o=i[typeof window]&&window||this,s=i[typeof t]&&t&&i[typeof e]&&e&&!e.nodeType&&e&&"object"==typeof global&&global;!s||s.global!==s&&s.window!==s&&s.self!==s||(o=s);var a=Math.pow(2,53)-1,u=/\bOpera/,l=Object.prototype,c=l.hasOwnProperty,d=l.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=v(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function f(e,t){for(var n in e)c.call(e,n)&&t(e[n],n,e)}function m(e){return null==e?p(e):d.call(e).slice(8,-1)}function g(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function y(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=a)for(;++n3?"WebKit":/\bOpera\b/.test(V)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(t)&&("Mac OS"==B?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(V)&&"NetFront")&&(L=[a]),"IE"==V&&(a=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(V+=" Mobile",B="Windows Phone "+(/\+$/.test(a)?a:a+".x"),M.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(V="IE Mobile",B="Windows Phone 8.x",M.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=V&&"Trident"==L&&(a=/\brv:([\d.]+)/.exec(t))&&(V&&M.push("identifying as "+V+(j?" "+j:"")),V="IE",j=a[1]),D){if(p="global",/^(?:boolean|number|string|undefined)$/.test(b=null!=(c=n)?typeof c[p]:"number")||"object"==b&&!c[p])m(a=n.runtime)==w?(V="Adobe AIR",B=a.flash.system.Capabilities.os):m(a=n.phantom)==C?(V="PhantomJS",j=(a=a.version||null)&&a.major+"."+a.minor+"."+a.patch):"number"==typeof k.documentMode&&(a=/\bTrident\/(\d+)/i.exec(t))?((a=+a[1]+4)!=(j=[j,k.documentMode])[1]&&(M.push("IE "+j[1]+" mode"),L&&(L[1]=""),j[1]=a),j="IE"==V?String(j[1].toFixed(1)):j[0]):"number"==typeof k.documentMode&&/^(?:Chrome|Firefox)\b/.test(V)&&(M.push("masking as "+V+" "+j),V="IE",j="11.0",L=["Trident"],B="Windows");else if(x&&(R=(a=x.lang.System).getProperty("os.arch"),B=B||a.getProperty("os.name")+" "+a.getProperty("os.version")),O){try{j=n.require("ringo/engine").version.join("."),V="RingoJS"}catch(e){(a=n.system)&&a.global.system==n.system&&(V="Narwhal",B||(B=a[0].os||null))}V||(V="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(a=n.process)&&("object"==typeof a.versions&&("string"==typeof a.versions.electron?(M.push("Node "+a.versions.node),V="Electron",j=a.versions.electron):"string"==typeof a.versions.nw&&(M.push("Chromium "+j,"Node "+a.versions.node),V="NW.js",j=a.versions.nw)),V||(V="Node.js",R=a.arch,B=a.platform,j=(j=/[\d.]+/.exec(a.version))?j[0]:null));B=B&&h(B)}if(j&&(a=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(D&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(N=/b/i.test(a)?"beta":"alpha",j=j.replace(RegExp(a+"\\+?$"),"")+("beta"==N?I:T)+(/\d+\+?/.exec(a)||"")),"Fennec"==V||"Firefox"==V&&/\b(?:Android|Firefox OS)\b/.test(B))V="Firefox Mobile";else if("Maxthon"==V&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(F))"Xbox 360"==F&&(B=null),"Xbox 360"==F&&/\bIEMobile\b/.test(t)&&M.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(V)&&(!V||F||/Browser|Mobi/.test(V))||"Windows CE"!=B&&!/Mobi/i.test(t))if("IE"==V&&D)try{null===n.external&&M.unshift("platform preview")}catch(e){M.unshift("embedded")}else(/\bBlackBerry\b/.test(F)||/\bBB10\b/.test(t))&&(a=(RegExp(F.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||j)?(B=((a=[a,/BB10/.test(t)])[1]?(F=null,z="BlackBerry"):"Device Software")+" "+a[0],j=null):this!=f&&"Wii"!=F&&(D&&A||/Opera/.test(V)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==V&&/\bOS X (?:\d+\.){2,}/.test(B)||"IE"==V&&(B&&!/^Win/.test(B)&&j>5.5||/\bWindows XP\b/.test(B)&&j>8||8==j&&!/\bTrident\b/.test(t)))&&!u.test(a=e.call(f,t.replace(u,"")+";"))&&a.name&&(a="ing as "+a.name+((a=a.version)?" "+a:""),u.test(V)?(/\bIE\b/.test(a)&&"Mac OS"==B&&(B=null),a="identify"+a):(a="mask"+a,V=P?h(P.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(a)&&(B=null),D||(j=null)),L=["Presto"],M.push(a));else V+=" Mobile";(a=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(a=[parseFloat(a.replace(/\.(\d)$/,".0$1")),a],"Safari"==V&&"+"==a[1].slice(-1)?(V="WebKit Nightly",N="alpha",j=a[1].slice(0,-1)):j!=a[1]&&j!=(a[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(j=null),a[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==a[0]&&537.36==a[2]&&parseFloat(a[1])>=28&&"WebKit"==L&&(L=["Blink"]),D&&(_||a[1])?(L&&(L[1]="like Chrome"),a=a[1]||((a=a[0])<530?1:a<532?2:a<532.05?3:a<533?4:a<534.03?5:a<534.07?6:a<534.1?7:a<534.13?8:a<534.16?9:a<534.24?10:a<534.3?11:a<535.01?12:a<535.02?"13+":a<535.07?15:a<535.11?16:a<535.19?17:a<536.05?18:a<536.1?19:a<537.01?20:a<537.11?"21+":a<537.13?23:a<537.18?24:a<537.24?25:a<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),a=(a=a[0])<400?1:a<500?2:a<526?3:a<533?4:a<534?"4+":a<535?5:a<537?6:a<538?7:a<601?8:"8"),L&&(L[1]+=" "+(a+="number"==typeof a?".x":/[.+]/.test(a)?"":"+")),"Safari"==V&&(!j||parseInt(j)>45)&&(j=a)),"Opera"==V&&(a=/\bzbov|zvav$/.exec(B))?(V+=" ",M.unshift("desktop mode"),"zvav"==a?(V+="Mini",j=null):V+="Mobile",B=B.replace(RegExp(" *"+a+"$"),"")):"Safari"==V&&/\bChrome\b/.exec(L&&L[1])&&(M.unshift("desktop mode"),V="Chrome Mobile",j=null,/\bOS X\b/.test(B)?(z="Apple",B="iOS 4.3+"):B=null),j&&0==j.indexOf(a=/[\d.]+$/.exec(B))&&t.indexOf("/"+a+"-")>-1&&(B=v(B.replace(a,""))),L&&!/\b(?:Avant|Nook)\b/.test(V)&&(/Browser|Lunascape|Maxthon/.test(V)||"Safari"!=V&&/^iOS/.test(B)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(V)&&L[1])&&(a=L[L.length-1])&&M.push(a),M.length&&(M=["("+M.join("; ")+")"]),z&&F&&F.indexOf(z)<0&&M.push("on "+z),F&&M.push((/^on /.test(M[M.length-1])?"":"on ")+F),B&&(a=/ ([\d.+]+)$/.exec(B),l=a&&"/"==B.charAt(B.length-a[0].length-1),B={architecture:32,family:a&&!l?B.replace(a[0],""):B,version:a?a[1]:null,toString:function(){var e=this.version;return this.family+(e&&!l?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(a=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(R))&&!/\bi686\b/i.test(R)?(B&&(B.architecture=64,B.family=B.family.replace(RegExp(" *"+a),"")),V&&(/\bWOW64\b/i.test(t)||D&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))&&M.unshift("32-bit")):B&&/^OS X/.test(B.family)&&"Chrome"==V&&parseFloat(j)>=39&&(B.architecture=64),t||(t=null);var H={};return H.description=t,H.layout=L&&L[0],H.manufacturer=z,H.name=V,H.prerelease=N,H.product=F,H.ua=t,H.version=V&&j,H.os=B||{architecture:null,family:null,version:null,toString:function(){return"null"}},H.parse=e,H.toString=function(){return this.description||""},H.version&&M.unshift(j),H.name&&M.unshift(V),B&&V&&(B!=String(B).split(" ")[0]||B!=V.split(" ")[0]&&!F)&&M.push(F?"("+B+")":"on "+B),M.length&&(H.description=M.join(" ")),H}();o.platform=b,void 0===(r=(function(){return b}).call(t,n,t,e))||(e.exports=r)}).call(this)}).call(this,n("YuTi")(e))},"/SDK":function(e,t,n){"use strict";var r=n("WPr4"),i=n("a9Cz");function o(){this.cache={mlB2UMap:{},mlU2BMap:{}}}e.exports=o,o.prototype.candidateToUnifiedPlan=function(e){var t=new RTCIceCandidate(e);return t.sdpMLineIndex=this.cache.mlB2UMap[t.sdpMLineIndex],t},o.prototype.candidateToPlanB=function(e){var t=new RTCIceCandidate(e);if(0===t.sdpMid.indexOf("audio"))t.sdpMid="audio";else{if(0!==t.sdpMid.indexOf("video"))throw new Error("candidate with "+t.sdpMid+" not allowed");t.sdpMid="video"}return t.sdpMLineIndex=this.cache.mlU2BMap[t.sdpMLineIndex],t},o.prototype.getFirstSendingIndexFromAnswer=function(e){if(!this.cache.answer)return null;var t=r.parse(this.cache.answer);if(t&&t.media&&Array.isArray(t.media))for(var n=0;n3||!n.media.every(function(e){return-1!==["video","audio","data"].indexOf(e.mid)}))return console.warn("This description does not look like Plan B."),e;var o=[];n.media.forEach(function(e){o.push(e.mid)});var s,a,u=!1;if(void 0!==n.groups&&Array.isArray(n.groups)&&(u=n.groups.every(function(e){return"BUNDLE"!==e.type||i.apply(e.mids.sort(),[o.sort()])})),!u){var l=!1;if(n.media.forEach(function(e){"inactive"!==e.direction&&(l=!0)}),l)throw new Error("Cannot convert to Unified Plan because m-lines that are not bundled were found.")}if("answer"===e.type)s="offer";else{if("offer"!==e.type)throw new Error("Type '"+e.type+"' not supported.");s="answer"}void 0!==this.cache[s]&&(a=r.parse(this.cache[s]));var c,d,p,h,f={audio:{},video:{}},m={},g=0,y=0,v={},b={},_={},w={};if(n.media.forEach(function(n){if(("string"!=typeof n.rtcpMux||"rtcp-mux"!==n.rtcpMux)&&"inactive"!==n.direction)throw new Error("Cannot convert to Unified Plan because m-lines without the rtcp-mux attribute were found.");if("application"!==n.type){var r=n.sources,i=n.ssrcGroups,o=n.port;if(void 0!==n.candidates&&(c=void 0!==c?c.concat(n.candidates):n.candidates),void 0!==d&&void 0!==n.iceUfrag&&d!=n.iceUfrag)throw new Error("Only BUNDLE supported, iceUfrag must be the same for all m-lines.\n\tLast iceUfrag: "+d+"\n\tNew iceUfrag: "+n.iceUfrag);if(void 0!==n.iceUfrag&&(d=n.iceUfrag),void 0!==p&&void 0!==n.icePwd&&p!=n.icePwd)throw new Error("Only BUNDLE supported, icePwd must be the same for all m-lines.\n\tLast icePwd: "+p+"\n\tNew icePwd: "+n.icePwd);if(void 0!==n.icePwd&&(p=n.icePwd),void 0!==h&&void 0!==n.fingerprint&&(h.type!=n.fingerprint.type||h.hash!=n.fingerprint.hash))throw new Error("Only BUNDLE supported, fingerprint must be the same for all m-lines.\n\tLast fingerprint: "+JSON.stringify(h)+"\n\tNew fingerprint: "+JSON.stringify(n.fingerprint));void 0!==n.fingerprint&&(h=n.fingerprint),b[n.type]=n.payloads,_[n.type]=n.rtcpFb,w[n.type]=n.rtp;var s={};void 0!==i&&Array.isArray(i)&&i.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(t){void 0===s[t]&&(s[t]=[]),s[t].push(e)})});var u={};if("object"==typeof r)delete n.sources,delete n.ssrcGroups,delete n.candidates,delete n.iceUfrag,delete n.icePwd,delete n.fingerprint,delete n.port,delete n.mid,Object.keys(r).forEach(function(i){var l;"offer"!==e.type||r[i].msid?(void 0!==s[i]&&Array.isArray(s[i])&&s[i].some(function(e){return e.ssrcs.some(function(e){if("object"==typeof u[e])return l=u[e],!0})}),"object"==typeof l?(l.sources[i]=r[i],delete r[i].msid):(l=Object.create(n),u[i]=l,void 0!==r[i].msid&&(l.msid=r[i].msid,delete r[i].msid),l.sources={},l.sources[i]=r[i],l.ssrcGroups=s[i],void 0!==a&&void 0!==a.media&&Array.isArray(a.media)&&a.media.forEach(function(e){"object"==typeof e.sources&&Object.keys(e.sources).forEach(function(t){t===i&&(l.mid=e.mid)})}),void 0===l.mid&&(l.mid=[n.type,"-",i].join("")),l.candidates=c,l.iceUfrag=d,l.icePwd=p,l.fingerprint=h,l.port=o,m[l.mid]=l,v[y]=l.sources,t.cache.mlU2BMap[y]=g,void 0===t.cache.mlB2UMap[g]&&(t.cache.mlB2UMap[g]=y),y++)):f[n.type][i]=r[i]});else{var l=n;l.candidates=c,l.iceUfrag=d,l.icePwd=p,l.fingerprint=h,l.port=o,m[l.mid]=l,t.cache.mlU2BMap[y]=g,void 0===t.cache.mlB2UMap[g]&&(t.cache.mlB2UMap[g]=y)}g++}else m[n.mid]=n}),n.media=[],o=[],"answer"===e.type)for(var E=0;E0&&null===(r=t.getFirstSendingIndexFromAnswer(e)))for(var i=0;ir){var o=n.media[r];Object.keys(f[e]).forEach(function(t){o.sources&&o.sources[t]&&console.warn("Replacing an existing SSRC."),o.sources||(o.sources={}),o.sources[t]=f[e][t]})}}}),void 0!==n.groups&&n.groups.some(function(e){if("BUNDLE"===e.type)return e.mids=o.join(" "),!0}),n.msidSemantic={semantic:"WMS",token:"*"};var C=r.write(n);return this.cache[e.type]=C,new RTCSessionDescription({type:e.type,sdp:C})}},"/dLB":function(e,t,n){"use strict";t.__esModule=!0,function(e){e.AFTER="AFTER",e.APPEND="APPEND",e.BEFORE="BEFORE",e.PREPEND="PREPEND",e.REPLACE="REPLACE"}(t.VideoInsertMode||(t.VideoInsertMode={}))},"0wxW":function(e,t,n){var r=n("de4E"),i=n("pLL0");t.JsonRPC=r,t.XmlRPC=i},"2mXG":function(e,t,n){var r=n("8fGR"),i=n("P7XM"),o=n("K4CH"),s=n("EcEN"),a=n("aMtt"),u=n("+qE3").EventEmitter,l=n("wcCE").recursive.bind(void 0,!0),c=n("SRjm"),d=window.Logger||console,p={audio:!0,video:{width:640,framerate:15}},h=new o(window&&window.navigator?window.navigator.userAgent:""),f=h.getBrowser(),m=!1;function g(e){e&&d.error(e)}function y(e){e.stop&&e.stop()}function v(e){e.getTracks().forEach(y)}"Chrome"!==f.name&&"Chromium"!==f.name||(d.debug(f.name+": using SDP PlanB"),m=!0);var b=function(e){return void 0===e||null===e?"":"type: "+e.type+"\r\n"+e.sdp};function _(e,t){var n=[];return e.addEventListener("signalingstatechange",function(){if("stable"===this.signalingState)for(;n.length;){var t=n.shift();e.addIceCandidate(t.candidate,t.callback,t.callback)}}),function(r,i){switch(i=i||t,e.signalingState){case"closed":i(new Error("PeerConnection object is closed"));break;case"stable":e.remoteDescription&&e.addIceCandidate(r,i,i);break;default:n.push({candidate:r,callback:i})}}}function w(e,t,n){if(!(this instanceof w))return new w(e,t,n);w.super_.call(this),t instanceof Function&&(n=t,t=void 0),t=t||{},n=(n||g).bind(this);var i=this,o=t.localVideo,a=t.remoteVideo,y=t.videoStream,v=t.audioStream,E=t.mediaConstraints,S=t.peerConnection,C=t.sendSource||"webcam",x=s.v4(),O=l({iceServers:t.iceServers&&t.iceServers.length>0?t.iceServers:r()},t.configuration),T=t.onicecandidate;T&&this.on("icecandidate",T);var I=t.oncandidategatheringdone;I&&this.on("candidategatheringdone",I);var k=t.simulcast,A=t.multistream,P=new c.Interop,R=[],M=!1;Object.defineProperties(this,{peerConnection:{get:function(){return S}},id:{value:t.id||x,writable:!1},remoteVideo:{get:function(){return a}},localVideo:{get:function(){return o}},currentFrame:{get:function(){if(a){if(a.readyState0?t.slice(0,n):t)+function(e){var t=e.getVideoTracks();if(!t.length)return d.warn("No video tracks available in the video stream"),"";var n=["a=x-google-flag:conference","a=ssrc-group:SIM 1 2 3","a=ssrc:1 cname:localVideo","a=ssrc:1 msid:"+e.id+" "+t[0].id,"a=ssrc:1 mslabel:"+e.id,"a=ssrc:1 label:"+t[0].id,"a=ssrc:2 cname:localVideo","a=ssrc:2 msid:"+e.id+" "+t[0].id,"a=ssrc:2 mslabel:"+e.id,"a=ssrc:2 label:"+t[0].id,"a=ssrc:3 cname:localVideo","a=ssrc:3 msid:"+e.id+" "+t[0].id,"a=ssrc:3 mslabel:"+e.id,"a=ssrc:3 label:"+t[0].id];return n.push(""),n.join("\n")}(y))})):d.warn("Simulcast is only available in Chrome browser.")),e}function L(){"closed"===S.signalingState&&n('The peer connection object is in "closed" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue'),y&&o&&i.showLocalVideo(),y&&S.addStream(y),v&&S.addStream(v);var t=h.getBrowser();"sendonly"!==e||"Chrome"!==t.name&&"Chromium"!==t.name||39!==t.major||(e="sendrecv"),n()}if(this.addIceCandidate=function(e,t){var n;n=A&&m?P.candidateToPlanB(e):new RTCIceCandidate(e),d.debug("Remote ICE candidate received",e),t=(t||g).bind(this),N(n,t)},this.generateOffer=function(t){t=t.bind(this);var n=!0,r=!0;E&&(n="boolean"!=typeof E.audio||E.audio,r="boolean"!=typeof E.video||E.video);var o={offerToReceiveAudio:"sendonly"!==e&&n,offerToReceiveVideo:"sendonly"!==e&&r};d.debug("constraints: "+JSON.stringify(o)),S.createOffer(o).then(function(e){return d.debug("Created SDP offer"),e=j(e),S.setLocalDescription(e)}).then(function(){var e=S.localDescription;d.debug("Local description set",e.sdp),A&&m&&(e=P.toUnifiedPlan(e),d.debug("offer::origPlanB->UnifiedPlan",b(e))),t(null,e.sdp,i.processAnswer.bind(i))}).catch(t)},this.getLocalSessionDescriptor=function(){return S.localDescription},this.getRemoteSessionDescriptor=function(){return S.remoteDescription},this.showLocalVideo=function(){o.srcObject=y,o.muted=!0},this.processAnswer=function(e,t){t=(t||g).bind(this);var n=new RTCSessionDescription({type:"answer",sdp:e});if(A&&m){var r=P.toPlanB(n);d.debug("asnwer::planB",b(r)),n=r}if(d.debug("SDP answer received, setting remote description"),"closed"===S.signalingState)return t("PeerConnection is closed");S.setRemoteDescription(n,function(){D(),t()},t)},this.processOffer=function(e,t){t=t.bind(this);var n=new RTCSessionDescription({type:"offer",sdp:e});if(A&&m){var r=P.toPlanB(n);d.debug("offer::planB",b(r)),n=r}if(d.debug("SDP offer received, setting remote description"),"closed"===S.signalingState)return t("PeerConnection is closed");S.setRemoteDescription(n).then(function(){return D()}).then(function(){return S.createAnswer()}).then(function(e){return e=j(e),d.debug("Created SDP answer"),S.setLocalDescription(e)}).then(function(){var e=S.localDescription;A&&m&&(e=P.toUnifiedPlan(e),d.debug("answer::origPlanB->UnifiedPlan",b(e))),d.debug("Local description set",e.sdp),t(null,e.sdp)}).catch(t)},"recvonly"===e||y||v)setTimeout(L,0);else{function V(e){void 0===e&&(e=p),navigator.mediaDevices.getUserMedia(e).then(function(e){y=e,L()}).catch(n)}"webcam"===C?V(E):getScreenConstraints(C,function(e,t){if(e)return n(e);constraints=[E],constraints.unshift(t),V(l.apply(void 0,constraints))},x)}this.on("_dispose",function(){o&&(o.pause(),o.srcObject=null,o.load(),o.muted=!1),a&&(a.pause(),a.srcObject=null,a.load()),i.removeAllListeners(),void 0!==window.cancelChooseDesktopMedia&&window.cancelChooseDesktopMedia(x)})}function E(e){var t="get"+e+"Tracks";return{enumerable:!0,get:function(){if(this.peerConnection){var e=this.peerConnection.getLocalStreams();if(e.length){for(var n,r=0;n=e[r];r++)for(var i,o=n[t](),s=0;i=o[s];s++)if(!i.enabled)return!1;return!0}}},set:function(e){function n(t){t.enabled=e}this.peerConnection.getLocalStreams().forEach(function(e){e[t]().forEach(n)})}}}function S(e,t){if(!(this instanceof S))return new S(e,t);S.super_.call(this,"recvonly",e,t)}function C(e,t){if(!(this instanceof C))return new C(e,t);C.super_.call(this,"sendonly",e,t)}function x(e,t){if(!(this instanceof x))return new x(e,t);x.super_.call(this,"sendrecv",e,t)}i(w,u),Object.defineProperties(w.prototype,{enabled:{enumerable:!0,get:function(){return this.audioEnabled&&this.videoEnabled},set:function(e){this.audioEnabled=this.videoEnabled=e}},audioEnabled:E("Audio"),videoEnabled:E("Video")}),w.prototype.getLocalStream=function(e){if(this.peerConnection)return this.peerConnection.getLocalStreams()[e||0]},w.prototype.getRemoteStream=function(e){if(this.peerConnection)return this.peerConnection.getRemoteStreams()[e||0]},w.prototype.dispose=function(){d.debug("Disposing WebRtcPeer");var e=this.peerConnection;try{if(e){if("closed"===e.signalingState)return;e.getLocalStreams().forEach(v),e.close()}}catch(e){d.warn("Exception disposing webrtc peer "+e)}this.emit("_dispose")},i(S,w),i(C,w),i(x,w),t.bufferizeCandidates=_,t.WebRtcPeerRecvonly=S,t.WebRtcPeerSendonly=C,t.WebRtcPeerSendrecv=x,t.hark=function(e,t){return a(e,t)}},3:function(e,t,n){e.exports=n("zUnb")},"4O8T":function(e,t,n){var r;!function(t){"use strict";function i(){}var o=i.prototype,s=t.EventEmitter;function a(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function u(e){return function(){return this[e].apply(this,arguments)}}o.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp)for(n in t={},r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n]);else t=r[e]||(r[e]=[]);return t},o.flattenListeners=function(e){var t,n=[];for(t=0;t>>((3&t)<<3)&255;return i}}},"5bWi":function(e){e.exports=["stun.l.google.com:19302","stun1.l.google.com:19302","stun2.l.google.com:19302","stun3.l.google.com:19302","stun4.l.google.com:19302","stun.ekiga.net","stun.ideasip.com","stun.schlund.de","stun.stunprotocol.org:3478","stun.voiparound.com","stun.voipbuster.com","stun.voipstunt.com","stun.voxgratia.org","stun.services.mozilla.com"]},"8KVD":function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ");t.ConnectionEvent=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r)||this;return s.connection=i,s.reason=o,s}return r(t,e),t.prototype.callDefaultBehaviour=function(){},t}(i.Event)},"8Lyy":function(e,t,n){var r=n("O6qx"),i=/%[sdv%]/g,o=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var o=0;o=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})}).apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],a=["i","c","b","a"];e.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.innerOrder||a,i=[];return(t.outerOrder||s).forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?i.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){i.push(o(t,n,e))})})}),e.media.forEach(function(e){i.push(o("m",r.m[0],e)),n.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?i.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){i.push(o(t,n,e))})})})}),i.join("\r\n")+"\r\n"}},"8fGR":function(e,t,n){"use strict";var r=n("ohuM");e.exports=function(e){var t,i={stun:(e||{}).stun||n("5bWi"),turn:(e||{}).turn||n("wJ6L")},o=(e||{}).turnCount||0;function s(e,t){for(var n,o=[],s=[].concat(i[e]);s.length&&o.lengthu&&(c=!1,b(),s.debug("Server did not respond to ping message #"+r+". Reconnecting... "),y.reconnectWs()))}))}else s.debug("Trying to send ping, but ping is not enabled");var r}function w(){d||(s.debug("Starting ping (if configured)"),d=!0,void 0!=e.heartbeat&&(t=setInterval(_,e.heartbeat),_()))}this.send=function(e,t,n){"ping"!==e&&s.debug("Request: method:"+e+" params:"+JSON.stringify(t));var r=Date.now();v.encode(e,t,function(i,o){if(i){try{s.error("ERROR:"+i.message+" in Request: method:"+e+" params:"+JSON.stringify(t)+" request:"+i.request),i.data&&s.error("ERROR DATA:"+JSON.stringify(i.data))}catch(e){}i.requestTime=r}n&&(void 0!=o&&"pong"!==o.value&&s.debug("Response: "+JSON.stringify(o)),n(i,o))})},this.close=function(){s.debug("Closing jsonRpcClient explicitly by client"),void 0!=t&&(s.debug("Clearing ping interval"),clearInterval(t)),d=!1,c=!1,e.sendCloseMessage?(s.debug("Sending close message"),this.send("closeSession",null,function(e,t){e&&s.error("Error sending close message: "+JSON.stringify(e)),y.close()})):y.close()},this.forceClose=function(e){y.forceClose(e)},this.reconnect=function(){y.reconnectWs()}}},EcEN:function(e,t,n){var r=n("xDdU"),i=n("xk4V"),o=i;o.v1=r,o.v4=i,e.exports=o},EcWD:function(e,t){var n,r="screen",i=void 0!==window.InstallTrigger;function o(e){if(!e)throw'"callback" parameter is mandatory.';if(sourceId)return e(sourceId);n=e,window.postMessage("get-sourceId","*")}window.opera||navigator.userAgent.indexOf(" OPR/"),window,window.addEventListener("message",function(e){e.origin==window.location.origin&&function(e){if("PermissionDeniedError"==e){if(r="PermissionDeniedError",n)return n("PermissionDeniedError");throw new Error("PermissionDeniedError")}"rtcmulticonnection-extension-loaded"==e&&(r="desktop"),e.sourceId&&n&&n(sourceId=e.sourceId)}(e.data)}),t.getScreenConstraints=function(e){if(sourceId="",i)return e(null,{mozMediaSource:"window",mediaSource:"window"});var t={mandatory:{chromeMediaSource:r,maxWidth:screen.width>1920?screen.width:1920,maxHeight:screen.height>1080?screen.height:1080},optional:[]};"desktop"!=r||sourceId?("desktop"==r&&(t.mandatory.chromeMediaSourceId=sourceId),e(null,t)):o(function(){t.mandatory.chromeMediaSourceId=sourceId,e("PermissionDeniedError"==sourceId?sourceId:null,t)})},t.isChromeExtensionAvailable=function(e){return i?e(!1):"desktop"==r?e("isFirefox"):(window.postMessage("are-you-there","*"),void setTimeout(function(){e("screen"==r?"unavailable":"available")},2e3))},t.getChromeExtensionStatus=function(e,t){if(i)return t("not-chrome");2!=arguments.length&&(t=e,e="ajhifddimkapgcifgcodmmfdlknahffk");var n=document.createElement("img");n.src="chrome-extension://"+e+"/icon.png",n.onload=function(){r="screen",window.postMessage("are-you-there","*"),setTimeout(function(){t("screen"==r?e==e?"installed-enabled":"installed-disabled":"installed-enabled")},2e3)},n.onerror=function(){t("not-installed")}},t.getSourceId=o},HxXY:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ");t.StreamManagerEvent=function(e){function t(t){return e.call(this,!1,t,"streamPlaying")||this}return r(t,e),t.prototype.callDefaultBehaviour=function(){},t}(i.Event)},I2ZF:function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0;return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}},JTMn:function(e,t,n){"use strict";t.__esModule=!0;var r=n("ryRr"),i=n("bk74"),o=n("8KVD"),s=n("rUL0"),a=n("ksJj"),u=n("suHS"),l=n("Te8r"),c=n("Tt94"),d=n("/dLB"),p=n("+qwt"),h=n("4O8T");t.Session=function(){function e(e){this.streamManagers=[],this.remoteStreamsCreated={},this.remoteConnections={},this.speakingEventsEnabled=!1,this.ee=new h,this.openvidu=e}return e.prototype.connect=function(e,t){var n=this;return new Promise(function(r,i){n.processToken(e),n.openvidu.checkSystemRequirements()?(n.options={sessionId:n.sessionId,participantId:e,metadata:t?n.stringClientMetadata(t):""},n.connectAux(e).then(function(){r()}).catch(function(e){i(e)})):i(new c.OpenViduError(c.OpenViduErrorName.BROWSER_NOT_SUPPORTED,"Browser "+p.name+" "+p.version+" is not supported in OpenVidu"))})},e.prototype.disconnect=function(){this.leave(!1,"disconnect")},e.prototype.subscribe=function(e,t,n,r){var o,s={};s=n&&"function"!=typeof n?{insertMode:void 0!==n.insertMode?"string"==typeof n.insertMode?d.VideoInsertMode[n.insertMode]:s.insertMode:d.VideoInsertMode.APPEND,subscribeToAudio:void 0===n.subscribeToAudio||n.subscribeToAudio,subscribeToVideo:void 0===n.subscribeToVideo||n.subscribeToVideo}:{insertMode:d.VideoInsertMode.APPEND,subscribeToAudio:!0,subscribeToVideo:!0},n&&"function"==typeof n?o=n:r&&(o=r),console.info("Subscribing to "+e.connection.connectionId),e.subscribe().then(function(){console.info("Subscribed correctly to "+e.connection.connectionId),void 0!==o&&o(void 0)}).catch(function(e){void 0!==o&&o(e)});var a=new i.Subscriber(e,t,s);return a.targetElement&&e.streamManager.createVideoElement(a.targetElement,s.insertMode),a},e.prototype.subscribeAsync=function(e,t,n){var r=this;return new Promise(function(i,o){var s,a=function(e){e?o(e):i(s)};s=n?r.subscribe(e,t,n,a):r.subscribe(e,t,a)})},e.prototype.unsubscribe=function(e){var t=e.stream.connection.connectionId;console.info("Unsubscribing from "+t),this.openvidu.sendRequest("unsubscribeFromVideo",{sender:e.stream.connection.connectionId},function(n,r){n?console.error("Error unsubscribing from "+t,n):console.info("Unsubscribed correctly from "+t),e.stream.disposeWebRtcPeer(),e.stream.disposeMediaStream()}),e.stream.streamManager.removeAllVideos()},e.prototype.publish=function(e){var t=this;return new Promise(function(n,r){e.session=t,e.stream.session=t,e.stream.isLocalStreamPublished?e.initialize().then(function(){t.connection.addStream(e.stream),e.reestablishStreamPlayingEvent(),e.stream.publish().then(function(){n()}).catch(function(e){r(e)})}).catch(function(e){r(e)}):(t.connection.addStream(e.stream),e.stream.publish().then(function(){n()}).catch(function(e){r(e)}))})},e.prototype.unpublish=function(e){var t=e.stream;if(t.connection)if(t.connection===this.connection){console.info("Unpublishing local media ("+t.connection.connectionId+")"),this.openvidu.sendRequest("unpublishVideo",function(e,t){e?console.error(e):console.info("Media unpublished correctly")}),t.disposeWebRtcPeer(),delete t.connection.stream;var n=new l.StreamEvent(!0,e,"streamDestroyed",e.stream,"unpublish");e.emitEvent("streamDestroyed",[n]),n.callDefaultBehaviour()}else console.error("The associated Connection object of this Publisher is not your local Connection.Only moderators can force unpublish on remote Streams via 'forceUnpublish' method",t);else console.error("The associated Connection object of this Publisher is null",t)},e.prototype.signal=function(e){var t=this;return new Promise(function(n,r){var i={};if(e.to&&e.to.length>0){var o=[];e.to.forEach(function(e){o.push(e.connectionId)}),i.to=o}else i.to=[];i.data=e.data?e.data:"",i.type=e.type?e.type:"",t.openvidu.sendRequest("sendMessage",{message:JSON.stringify(i)},function(e,t){e?r(e):n()})})},e.prototype.on=function(e,t){if(this.ee.on(e,function(n){n?console.info("Event '"+e+"' triggered by 'Session'",n):console.info("Event '"+e+"' triggered by 'Session'"),t(n)}),"publisherStartSpeaking"===e||"publisherStopSpeaking"===e)for(var n in this.speakingEventsEnabled=!0,this.remoteConnections){var r=this.remoteConnections[n].stream;r&&!r.speechEvent&&r.hasAudio&&r.enableSpeakingEvents()}return this},e.prototype.once=function(e,t){if(this.ee.once(e,function(n){n?console.info("Event '"+e+"' triggered by 'Session'",n):console.info("Event '"+e+"' triggered by 'Session'"),t(n)}),"publisherStartSpeaking"===e||"publisherStopSpeaking"===e)for(var n in this.speakingEventsEnabled=!0,this.remoteConnections){var r=this.remoteConnections[n].stream;r&&!r.speechEvent&&r.hasAudio&&r.enableOnceSpeakingEvents()}return this},e.prototype.off=function(e,t){if(t?this.ee.off(e,t):this.ee.removeAllListeners(e),"publisherStartSpeaking"===e||"publisherStopSpeaking"===e)for(var n in this.speakingEventsEnabled=!1,this.remoteConnections){var r=this.remoteConnections[n].stream;r&&r.speechEvent&&r.disableSpeakingEvents()}return this},e.prototype.onParticipantJoined=function(e){var t=this;this.getConnection(e.id,"").then(function(t){console.warn("Connection "+e.id+" already exists in connections list")}).catch(function(n){var i=new r.Connection(t,e);t.remoteConnections[e.id]=i,t.ee.emitEvent("connectionCreated",[new o.ConnectionEvent(!1,t,"connectionCreated",i,"")])})},e.prototype.onParticipantLeft=function(e){var t=this;this.getRemoteConnection(e.name,"Remote connection "+e.name+" unknown when 'onParticipantLeft'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(n){if(n.stream){var r=n.stream,i=new l.StreamEvent(!0,t,"streamDestroyed",r,e.reason);t.ee.emitEvent("streamDestroyed",[i]),i.callDefaultBehaviour(),delete t.remoteStreamsCreated[r.streamId]}delete t.remoteConnections[n.connectionId],t.ee.emitEvent("connectionDestroyed",[new o.ConnectionEvent(!1,t,"connectionDestroyed",n,e.reason)])}).catch(function(e){console.error(e)})},e.prototype.onParticipantPublished=function(e){var t,n=this,i=function(e){n.remoteConnections[e.connectionId]=e,n.remoteStreamsCreated[e.stream.streamId]||n.ee.emitEvent("streamCreated",[new l.StreamEvent(!1,n,"streamCreated",e.stream,"")]),n.remoteStreamsCreated[e.stream.streamId]=!0};this.getRemoteConnection(e.id,"Remote connection '"+e.id+"' unknown when 'onParticipantPublished'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(n){t=n,e.metadata=n.data,t.options=e,t.initRemoteStreams(e.streams),i(t)}).catch(function(o){t=new r.Connection(n,e),i(t)})},e.prototype.onParticipantUnpublished=function(e){var t=this;this.getRemoteConnection(e.name,"Remote connection '"+e.name+"' unknown when 'onParticipantUnpublished'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(n){var r=new l.StreamEvent(!0,t,"streamDestroyed",n.stream,e.reason);t.ee.emitEvent("streamDestroyed",[r]),r.callDefaultBehaviour();var i=n.stream.streamId;delete t.remoteStreamsCreated[i],n.removeStream(i)}).catch(function(e){console.error(e)})},e.prototype.onParticipantEvicted=function(e){},e.prototype.onNewMessage=function(e){var t=this;console.info("New signal: "+JSON.stringify(e)),this.getConnection(e.from,"Connection '"+e.from+"' unknow when 'onNewMessage'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))+". Existing local connection: "+this.connection.connectionId).then(function(n){t.ee.emitEvent("signal",[new u.SignalEvent(t,e.type,e.data,n)]),t.ee.emitEvent("signal:"+e.type,[new u.SignalEvent(t,e.type,e.data,n)])}).catch(function(e){console.error(e)})},e.prototype.recvIceCandidate=function(e){var t={candidate:e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex};this.getConnection(e.endpointName,"Connection not found for endpoint "+e.endpointName+". Ice candidate will be ignored: "+t).then(function(n){var r=n.stream;r.getWebRtcPeer().addIceCandidate(t,function(t){t&&console.error("Error adding candidate for "+r.streamId+" stream of endpoint "+e.endpointName+": "+t)})}).catch(function(e){console.error(e)})},e.prototype.onSessionClosed=function(e){console.info("Session closed: "+JSON.stringify(e));var t=e.room;void 0!==t?this.ee.emitEvent("session-closed",[{session:t}]):console.warn("Session undefined on session closed",e)},e.prototype.onLostConnection=function(){if(this.connection)console.warn("Lost connection in Session "+this.sessionId),this.sessionId&&!this.connection.disposed&&this.leave(!0,"networkDisconnect");else{console.warn("Not connected to session: if you are not debugging, this is probably a certificate error");var e="https://"+this.openvidu.getWsUri().split("wss://")[1].split("/openvidu")[0];window.confirm('If you are not debugging, this is probably a certificate error at "'+e+'"\n\nClick OK to navigate and accept it')&&location.assign(e+"/accept-certificate")}},e.prototype.onMediaError=function(e){console.error("Media error: "+JSON.stringify(e));var t=e.error;t?this.ee.emitEvent("error-media",[{error:t}]):console.warn("Received undefined media error. Params:",e)},e.prototype.onRecordingStarted=function(e){this.ee.emitEvent("recordingStarted",[new s.RecordingEvent(this,"recordingStarted",e.id,e.name)])},e.prototype.onRecordingStopped=function(e){this.ee.emitEvent("recordingStopped",[new s.RecordingEvent(this,"recordingStopped",e.id,e.name)])},e.prototype.emitEvent=function(e,t){this.ee.emitEvent(e,t)},e.prototype.leave=function(e,t){var n=this;if(e=!!e,console.info("Leaving Session (forced="+e+")"),this.connection){if(this.connection.disposed||e?this.openvidu.closeWs():this.openvidu.sendRequest("leaveRoom",function(e,t){e&&console.error(e),n.openvidu.closeWs()}),this.connection.stream&&(this.connection.stream.disposeWebRtcPeer(),this.connection.stream.isLocalStreamPublished&&this.connection.stream.ee.emitEvent("local-stream-destroyed-by-disconnect",[t])),!this.connection.disposed){var r=new a.SessionDisconnectedEvent(this,t);this.ee.emitEvent("sessionDisconnected",[r]),r.callDefaultBehaviour()}}else console.warn("You were not connected to the session "+this.sessionId)},e.prototype.connectAux=function(e){var t=this;return new Promise(function(n,i){t.openvidu.startWs(function(s){if(s)i(s);else{var a={token:e||"",session:t.sessionId,metadata:t.options.metadata?t.options.metadata:"",secret:t.openvidu.getSecret(),recorder:t.openvidu.getRecorder()};t.openvidu.sendRequest("joinRoom",a,function(e,s){if(e)i(e);else{t.connection=new r.Connection(t),t.connection.connectionId=s.id,t.connection.data=s.metadata;var a={connections:new Array,streams:new Array};s.value.forEach(function(e){var n=new r.Connection(t,e);t.remoteConnections[n.connectionId]=n,a.connections.push(n),n.stream&&(t.remoteStreamsCreated[n.stream.streamId]=!0,a.streams.push(n.stream))}),t.ee.emitEvent("connectionCreated",[new o.ConnectionEvent(!1,t,"connectionCreated",t.connection,"")]),a.connections.forEach(function(e){t.ee.emitEvent("connectionCreated",[new o.ConnectionEvent(!1,t,"connectionCreated",e,"")])}),a.streams.forEach(function(e){t.ee.emitEvent("streamCreated",[new l.StreamEvent(!1,t,"streamCreated",e,"")])}),n()}})}})})},e.prototype.stringClientMetadata=function(e){return"string"!=typeof e?JSON.stringify(e):e},e.prototype.getConnection=function(e,t){var n=this;return new Promise(function(r,i){var o=n.remoteConnections[e];o?r(o):n.connection.connectionId===e?r(n.connection):i(new c.OpenViduError(c.OpenViduErrorName.GENERIC_ERROR,t))})},e.prototype.getRemoteConnection=function(e,t){var n=this;return new Promise(function(r,i){var o=n.remoteConnections[e];o?r(o):i(new c.OpenViduError(c.OpenViduErrorName.GENERIC_ERROR,t))})},e.prototype.processToken=function(e){var t=new URL(e);this.sessionId=t.searchParams.get("sessionId");var n=t.searchParams.get("secret"),r=t.searchParams.get("recorder");n&&(this.openvidu.secret=n),r&&(this.openvidu.recorder=!0),this.openvidu.wsUri="wss://"+t.host+"/openvidu"},e}()},K4CH:function(e,t,n){var r;!function(i,o){"use strict";var s="model",a="name",u="type",l="vendor",c="version",d="mobile",p="tablet",h={extend:function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},f={rgx:function(e,t){for(var n,r,i,o,s,a,u=0;u0?2==o.length?this[o[0]]="function"==typeof o[1]?o[1].call(this,a):o[1]:3==o.length?this[o[0]]="function"!=typeof o[1]||o[1].exec&&o[1].test?a?a.replace(o[1],o[2]):void 0:a?o[1].call(this,a,o[2]):void 0:4==o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):void 0):this[o]=a||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r0&&!1===this.videos[0].video.paused&&!1===this.videos[0].video.ended&&4===this.videos[0].video.readyState&&(this.ee.emitEvent("streamPlaying",[new r.StreamManagerEvent(this)]),this.ee.emitEvent("videoPlaying",[new i.VideoElementEvent(this.videos[0].video,this,"videoPlaying")])),this},e.prototype.once=function(e,t){return this.ee.once(e,function(n){n?console.info("Event '"+e+"' triggered once",n):console.info("Event '"+e+"' triggered once"),t(n)}),"videoElementCreated"===e&&this.stream&&this.lazyLaunchVideoElementCreatedEvent&&this.ee.emitEvent("videoElementCreated",[new i.VideoElementEvent(this.videos[0].video,this,"videoElementCreated")]),"streamPlaying"!==e&&"videoPlaying"!==e||this.videos[0]&&this.videos[0].video&&this.videos[0].video.currentTime>0&&!1===this.videos[0].video.paused&&!1===this.videos[0].video.ended&&4===this.videos[0].video.readyState&&(this.ee.emitEvent("streamPlaying",[new r.StreamManagerEvent(this)]),this.ee.emitEvent("videoPlaying",[new i.VideoElementEvent(this.videos[0].video,this,"videoPlaying")])),this},e.prototype.off=function(e,t){return t?this.ee.off(e,t):this.ee.removeAllListeners(e),this},e.prototype.addVideoElement=function(e){this.initializeVideoProperties(e);for(var t=0,n=this.videos;t=0;--t)this.stream.session.streamManagers[t]===this&&this.stream.session.streamManagers.splice(t,1);this.videos.slice().reverse().forEach(function(t,n,r){t.video.removeEventListener("canplay",e.canPlayListener),t.targetElement?(t.video.parentNode.removeChild(t.video),e.ee.emitEvent("videoElementDestroyed",[new i.VideoElementEvent(t.video,e,"videoElementDestroyed")]),e.videos.splice(r.length-1-n,1)):t.video.srcObject=null})},e.prototype.disassociateVideo=function(e){for(var t=!1,n=0;n0&&!1===this.videos[0].video.paused&&!1===this.videos[0].video.ended&&4===this.videos[0].video.readyState&&this.ee.emitEvent("remoteVideoPlaying",[new u.VideoElementEvent(this.videos[0].video,this,"remoteVideoPlaying")]),"accessAllowed"===t&&this.accessAllowed&&this.ee.emitEvent("accessAllowed"),"accessDenied"===t&&this.accessDenied&&this.ee.emitEvent("accessDenied"),this},t.prototype.once=function(t,n){var r=this;return e.prototype.once.call(this,t,n),"streamCreated"===t&&(this.stream&&this.stream.isLocalStreamPublished?this.ee.emitEvent("streamCreated",[new a.StreamEvent(!1,this,"streamCreated",this.stream,"")]):this.stream.ee.once("stream-created-by-publisher",function(){r.ee.emitEvent("streamCreated",[new a.StreamEvent(!1,r,"streamCreated",r.stream,"")])})),"remoteVideoPlaying"===t&&this.stream.displayMyRemote()&&this.videos[0]&&this.videos[0].video&&this.videos[0].video.currentTime>0&&!1===this.videos[0].video.paused&&!1===this.videos[0].video.ended&&4===this.videos[0].video.readyState&&this.ee.emitEvent("remoteVideoPlaying",[new u.VideoElementEvent(this.videos[0].video,this,"remoteVideoPlaying")]),"accessAllowed"===t&&this.accessAllowed&&this.ee.emitEvent("accessAllowed"),"accessDenied"===t&&this.accessDenied&&this.ee.emitEvent("accessDenied"),this},t.prototype.initialize=function(){var e=this;return new Promise(function(t,n){var r=function(t){e.accessDenied=!0,e.accessAllowed=!1,n(t)},i=function(n){e.accessAllowed=!0,e.accessDenied=!1,e.openvidu.isMediaStreamTrack(e.properties.audioSource)&&(n.removeTrack(n.getAudioTracks()[0]),n.addTrack(e.properties.audioSource)),e.openvidu.isMediaStreamTrack(e.properties.videoSource)&&(n.removeTrack(n.getVideoTracks()[0]),n.addTrack(e.properties.videoSource)),n.getAudioTracks()[0]&&(n.getAudioTracks()[0].enabled=!!e.stream.outboundStreamOpts.publisherProperties.publishAudio),n.getVideoTracks()[0]&&(n.getVideoTracks()[0].enabled=!!e.stream.outboundStreamOpts.publisherProperties.publishVideo),e.stream.setMediaStream(n),e.stream.displayMyRemote()||e.stream.updateMediaStreamInVideos(),e.stream.isLocalStreamReadyToPublish=!0,e.stream.ee.emitEvent("stream-ready-to-publish",[]),e.firstVideoElement&&e.createVideoElement(e.firstVideoElement.targetElement,e.properties.insertMode),delete e.firstVideoElement,t()};e.openvidu.generateMediaConstraints(e.properties).then(function(t){e.stream.setOutboundStreamOptions({mediaConstraints:t,publisherProperties:e.properties});var o={};if(e.stream.isSendVideo()||e.stream.isSendAudio()){var s=void 0===t.audio||t.audio;o.audio=!e.stream.isSendScreen()&&s,o.video=t.video;var a=Date.now();e.setPermissionDialogTimer(1250),navigator.mediaDevices.getUserMedia(o).then(function(n){e.clearPermissionDialogTimer(a,1250),e.stream.isSendScreen()&&e.stream.isSendAudio()?(o.audio=s,o.video=!1,a=Date.now(),e.setPermissionDialogTimer(1250),navigator.mediaDevices.getUserMedia(o).then(function(t){e.clearPermissionDialogTimer(a,1250),n.addTrack(t.getAudioTracks()[0]),i(n)}).catch(function(n){var i,o;switch(e.clearPermissionDialogTimer(a,1250),n.name.toLowerCase()){case"notfounderror":i=l.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND,o=n.toString(),r(new l.OpenViduError(i,o));break;case"notallowederror":i=l.OpenViduErrorName.DEVICE_ACCESS_DENIED,o=n.toString(),r(new l.OpenViduError(i,o));break;case"overconstrainederror":"deviceid"===n.constraint.toLowerCase()?(i=l.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND,o="Audio input device with deviceId '"+t.video.deviceId.exact+"' not found"):(i=l.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR,o="Audio input device doesn't support the value passed for constraint '"+n.constraint+"'"),r(new l.OpenViduError(i,o))}})):i(n)}).catch(function(n){var i,o;switch(e.clearPermissionDialogTimer(a,1250),n.name.toLowerCase()){case"notfounderror":navigator.mediaDevices.getUserMedia({audio:!1,video:t.video}).then(function(e){e.getVideoTracks().forEach(function(e){e.stop()}),i=l.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND,o=n.toString(),r(new l.OpenViduError(i,o))}).catch(function(e){i=l.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND,o=n.toString(),r(new l.OpenViduError(i,o))});break;case"notallowederror":i=e.stream.isSendScreen()?l.OpenViduErrorName.SCREEN_CAPTURE_DENIED:l.OpenViduErrorName.DEVICE_ACCESS_DENIED,o=n.toString(),r(new l.OpenViduError(i,o));break;case"overconstrainederror":navigator.mediaDevices.getUserMedia({audio:!1,video:t.video}).then(function(e){e.getVideoTracks().forEach(function(e){e.stop()}),"deviceid"===n.constraint.toLowerCase()?(i=l.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND,o="Audio input device with deviceId '"+t.audio.deviceId.exact+"' not found"):(i=l.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR,o="Audio input device doesn't support the value passed for constraint '"+n.constraint+"'"),r(new l.OpenViduError(i,o))}).catch(function(e){"deviceid"===n.constraint.toLowerCase()?(i=l.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND,o="Video input device with deviceId '"+t.video.deviceId.exact+"' not found"):(i=l.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR,o="Video input device doesn't support the value passed for constraint '"+n.constraint+"'"),r(new l.OpenViduError(i,o))})}})}else n(new l.OpenViduError(l.OpenViduErrorName.NO_INPUT_SOURCE_SET,"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'"))}).catch(function(e){r(e)})})},t.prototype.updateSession=function(e){this.session=e,this.stream.session=e},t.prototype.emitEvent=function(e,t){this.ee.emitEvent(e,t)},t.prototype.reestablishStreamPlayingEvent=function(){this.ee.getListeners("streamPlaying").length>0&&this.addPlayEventToFirstVideo()},t.prototype.setPermissionDialogTimer=function(e){var t=this;this.permissionDialogTimeout=setTimeout(function(){t.ee.emitEvent("accessDialogOpened",[])},e)},t.prototype.clearPermissionDialogTimer=function(e,t){clearTimeout(this.permissionDialogTimeout),Date.now()-e>t&&this.ee.emitEvent("accessDialogClosed",[])},t}(s.StreamManager)},PPcv:function(e,t,n){"use strict";t.__esModule=!0;var r=n("tInm"),i=n("PEz1"),o=n("JTMn"),s=n("Tt94"),a=n("/dLB"),u=n("AeG9"),l=n("+27z"),c=n("EcWD"),d=n("+qwt");t.OpenVidu=function(){function e(){this.secret="",this.recorder=!1,this.advancedConfiguration={},console.info("'OpenVidu' initialized")}return e.prototype.initSession=function(){return this.session=new o.Session(this),this.session},e.prototype.initPublisher=function(e,t,n){var r;r=t&&"function"!=typeof t?{audioSource:void 0!==(r=t).audioSource?r.audioSource:void 0,frameRate:this.isMediaStreamTrack(r.videoSource)?void 0:void 0!==r.frameRate?r.frameRate:void 0,insertMode:void 0!==r.insertMode?"string"==typeof r.insertMode?a.VideoInsertMode[r.insertMode]:r.insertMode:a.VideoInsertMode.APPEND,mirror:void 0===r.mirror||r.mirror,publishAudio:void 0===r.publishAudio||r.publishAudio,publishVideo:void 0===r.publishVideo||r.publishVideo,resolution:this.isMediaStreamTrack(r.videoSource)?void 0:void 0!==r.resolution?r.resolution:"640x480",videoSource:void 0!==r.videoSource?r.videoSource:void 0}:{insertMode:a.VideoInsertMode.APPEND,mirror:!0,publishAudio:!0,publishVideo:!0,resolution:"640x480"};var o,s=new i.Publisher(e,r,this);return t&&"function"==typeof t?o=t:n&&(o=n),s.initialize().then(function(){void 0!==o&&o(void 0),s.emitEvent("accessAllowed",[])}).catch(function(e){void 0!==o&&o(e),s.emitEvent("accessDenied",[])}),s},e.prototype.initPublisherAsync=function(e,t){var n=this;return new Promise(function(r,i){var o,s=function(e){e?i(e):r(o)};o=t?n.initPublisher(e,t,s):n.initPublisher(e,s)})},e.prototype.initLocalRecorder=function(e){return new r.LocalRecorder(e)},e.prototype.checkSystemRequirements=function(){var e=d.name;return"Chrome"!==e&&"Chrome Mobile"!==e&&"Firefox"!==e&&"Firefox Mobile"!==e&&"Firefox for iOS"!==e&&"Opera"!==e&&"Opera Mobile"!==e&&"Safari"!==e?0:1},e.prototype.getDevices=function(){return new Promise(function(e,t){navigator.mediaDevices.enumerateDevices().then(function(t){var n=[];t.forEach(function(e){"audioinput"!==e.kind&&"videoinput"!==e.kind||n.push({kind:e.kind,deviceId:e.deviceId,label:e.label})}),e(n)}).catch(function(e){console.error("Error getting devices",e),t(e)})})},e.prototype.getUserMedia=function(e){var t=this;return new Promise(function(n,r){t.generateMediaConstraints(e).then(function(t){navigator.mediaDevices.getUserMedia(t).then(function(e){n(e)}).catch(function(t){var n=t.toString();r(new s.OpenViduError("screen"!==e.videoSource?s.OpenViduErrorName.DEVICE_ACCESS_DENIED:s.OpenViduErrorName.SCREEN_CAPTURE_DENIED,n))})}).catch(function(e){r(e)})})},e.prototype.enableProdMode=function(){console.log=function(){},console.debug=function(){},console.info=function(){},console.warn=function(){}},e.prototype.setAdvancedConfiguration=function(e){this.advancedConfiguration=e},e.prototype.generateMediaConstraints=function(e){var t=this;return new Promise(function(n,r){var i={audio:null!==e.audioSource&&!1!==e.audioSource&&(void 0===e.audioSource||e.audioSource),video:null!==e.videoSource&&!1!==e.videoSource&&{height:{ideal:480},width:{ideal:640}}};if("string"==typeof i.audio&&(i.audio={deviceId:{exact:i.audio}}),i.video){if(e.resolution){var o=e.resolution.toLowerCase().split("x"),a=Number(o[0]),u=Number(o[1]);i.video.width.ideal=a,i.video.height.ideal=u}if(e.frameRate&&(i.video.frameRate={ideal:e.frameRate}),e.videoSource&&"string"==typeof e.videoSource)if("screen"===e.videoSource)if("Chrome"!==d.name&&"Firefox"!==d.name){var p=new s.OpenViduError(s.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED,"You can only screen share in desktop Chrome and Firefox. Detected browser: "+d.name);console.error(p),r(p)}else{if(t.advancedConfiguration.screenShareChromeExtension){var h=t.advancedConfiguration.screenShareChromeExtension.split("/").pop().trim();c.getChromeExtensionStatus(h,function(e){if("installed-enabled"===e&&c.getScreenConstraints(function(e,t){if(e&&"permission-denied"===e){var o=new s.OpenViduError(s.OpenViduErrorName.SCREEN_CAPTURE_DENIED,"You must allow access to one window of your desktop");console.error(o),r(o)}else i.video=t,n(i)}),"installed-disabled"===e){var o=new s.OpenViduError(s.OpenViduErrorName.SCREEN_EXTENSION_DISABLED,"You must enable the screen extension");console.error(o),r(o)}"not-installed"===e&&(o=new s.OpenViduError(s.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED,t.advancedConfiguration.screenShareChromeExtension),console.error(o),r(o))})}else l.getScreenId(function(e,t,o){if(e){if("not-installed"===e){var a=new s.OpenViduError(s.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED,"https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk");console.error(a),r(a)}else if("installed-disabled"===e){var u=new s.OpenViduError(s.OpenViduErrorName.SCREEN_EXTENSION_DISABLED,"You must enable the screen extension");console.error(u),r(u)}else if("permission-denied"===e){var l=new s.OpenViduError(s.OpenViduErrorName.SCREEN_CAPTURE_DENIED,"You must allow access to one window of your desktop");console.error(l),r(l)}}else i.video=o.video,n(i)});e.videoSource="screen"}else i.video.deviceId={exact:e.videoSource},n(i);else n(i)}else n(i)})},e.prototype.startWs=function(e){var t={heartbeat:5e3,sendCloseMessage:!1,ws:{uri:this.wsUri,useSockJS:!1,onconnected:e,ondisconnect:this.disconnectCallback.bind(this),onreconnecting:this.reconnectingCallback.bind(this),onreconnected:this.reconnectedCallback.bind(this)},rpc:{requestTimeout:15e3,participantJoined:this.session.onParticipantJoined.bind(this.session),participantPublished:this.session.onParticipantPublished.bind(this.session),participantUnpublished:this.session.onParticipantUnpublished.bind(this.session),participantLeft:this.session.onParticipantLeft.bind(this.session),participantEvicted:this.session.onParticipantEvicted.bind(this.session),recordingStarted:this.session.onRecordingStarted.bind(this.session),recordingStopped:this.session.onRecordingStopped.bind(this.session),sendMessage:this.session.onNewMessage.bind(this.session),iceCandidate:this.session.recvIceCandidate.bind(this.session),mediaError:this.session.onMediaError.bind(this.session)}};this.jsonRpcClient=new u.clients.JsonRpcClient(t)},e.prototype.closeWs=function(){this.jsonRpcClient.close()},e.prototype.sendRequest=function(e,t,n){t&&t instanceof Function&&(n=t,t={}),console.debug('Sending request: {method:"'+e+'", params: '+JSON.stringify(t)+"}"),this.jsonRpcClient.send(e,t,n)},e.prototype.isMediaStreamTrack=function(e){return!!e&&void 0!==e.enabled&&"boolean"==typeof e.enabled&&void 0!==e.id&&"string"==typeof e.id&&void 0!==e.kind&&"string"==typeof e.kind&&void 0!==e.label&&"string"==typeof e.label&&void 0!==e.muted&&"boolean"==typeof e.muted&&void 0!==e.readyState&&"string"==typeof e.readyState},e.prototype.getWsUri=function(){return this.wsUri},e.prototype.getSecret=function(){return this.secret},e.prototype.getRecorder=function(){return this.recorder},e.prototype.disconnectCallback=function(){console.warn("Websocket connection lost"),this.isRoomAvailable()?this.session.onLostConnection():alert("Connection error. Please reload page.")},e.prototype.reconnectingCallback=function(){console.warn("Websocket connection lost (reconnecting)"),this.isRoomAvailable()?this.session.onLostConnection():alert("Connection error. Please reload page.")},e.prototype.reconnectedCallback=function(){console.warn("Websocket reconnected")},e.prototype.isRoomAvailable=function(){return void 0!==this.session&&this.session instanceof o.Session||(console.warn("Session instance not found"),!1)},e}()},PZzU:function(e,t,n){"use strict";t.__esModule=!0;var r=n("PPcv");t.OpenVidu=r.OpenVidu;var i=n("JTMn");t.Session=i.Session;var o=n("PEz1");t.Publisher=o.Publisher;var s=n("bk74");t.Subscriber=s.Subscriber;var a=n("P3vI");t.StreamManager=a.StreamManager;var u=n("DPKQ");t.Stream=u.Stream;var l=n("ryRr");t.Connection=l.Connection;var c=n("tInm");t.LocalRecorder=c.LocalRecorder;var d=n("Yn0Z");t.LocalRecorderState=d.LocalRecorderState;var p=n("Tt94");t.OpenViduError=p.OpenViduError;var h=n("/dLB");t.VideoInsertMode=h.VideoInsertMode;var f=n("hzOQ");t.Event=f.Event;var m=n("8KVD");t.ConnectionEvent=m.ConnectionEvent;var g=n("e8ps");t.PublisherSpeakingEvent=g.PublisherSpeakingEvent;var y=n("rUL0");t.RecordingEvent=y.RecordingEvent;var v=n("ksJj");t.SessionDisconnectedEvent=v.SessionDisconnectedEvent;var b=n("suHS");t.SignalEvent=b.SignalEvent;var _=n("Te8r");t.StreamEvent=_.StreamEvent;var w=n("HxXY");t.StreamManagerEvent=w.StreamManagerEvent;var E=n("oIG1");t.VideoElementEvent=E.VideoElementEvent},SRjm:function(e,t,n){t.Interop=n("/SDK")},SYuc:function(e,t,n){var r=n("EDod");t.JsonRpcClient=r},Te8r:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ"),o=n("PEz1"),s=n("JTMn");t.StreamEvent=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r)||this;return s.stream=i,s.reason=o,s}return r(t,e),t.prototype.callDefaultBehaviour=function(){if("streamDestroyed"===this.type){this.target instanceof s.Session?(console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'"),this.stream.disposeWebRtcPeer()):this.target instanceof o.Publisher&&(console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Publisher'"),this.stream.isLocalStreamReadyToPublish=!1),this.stream.disposeMediaStream(),this.stream.streamManager&&this.stream.streamManager.removeAllVideos(),delete this.stream.session.remoteStreamsCreated[this.stream.streamId];var e=this.stream.session.remoteConnections[this.stream.connection.connectionId];if(e&&e.options)for(var t=e.options.streams,n=t.length-1;n>=0;--n)t[n].id===this.stream.streamId&&t.splice(n,1)}},t}(i.Event)},Tt94:function(e,t,n){"use strict";t.__esModule=!0,function(e){e.BROWSER_NOT_SUPPORTED="BROWSER_NOT_SUPPORTED",e.DEVICE_ACCESS_DENIED="DEVICE_ACCESS_DENIED",e.SCREEN_CAPTURE_DENIED="SCREEN_CAPTURE_DENIED",e.SCREEN_SHARING_NOT_SUPPORTED="SCREEN_SHARING_NOT_SUPPORTED",e.SCREEN_EXTENSION_NOT_INSTALLED="SCREEN_EXTENSION_NOT_INSTALLED",e.SCREEN_EXTENSION_DISABLED="SCREEN_EXTENSION_DISABLED",e.INPUT_VIDEO_DEVICE_NOT_FOUND="INPUT_VIDEO_DEVICE_NOT_FOUND",e.INPUT_AUDIO_DEVICE_NOT_FOUND="INPUT_AUDIO_DEVICE_NOT_FOUND",e.NO_INPUT_SOURCE_SET="NO_INPUT_SOURCE_SET",e.PUBLISHER_PROPERTIES_ERROR="PUBLISHER_PROPERTIES_ERROR",e.OPENVIDU_PERMISSION_DENIED="OPENVIDU_PERMISSION_DENIED",e.OPENVIDU_NOT_CONNECTED="OPENVIDU_NOT_CONNECTED",e.GENERIC_ERROR="GENERIC_ERROR"}(t.OpenViduErrorName||(t.OpenViduErrorName={})),t.OpenViduError=function(e,t){this.name=e,this.message=t}},WPr4:function(e,t,n){var r=n("k76L");t.write=function(e,t){return void 0!==e&&void 0!==e.media&&Array.isArray(e.media)&&e.media.forEach(function(e){void 0!==e.sources&&0!==Object.keys(e.sources).length&&(e.ssrcs=[],Object.keys(e.sources).forEach(function(t){var n=e.sources[t];Object.keys(n).forEach(function(r){e.ssrcs.push({id:t,attribute:r,value:n[r]})})}),delete e.sources),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.ssrcs=e.ssrcs.join(" "))})}),void 0!==e&&void 0!==e.groups&&Array.isArray(e.groups)&&e.groups.forEach(function(e){void 0!==e.mids&&Array.isArray(e.mids)&&(e.mids=e.mids.join(" "))}),r.write(e,t)},t.parse=function(e){var t=r.parse(e);return void 0!==t&&void 0!==t.media&&Array.isArray(t.media)&&t.media.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.sources={},e.ssrcs.forEach(function(t){e.sources[t.id]||(e.sources[t.id]={}),e.sources[t.id][t.attribute]=t.value}),delete e.ssrcs),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){"string"==typeof e.ssrcs&&(e.ssrcs=e.ssrcs.split(" "))})}),void 0!==t&&void 0!==t.groups&&Array.isArray(t.groups)&&t.groups.forEach(function(e){"string"==typeof e.mids&&(e.mids=e.mids.split(" "))}),t}},Yn0Z:function(e,t,n){"use strict";t.__esModule=!0,function(e){e.READY="READY",e.RECORDING="RECORDING",e.PAUSED="PAUSED",e.FINISHED="FINISHED"}(t.LocalRecorderState||(t.LocalRecorderState={}))},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},a9Cz:function(e,t){e.exports=function e(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,r=this.length;nn&&t[r]<0&&(n=t[r]);return n}(u,a);n.emit("volume_change",e,d);var t=0;if(e>d&&!n.speaking){for(var r=n.speakingHistory.length-3;r=2&&(n.speaking=!0,n.emit("speaking"))}else if(ed)),g()}},c)};return g(),n}},bk74:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("P3vI");t.Subscriber=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.element=i.targetElement,i.stream=t,i.properties=r,i}return r(t,e),t.prototype.subscribeToAudio=function(e){return this.stream.getMediaStream().getAudioTracks().forEach(function(t){t.enabled=e}),console.info("'Subscriber' has "+(e?"subscribed to":"unsubscribed from")+" its audio stream"),this},t.prototype.subscribeToVideo=function(e){return this.stream.getMediaStream().getVideoTracks().forEach(function(t){t.enabled=e}),console.info("'Subscriber' has "+(e?"subscribed to":"unsubscribed from")+" its video stream"),this},t}(i.StreamManager)},cUzU:function(e,t,n){"use strict";global.WebSocket||global;var r=console,i=3e3;e.exports=function(e){var t,n,o=!1,s=e.uri,a=e.useSockJS,u=!1,l=!1;function c(e,t){try{r.debug("WebSocket connected to "+t)}catch(e){r.error(e)}}(n=a?new SockJS(s):new WebSocket(s)).onopen=function(){c(0,s),e.onconnected&&e.onconnected()},n.onerror=function(t){r.error("Could not connect to "+s+" (invoking onerror if defined)",t),e.onerror&&e.onerror(t)};var d=function(){3===n.readyState?o?r.debug("Connection closed by user"):(r.debug("Connection closed unexpectecly. Reconnecting..."),p(2e3,1)):r.debug("Close callback from previous websocket. Ignoring it")};function p(t,n){if(r.debug("reconnectToSameUri (attempt #"+n+", max="+t+")"),1===n){if(u)return void r.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.");u=!0,e.onreconnecting&&e.onreconnecting()}l?h(t,n,s):e.newWsUriOnReconnection?e.newWsUriOnReconnection(function(e,o){e?(r.debug(e),setTimeout(function(){p(t,n+1)},i)):h(t,n,o)}):h(t,n,s)}function h(o,l,h){var f;r.debug("Reconnection attempt #"+l),n.close(),s=h||s,(f=a?new SockJS(s):new WebSocket(s)).onopen=function(){r.debug("Reconnected after "+l+" attempts..."),c(0,s),u=!1,t(),e.onreconnected()&&e.onreconnected(),f.onclose=d},f.onerror=function(t){r.warn("Reconnection error: ",t),l===o?e.ondisconnect&&e.ondisconnect():setTimeout(function(){p(o,l+1)},i)},n=f}n.onclose=d,this.close=function(){o=!0,n.close()},this.forceClose=function(e){if(r.debug("Testing: Force WebSocket close"),e){r.debug("Testing: Change wsUri for "+e+" millis to simulate net failure");var t=s;s="wss://21.234.12.34.4:443/",l=!0,setTimeout(function(){r.debug("Testing: Recover good wsUri "+t),s=t,l=!1},e)}n.close()},this.reconnectWs=function(){r.debug("reconnectWs"),p(2e3,1)},this.send=function(e){n.send(e)},this.addEventListener=function(e,r){(t=function(){n.addEventListener(e,r)})()}}},crnd:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error('Cannot find module "'+e+'".');throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="crnd"},de4E:function(e,t){t.pack=function(e,t){var n={jsonrpc:"2.0"};if(e.method)n.method=e.method,e.params&&(n.params=e.params),void 0!=t&&(n.id=t);else if(void 0!=t){if(e.error){if(void 0!==e.result)throw new TypeError("Both result and error are defined");n.error=e.error}else{if(void 0===e.result)throw new TypeError("No result or error is defined");n.result=e.result}n.id=t}return JSON.stringify(n)},t.unpack=function(e){var t=e;("string"==typeof e||e instanceof String)&&(t=JSON.parse(e));var n=t.jsonrpc;if("2.0"!==n)throw new TypeError("Invalid JsonRPC version '"+n+"': "+e);if(void 0==t.method){if(void 0==t.id)throw new TypeError("Invalid message: "+e);var r=void 0!==t.result,i=void 0!==t.error;if(r&&i)throw new TypeError("Both result and error are defined: "+e);if(!r&&!i)throw new TypeError("No result or error is defined: "+e);t.ack=t.id,delete t.id}return t}},e8ps:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ");t.PublisherSpeakingEvent=function(e){function t(t,n,r,i){var o=e.call(this,!1,t,n)||this;return o.type=n,o.connection=r,o.streamId=i,o}return r(t,e),t.prototype.callDefaultBehaviour=function(){},t}(i.Event)},ee8k:function(e,t,n){var r=n("cUzU");t.WebSocketWithReconnection=r},gUCu:function(e,t){function n(){var e={};this.forEach=function(t){for(var n in e){var r=e[n];for(var i in r)t(r[i])}},this.get=function(t,n){var r=e[n];if(void 0!=r)return r[t]},this.remove=function(t,n){var r=e[n];if(void 0!=r){for(var i in delete r[t],r)return!1;delete e[n]}},this.set=function(t,n,r){if(void 0==t)return this.remove(n,r);var i=e[r];void 0==i&&(e[r]=i={}),i[n]=t}}n.prototype.pop=function(e,t){var n=this.get(e,t);if(void 0!=n)return this.remove(e,t),n},e.exports=n},hzOQ:function(e,t,n){"use strict";t.__esModule=!0,t.Event=function(){function e(e,t,n){this.hasBeenPrevented=!1,this.cancelable=e,this.target=t,this.type=n}return e.prototype.isDefaultPrevented=function(){return this.hasBeenPrevented},e.prototype.preventDefault=function(){this.callDefaultBehaviour=function(){},this.hasBeenPrevented=!0},e}()},k76L:function(e,t,n){var r=n("leix"),i=n("8Lyy");t.write=i,t.parse=r.parse,t.parseFmtpConfig=r.parseFmtpConfig,t.parsePayloads=r.parsePayloads,t.parseRemoteCandidates=r.parseRemoteCandidates},ksJj:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ");t.SessionDisconnectedEvent=function(e){function t(t,n){var r=e.call(this,!0,t,"sessionDisconnected")||this;return r.reason=n,r}return r(t,e),t.prototype.callDefaultBehaviour=function(){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'");var e=this.target;for(var t in e.remoteConnections)e.remoteConnections[t].stream&&(e.remoteConnections[t].stream.disposeWebRtcPeer(),e.remoteConnections[t].stream.disposeMediaStream(),e.remoteConnections[t].stream.streamManager&&e.remoteConnections[t].stream.streamManager.removeAllVideos(),delete e.remoteStreamsCreated[e.remoteConnections[t].stream.streamId],e.remoteConnections[t].dispose()),delete e.remoteConnections[t]},t}(i.Event)},leix:function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})}function d(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function m(){for(var e=[],t=0;t1||a(e,t)})})}function a(e,t){try{(n=i[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function u(e){a("next",e)}function l(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function v(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}},oIG1:function(e,t,n){"use strict";var r=n("mrSG").__extends;t.__esModule=!0;var i=n("hzOQ");t.VideoElementEvent=function(e){function t(t,n,r){var i=e.call(this,!1,n,r)||this;return i.element=t,i}return r(t,e),t.prototype.callDefaultBehaviour=function(){},t}(i.Event)},ohuM:function(e,t){var n=["stun:","turn:"];e.exports=function(e){var t,r,i=(e||{}).url||e,o={};return"string"==typeof i||i instanceof String?(i=i.trim(),(t=n[n.indexOf(i.slice(0,5))])?(r=(i=i.slice(5)).split("@"),o.username=e.username,o.credential=e.credential,r.length>1&&(i=r[1],r=r[0].split(":"),o.username=r[0],o.credential=(e||{}).credential||r[1]||""),o.url=t+i,o.urls=[o.url],o):e):e}},p7Ng:function(e,t){function n(){}e.exports=n,n.mixin=function(e){var t=e.prototype||e;t.isWildEmitter=!0,t.on=function(e,t,n){this.callbacks=this.callbacks||{};var r=3===arguments.length,i=r?arguments[2]:arguments[1];return i._groupName=r?arguments[1]:void 0,(this.callbacks[e]=this.callbacks[e]||[]).push(i),this},t.once=function(e,t,n){var r=this,i=3===arguments.length,o=i?arguments[2]:arguments[1];return this.on(e,i?arguments[1]:void 0,function t(){r.off(e,t),o.apply(this,arguments)}),this},t.releaseGroup=function(e){var t,n,r,i;for(t in this.callbacks=this.callbacks||{},this.callbacks)for(n=0,r=(i=this.callbacks[t]).length;na)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=f,u=m,i=p;var y=(1e4*(268435455&(f+=122192928e5))+m)%4294967296;c[l++]=y>>>24&255,c[l++]=y>>>16&255,c[l++]=y>>>8&255,c[l++]=255&y;var v=f/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=p>>>8|128,c[l++]=255&p;for(var b=0;b<6;++b)c[l+b]=d[b];return t||s(c)}},xk4V:function(e,t,n){var r=n("4fRq"),i=n("I2ZF");e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},yLV6:function(e,t,n){var r;!function(i,o,s,a){"use strict";var u,l=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),d="function",p=Math.round,h=Math.abs,f=Date.now;function m(e,t,n){return setTimeout(E(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(y(e,n[t],n),!0)}function y(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),e.apply(this,arguments)}}u="function"!=typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function k(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;rn[t]}):r.sort()),r}function M(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=te(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,l=t.center=ne(r);t.timeStamp=f(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=se(u,l),t.distance=oe(u,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==z&&o.eventType!==B||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=ie(t.deltaX,t.deltaY);var c,d,p=re(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=h(p.x)>h(p.y)?p.x:p.y,t.scale=s?(c=s.pointers,oe((d=r)[0],d[1],J)/oe(c[0],c[1],J)):1,t.rotation=s?function(e,t){return se(r[1],r[0],J)+se(e[1],e[0],J)}(s.pointers):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(t.eventType!=U&&(u>F||s.velocity===a)){var l=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,d=re(u,l,c);r=d.x,i=d.y,n=h(d.x)>h(d.y)?d.x:d.y,o=ie(l,c),e.lastInterval=t}else n=s.velocity,r=s.velocityX,i=s.velocityY,o=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var m=e.element;T(t.srcEvent.target,m)&&(m=t.srcEvent.target),t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function te(e){for(var t=[],n=0;n=h(t)?e<0?G:W:t<0?q:Q}function oe(e,t,n){n||(n=X);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function se(e,t,n){return n||(n=X),180*Math.atan2(t[n[1]]-e[n[1]],t[n[0]]-e[n[0]])/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(D(this.element),this.evWin,this.domHandler)}};var ae={mousedown:z,mousemove:2,mouseup:B},ue="mousedown",le="mousemove mouseup";function ce(){this.evEl=ue,this.evWin=le,this.pressed=!1,$.apply(this,arguments)}w(ce,$,{handler:function(e){var t=ae[e.type];t&z&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=B),this.pressed&&(t&B&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var de={pointerdown:z,pointermove:2,pointerup:B,pointercancel:U,pointerout:U},pe={2:"touch",3:"pen",4:"mouse",5:"kinect"},he="pointerdown",fe="pointermove pointerup pointercancel";function me(){this.evEl=he,this.evWin=fe,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(he="MSPointerDown",fe="MSPointerMove MSPointerUp MSPointerCancel"),w(me,$,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=de[r],o=pe[e.pointerType]||e.pointerType,s="touch"==o,a=A(t,e.pointerId,"pointerId");i&z&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):i&(B|U)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var ge={touchstart:z,touchmove:2,touchend:B,touchcancel:U},ye="touchstart",ve="touchstart touchmove touchend touchcancel";function be(){this.evTarget=ye,this.evWin=ve,this.started=!1,$.apply(this,arguments)}w(be,$,{handler:function(e){var t=ge[e.type];if(t===z&&(this.started=!0),this.started){var n=(function(e,t){var n=P(e.touches),r=P(e.changedTouches);return t&(B|U)&&(n=R(n.concat(r),"identifier",!0)),[n,r]}).call(this,e,t);t&(B|U)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var _e={touchstart:z,touchmove:2,touchend:B,touchcancel:U},we="touchstart touchmove touchend touchcancel";function Ee(){this.evTarget=we,this.targetIds={},$.apply(this,arguments)}w(Ee,$,{handler:function(e){var t=_e[e.type],n=(function(e,t){var n=P(e.touches),r=this.targetIds;if(t&(2|z)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,s=P(e.changedTouches),a=[],u=this.target;if(o=n.filter(function(e){return T(e.target,u)}),t===z)for(i=0;i-1&&r.splice(e,1)},Se)}}w(Ce,$,{handler:function(e,t,n){var r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if("touch"==n.pointerType)(function(e,t){e&z?(this.primaryTouch=t.changedPointers[0].identifier,xe.call(this,t)):e&(B|U)&&xe.call(this,t)}).call(this,t,n);else if(r&&(function(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n=Me&&r(t.options.event+Le(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&i&t.direction},attrTest:function(e){return ze.prototype.attrTest.call(this,e)&&(this.state&Pe||!(this.state&Pe)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ve(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),w(Ue,ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&Pe)},emit:function(e){1!==e.scale&&(e.additionalEvent=this.options.event+(e.scale<1?"in":"out")),this._super.emit.call(this,e)}}),w(He,je,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancet.time;if(this._input=e,!r||!n||e.eventType&(B|U)&&!i)this.reset();else if(e.eventType&z)this.reset(),this._timer=m(function(){this.state=Ne,this.tryEmit()},t.time,this);else if(e.eventType&B)return Ne;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===Ne&&(e&&e.eventType&B?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(Ge,ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&Pe)}}),w(We,ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Z|Y,pointers:1},getTouchAction:function(){return Be.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Z|Y)?t=e.overallVelocity:n&Z?t=e.overallVelocityX:n&Y&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&h(t)>this.options.velocity&&e.eventType&B},emit:function(e){var t=Ve(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),w(qe,je,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(V);function Q(e){return e}function Z(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),G(Q,e)}function Y(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof i&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof x?e[0]:Z(n)(U(e,r))}var K=function(e){function t(){var n=e.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,t.prototype),n}return r.__extends(t,e),t}(Error),X=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.__extends(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(g),J=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.__extends(t,e),t}(b),ee=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.__extends(t,e),t.prototype[v]=function(){return new J(this)},t.prototype.lift=function(e){var t=new te(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new K;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(b),oe=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.__extends(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new g).add(this.source.subscribe(new ae(this.getSubject(),this))),e.closed?(this._connection=null,e=g.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return ne()(this)},t}(x).prototype,se={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:oe._subscribe},_isComplete:{value:oe._isComplete,writable:!0},getSubject:{value:oe.getSubject},connect:{value:oe.connect},refCount:{value:oe.refCount}},ae=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.__extends(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(J);function ue(){return new ee}function le(){return function(e){return ne()((t=ue,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,se);return r.source=e,r.subjectFactory=n,r})(e));var t}}function ce(e){return{providedIn:e.providedIn||null,factory:e.factory,value:void 0}}var de=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==t?ce({providedIn:t.providedIn||"root",factory:t.factory}):void 0}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),pe="__parameters__";function he(e,t,n){var i=function(e){return function(){for(var t=[],n=0;n ");else if("object"==typeof t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):Ce(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+e.replace(He,"\n ")}function Ze(e,t){return new Error(Qe(e,t))}var Ye=void 0;function Ke(e){var t=Ye;return Ye=e,t}function Xe(e,t){if(void 0===t&&(t=0),void 0===Ye)throw new Error("inject() must be called from an injection context");if(null===Ye){var n=e.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;throw new Error("Injector: NOT_FOUND ["+Ce(e)+"]")}return Ye.get(e,8&t?null:void 0,t)}String;var Je=function(e){return e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e}({}),$e=new function(e){this.full="6.0.3",this.major="6.0.3".split(".")[0],this.minor="6.0.3".split(".")[1],this.patch="6.0.3".split(".").slice(2).join(".")}("6.0.3"),et="ngDebugContext",tt="ngOriginalError",nt="ngErrorLogger";function rt(e){return e[et]}function it(e){return e[tt]}function ot(e){for(var t=[],n=1;n0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},e}(),Qt=function(){function e(){this._applications=new Map,Zt.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),Zt.findTestabilityInTree(this,e,t)},e.ctorParameters=function(){return[]},e}(),Zt=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}()),Yt=!0,Kt=!1,Xt=new de("AllowMultipleToken");function Jt(){return Kt=!0,Yt}var $t=function(e,t){this.name=e,this.token=t};function en(e,t,n){void 0===n&&(n=[]);var r="Platform: "+t,i=new de(r);return function(t){void 0===t&&(t=[]);var o=tn();if(!o||o.injector.get(Xt,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var s=n.concat(t).concat({provide:i,useValue:!0});!function(e){if(Gt&&!Gt.destroyed&&!Gt.injector.get(Xt,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Gt=e.get(nn);var t=e.get(mt,null);t&&t.forEach(function(e){return e()})}(De.create({providers:s,name:r}))}return function(e){var t=tn();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function tn(){return Gt&&!Gt.destroyed?Gt:null}var nn=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n,r=this,i="noop"===(n=t?t.ngZone:void 0)?new Wt:("zone.js"===n?void 0:n)||new Vt({enableLongStackTrace:Jt()}),o=[{provide:Vt,useValue:i}];return i.run(function(){var t=De.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),s=n.injector.get(st,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return sn(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(e){s.handleError(e)}})}),function(e,t,i){try{var o=((s=n.injector.get(dt)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return ut(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}var s}(s,i)})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.injector.get(wt),i=rn({},t);return r.createCompiler([i]).compileModuleAsync(e).then(function(e){return n.bootstrapModuleFactory(e,i)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(on);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+Ce(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function rn(e,t){return Array.isArray(t)?t.reduce(rn,e):Object(r.__assign)({},e,t)}var on=function(){function e(e,t,n,r,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Jt(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new x(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),u=new x(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){Vt.assertNotInAngularZone(),Ee(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Vt.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=Y(a,u.pipe(le()))}return e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof Et?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n instanceof At?null:this._injector.get(Pt),o=n.create(De.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(qt,null);return s&&o.injector.get(Qt).registerApplication(o.location.nativeElement,s),this._loadComponent(o),Jt()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},e.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,jt(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;sn(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(yt,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),sn(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Dt("ApplicationRef#tick()"),e}();function sn(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var an=function(){},un=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({}),ln=function(){},cn=function(e){this.nativeElement=e},dn=function(){},pn=function(){function e(){this.dirty=!0,this._results=[],this.changes=new Lt,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[we()]=function(){return this._results[we()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),hn=function(){},fn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},mn=function(){function e(e,t){this._compiler=e,this._config=t||fn}return e.prototype.load=function(e){return this._compiler instanceof _t?this.loadFactory(e):this.loadAndCompile(e)},e.prototype.loadAndCompile=function(e){var t=this,i=Object(r.__read)(e.split("#"),2),o=i[0],s=i[1];return void 0===s&&(s="default"),n("crnd")(o).then(function(e){return e[s]}).then(function(e){return gn(e,o,s)}).then(function(e){return t._compiler.compileModuleAsync(e)})},e.prototype.loadFactory=function(e){var t=Object(r.__read)(e.split("#"),2),i=t[0],o=t[1],s="NgFactory";return void 0===o&&(o="default",s=""),n("crnd")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(e){return e[o+s]}).then(function(e){return gn(e,i,o)})},e}();function gn(e,t,n){if(!e)throw new Error("Cannot find '"+n+"' in '"+t+"'");return e}var yn=function(){},vn=function(){},bn=function(){},_n=function(){function e(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof wn?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),wn=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=t,i}return Object(r.__extends)(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,i=this,o=this.childNodes.indexOf(e);-1!==o&&((n=this.childNodes).splice.apply(n,Object(r.__spread)([o+1,0],t)),t.forEach(function(e){e.parent&&e.parent.removeChild(e),e.parent=i}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return function e(t,n,r){t.childNodes.forEach(function(t){t instanceof wn&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return function e(t,n,r){t instanceof wn&&t.childNodes.forEach(function(t){n(t)&&r.push(t),t instanceof wn&&e(t,n,r)})}(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(_n),En=new Map;function Sn(e){return En.get(e)||null}function Cn(e){En.set(e.nativeNode,e)}function xn(e,t){var n=In(e),r=In(t);return n&&r?function(e,t,n){for(var r=e[we()](),i=t[we()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(e,t,xn):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||Se(e,t)}var On=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e.unwrap=function(t){return e.isWrapped(t)?t.wrapped:t},e.isWrapped=function(t){return t instanceof e},e}(),Tn=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}();function In(e){return!!kn(e)&&(Array.isArray(e)||!(e instanceof Map)&&we()in e)}function kn(e){return null!==e&&("function"==typeof e||"object"==typeof e)}var An=function(){function e(){}return e.prototype.supports=function(e){return In(e)},e.prototype.create=function(e){return new Rn(e)},e}(),Pn=function(e,t){return t},Rn=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Pn}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return e.prototype.getInertBodyElement_XHR=function(e){e=""+e+"";try{e=encodeURI(e)}catch(e){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(null);var n=t.response.body;return n.removeChild(n.firstChild),n},e.prototype.getInertBodyElement_DOMParser=function(e){e=""+e+"";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(e){return null}},e.prototype.getInertBodyElement_InertDocument=function(e){var t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},e.prototype.stripCustomNsAttrs=function(e){for(var t=e.attributes,n=t.length-1;0")}else this.sanitizedSomething=!0},e.prototype.endElement=function(e){var t=e.nodeName.toLowerCase();ur.hasOwnProperty(t)&&!ir.hasOwnProperty(t)&&(this.buf.push(""))},e.prototype.chars=function(e){this.buf.push(mr(e))},e.prototype.checkClobberedElement=function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t},e}(),hr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fr=/([^\#-~ |!])/g;function mr(e){return e.replace(/&/g,"&").replace(hr,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(fr,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function gr(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var yr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),vr=/^url\(([^)]+)\)$/,br=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({}),_r=function(){};function wr(e,t,n){var r=e.state,i=1792&r;return i===t?(e.state=-1793&r|n,e.initIndex=-1,!0):i===n}function Er(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function Sr(e,t){return e.nodes[t]}function Cr(e,t){return e.nodes[t]}function xr(e,t){return e.nodes[t]}function Or(e,t){return e.nodes[t]}function Tr(e,t){return e.nodes[t]}var Ir={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function kr(e,t,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(e,t){var n=new Error(e);return Ar(n,t),n}(i,e)}function Ar(e,t){e[et]=t,e[nt]=t.logError.bind(t)}function Pr(e){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+e)}var Rr=function(){},Mr=new Map;function Nr(e){var t=Mr.get(e);return t||(t=Ce(e)+"_"+Mr.size,Mr.set(e,t)),t}var Dr="$$undefined",jr="$$empty";function Lr(e){return{id:Dr,styles:e.styles,encapsulation:e.encapsulation,data:e.data}}var Vr=0;function Fr(e,t,n,r){return!(!(2&e.state)&&Se(e.oldValues[t.bindingIndex+n],r))}function zr(e,t,n,r){return!!Fr(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function Br(e,t,n,r){var i=e.oldValues[t.bindingIndex+n];if(1&e.state||!xn(i,r)){var o=t.bindings[n].name;throw kr(Ir.createDebugContext(e,t.nodeIndex),o+": "+i,o+": "+r,0!=(1&e.state))}}function Ur(e){for(var t=e;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function Hr(e,t){for(var n=e;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function Gr(e,t,n,r){try{return Ur(33554432&e.def.nodes[t].flags?Cr(e,t).componentView:e),Ir.handleEvent(e,t,n,r)}catch(t){e.root.errorHandler.handleError(t)}}function Wr(e){return e.parent?Cr(e.parent,e.parentNodeDef.nodeIndex):null}function qr(e){return e.parent?e.parentNodeDef.parent:null}function Qr(e,t){switch(201347067&t.flags){case 1:return Cr(e,t.nodeIndex).renderElement;case 2:return Sr(e,t.nodeIndex).renderText}}function Zr(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function Yr(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function Kr(e){return 1<-1}(r)||"root"===i.providedIn&&r._def.isRoot))){var l=e._providers.length;return e._def.providersByKey[t.tokenKey]={flags:5120,value:t.token.ngInjectableDef.factory,deps:[],index:l,token:t.token},e._providers[l]=gi,e._providers[l]=Ei(e,e._def.providersByKey[t.tokenKey])}return e._parent.get(t.token,n)}finally{Ke(o)}}function Ei(e,t){var n;switch(201347067&t.flags){case 512:n=function(e,t,n){var i=n.length;switch(i){case 0:return new t;case 1:return new t(wi(e,n[0]));case 2:return new t(wi(e,n[0]),wi(e,n[1]));case 3:return new t(wi(e,n[0]),wi(e,n[1]),wi(e,n[2]));default:for(var o=new Array(i),s=0;s=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,Ti(n,t),Ir.dirtyParentQueries(r),xi(r),r}function Ci(e,t,n){var r=t?Qr(t,t.def.lastRenderRootNode):e.renderElement;ni(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function xi(e){ni(e,3,null,null,void 0)}function Oi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Ti(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var Ii=new Object;function ki(e,t,n,r,i,o){return new Ai(e,t,n,r,i,o)}var Ai=function(e){function t(t,n,r,i,o,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var i=ti(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=Ir.createRootView(e,t||[],n,i,r,Ii),a=xr(s,o).instance;return n&&s.renderer.setAttribute(Cr(s,0).renderElement,"ng-version",$e.full),new Pi(s,new Di(s),a)},t}(Et),Pi=function(e){function t(t,n,r){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new cn(Cr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Fi(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(function(){});function Ri(e,t,n){return new Mi(e,t,n)}var Mi=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new cn(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Fi(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=qr(e),e=e.parent;return e?new Fi(e,t):new Fi(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=Si(this._data,e);Ir.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Di(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,i){var o=n||this.parentInjector;i||e instanceof At||(i=o.get(Pt));var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=e;return i=s._view,o=(n=this._data).viewContainer._embeddedViews,null!==(r=t)&&void 0!==r||(r=o.length),i.viewContainerParent=this._view,Oi(o,r,i),function(e,t){var n=Wr(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,t.parentNodeDef)}}(n,i),Ir.dirtyParentQueries(i),Ci(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(e._view);return i=t,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],Ti(o,r),null==i&&(i=o.length),Oi(o,i,s),Ir.dirtyParentQueries(s),xi(s),Ci(n,i>0?o[i-1]:null,s),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=Si(this._data,e);t&&Ir.destroyView(t)},e.prototype.detach=function(e){var t=Si(this._data,e);return t?new Di(t):null},e}();function Ni(e){return new Di(e)}var Di=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return ni(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){Ur(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{Ir.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){Ir.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Ir.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,xi(this._view),Ir.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function ji(e,t){return new Li(e,t)}var Li=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return Object(r.__extends)(t,e),t.prototype.createEmbeddedView=function(e){return new Di(Ir.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new cn(Cr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(yn);function Vi(e,t){return new Fi(e,t)}var Fi=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=De.THROW_IF_NOT_FOUND),Ir.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Nr(e)},t)},e}();function zi(e,t){var n=e.def.nodes[t];if(1&n.flags){var r=Cr(e,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return Sr(e,n.nodeIndex).renderText;if(20240&n.flags)return xr(e,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+t)}function Bi(e){return new Ui(e.renderer)}var Ui=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=Object(r.__read)(ui(t),2),i=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,i),i},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var r=0;r0,i=t.provider;switch(201347067&t.flags){case 512:return ao(e,t.parent,n,i.value,i.deps);case 1024:return function(e,t,n,i,o){var s=o.length;switch(s){case 0:return i();case 1:return i(lo(e,t,n,o[0]));case 2:return i(lo(e,t,n,o[0]),lo(e,t,n,o[1]));case 3:return i(lo(e,t,n,o[0]),lo(e,t,n,o[1]),lo(e,t,n,o[2]));default:for(var a=Array(s),u=0;u0)l=m,To(m)||(c=m);else for(;l&&f===l.nodeIndex+l.childCount;){var v=l.parent;v&&(v.childFlags|=l.childFlags,v.childMatchedQueries|=l.childMatchedQueries),c=(l=v)&&To(l)?l.renderParent:l}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:e,nodes:t,updateDirectives:n||Rr,updateRenderer:r||Rr,handleEvent:function(e,n,r,i){return t[n].element.handleEvent(e,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:h}}function To(e){return 0!=(1&e.flags)&&null===e.element.name}function Io(e,t,n){var r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var i=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=i&&t.nodeIndex+t.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function ko(e,t,n,r){var i=Ro(e.root,e.renderer,e,t,n);return Mo(i,e.component,r),No(i),i}function Ao(e,t,n){var r=Ro(e,e.renderer,null,null,t);return Mo(r,n,n),No(r),r}function Po(e,t,n,r){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(r,o):e.root.renderer,Ro(e.root,i,e,t.element.componentProvider,n)}function Ro(e,t,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function Mo(e,t,n){e.component=t,e.context=n}function No(e){var t;Zr(e)&&(t=Cr(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,r=e.nodes,i=0;i0&&mi(e,t,0,n)&&(h=!0),p>1&&mi(e,t,1,r)&&(h=!0),p>2&&mi(e,t,2,i)&&(h=!0),p>3&&mi(e,t,3,o)&&(h=!0),p>4&&mi(e,t,4,s)&&(h=!0),p>5&&mi(e,t,5,a)&&(h=!0),p>6&&mi(e,t,6,u)&&(h=!0),p>7&&mi(e,t,7,l)&&(h=!0),p>8&&mi(e,t,8,c)&&(h=!0),p>9&&mi(e,t,9,d)&&(h=!0),h}(e,t,n,r,i,o,s,a,u,l,c,d);case 2:return function(e,t,n,r,i,o,s,a,u,l,c,d){var p=!1,h=t.bindings,f=h.length;if(f>0&&zr(e,t,0,n)&&(p=!0),f>1&&zr(e,t,1,r)&&(p=!0),f>2&&zr(e,t,2,i)&&(p=!0),f>3&&zr(e,t,3,o)&&(p=!0),f>4&&zr(e,t,4,s)&&(p=!0),f>5&&zr(e,t,5,a)&&(p=!0),f>6&&zr(e,t,6,u)&&(p=!0),f>7&&zr(e,t,7,l)&&(p=!0),f>8&&zr(e,t,8,c)&&(p=!0),f>9&&zr(e,t,9,d)&&(p=!0),p){var m=t.text.prefix;f>0&&(m+=xo(n,h[0])),f>1&&(m+=xo(r,h[1])),f>2&&(m+=xo(i,h[2])),f>3&&(m+=xo(o,h[3])),f>4&&(m+=xo(s,h[4])),f>5&&(m+=xo(a,h[5])),f>6&&(m+=xo(u,h[6])),f>7&&(m+=xo(l,h[7])),f>8&&(m+=xo(c,h[8])),f>9&&(m+=xo(d,h[9]));var g=Sr(e,t.nodeIndex).renderText;e.renderer.setValue(g,m)}return p}(e,t,n,r,i,o,s,a,u,l,c,d);case 16384:return function(e,t,n,r,i,o,s,a,u,l,c,d){var p=xr(e,t.nodeIndex),h=p.instance,f=!1,m=void 0,g=t.bindings.length;return g>0&&Fr(e,t,0,n)&&(f=!0,m=po(e,p,t,0,n,m)),g>1&&Fr(e,t,1,r)&&(f=!0,m=po(e,p,t,1,r,m)),g>2&&Fr(e,t,2,i)&&(f=!0,m=po(e,p,t,2,i,m)),g>3&&Fr(e,t,3,o)&&(f=!0,m=po(e,p,t,3,o,m)),g>4&&Fr(e,t,4,s)&&(f=!0,m=po(e,p,t,4,s,m)),g>5&&Fr(e,t,5,a)&&(f=!0,m=po(e,p,t,5,a,m)),g>6&&Fr(e,t,6,u)&&(f=!0,m=po(e,p,t,6,u,m)),g>7&&Fr(e,t,7,l)&&(f=!0,m=po(e,p,t,7,l,m)),g>8&&Fr(e,t,8,c)&&(f=!0,m=po(e,p,t,8,c,m)),g>9&&Fr(e,t,9,d)&&(f=!0,m=po(e,p,t,9,d,m)),m&&h.ngOnChanges(m),65536&t.flags&&Er(e,256,t.nodeIndex)&&h.ngOnInit(),262144&t.flags&&h.ngDoCheck(),f}(e,t,n,r,i,o,s,a,u,l,c,d);case 32:case 64:case 128:return function(e,t,n,r,i,o,s,a,u,l,c,d){var p=t.bindings,h=!1,f=p.length;if(f>0&&zr(e,t,0,n)&&(h=!0),f>1&&zr(e,t,1,r)&&(h=!0),f>2&&zr(e,t,2,i)&&(h=!0),f>3&&zr(e,t,3,o)&&(h=!0),f>4&&zr(e,t,4,s)&&(h=!0),f>5&&zr(e,t,5,a)&&(h=!0),f>6&&zr(e,t,6,u)&&(h=!0),f>7&&zr(e,t,7,l)&&(h=!0),f>8&&zr(e,t,8,c)&&(h=!0),f>9&&zr(e,t,9,d)&&(h=!0),h){var m=Or(e,t.nodeIndex),g=void 0;switch(201347067&t.flags){case 32:g=new Array(p.length),f>0&&(g[0]=n),f>1&&(g[1]=r),f>2&&(g[2]=i),f>3&&(g[3]=o),f>4&&(g[4]=s),f>5&&(g[5]=a),f>6&&(g[6]=u),f>7&&(g[7]=l),f>8&&(g[8]=c),f>9&&(g[9]=d);break;case 64:g={},f>0&&(g[p[0].name]=n),f>1&&(g[p[1].name]=r),f>2&&(g[p[2].name]=i),f>3&&(g[p[3].name]=o),f>4&&(g[p[4].name]=s),f>5&&(g[p[5].name]=a),f>6&&(g[p[6].name]=u),f>7&&(g[p[7].name]=l),f>8&&(g[p[8].name]=c),f>9&&(g[p[9].name]=d);break;case 128:var y=n;switch(f){case 1:g=y.transform(n);break;case 2:g=y.transform(r);break;case 3:g=y.transform(r,i);break;case 4:g=y.transform(r,i,o);break;case 5:g=y.transform(r,i,o,s);break;case 6:g=y.transform(r,i,o,s,a);break;case 7:g=y.transform(r,i,o,s,a,u);break;case 8:g=y.transform(r,i,o,s,a,u,l);break;case 9:g=y.transform(r,i,o,s,a,u,l,c);break;case 10:g=y.transform(r,i,o,s,a,u,l,c,d)}}m.value=g}return h}(e,t,n,r,i,o,s,a,u,l,c,d);default:throw"unreachable"}}(e,t,i,o,s,a,u,l,c,d,p,h):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var r=!1,i=0;i0&&Br(e,t,0,n),p>1&&Br(e,t,1,r),p>2&&Br(e,t,2,i),p>3&&Br(e,t,3,o),p>4&&Br(e,t,4,s),p>5&&Br(e,t,5,a),p>6&&Br(e,t,6,u),p>7&&Br(e,t,7,l),p>8&&Br(e,t,8,c),p>9&&Br(e,t,9,d)}(e,t,r,i,o,s,a,u,l,c,d,p):function(e,t,n){for(var r=0;r0){var o=new Set(e.modules);ns.forEach(function(t,r){if(o.has(r.ngInjectableDef.providedIn)){var i={token:r,flags:t.flags|(n?4096:0),deps:Jr(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[Nr(r)]=i}})}}(e=e.factory(function(){return Rr})),e):e}(r))}var ts=new Map,ns=new Map,rs=new Map;function is(e){ts.set(e.token,e),"function"==typeof e.token&&e.token.ngInjectableDef&&"function"==typeof e.token.ngInjectableDef.providedIn&&ns.set(e.token,e)}function os(e,t){var n=ti(ti(t.viewDefFactory).nodes[0].element.componentView);rs.set(e,n)}function ss(){ts.clear(),ns.clear(),rs.clear()}function as(e){if(0===ts.size)return e;var t=function(e){for(var t=[],n=null,r=0;r=Hs.length?Hs[a]=null:f.tNode=Hs[a],Us?(Gs=null,Bs.view!==Js&&2!==Bs.type||(ngDevMode&&Ds(Bs.child,"previousOrParentNode's child should not have been set."),Bs.child=f)):Bs&&(ngDevMode&&Ds(Bs.next,"previousOrParentNode's next property should not have been set "+a+"."),Bs.next=f,Bs.dynamicLContainerNode&&(Bs.dynamicLContainerNode.next=f))),Bs=f,Us=!0,e=f,y=1),s=ea(e.data,e),t(y,n),na(),sa()}finally{ta(s),Us=m,Bs=g}return e}function sa(){for(var e=Js.child;null!==e;e=e.next)if(0!==e.dynamicViewCount&&e.views)for(var t=e,n=0;n"}(r))),ngDevMode&&js(i.data,"Component's host node should have an LView attached.");var o,s=i.data;8==(8&s.flags)&&6&s.flags&&(ngDevMode&&ca(e,Qs),la(s,i,Js.tView.directives[e],(o=Qs[e],Array.isArray(o)?o[0]:o)))}function ua(e){var t=da(e);ngDevMode&&js(t.data,"Component host node should be attached to an LView"),la(t.data,t,t.view.tView.directives[t.tNode.flags>>13],e)}function la(e,t,n,r){var i=ea(e,t),o=n.template;try{o(1&e.flags?3:2,r),na(),sa()}finally{ta(i)}}function ca(e,t){null==t&&(t=qs),e>=(t?t.length:0)&&Ls("index expected to be a valid data index")}function da(e){ngDevMode&&js(e,"expecting component got null");var t=e[Ys];return ngDevMode&&js(e,"object is not a component"),t}Zs=function(){function e(e,t){this._view=e,this.context=t}return e.prototype._setComponentContext=function(e,t){this._view=e,this.context=t},e.prototype.destroy=function(){},e.prototype.onDestroy=function(e){},e.prototype.markForCheck=function(){!function(e){for(var t=e;null!=t.parent;)t.flags|=4,t=t.parent;var n,r;t.flags|=4,ngDevMode&&js(t.context,"rootContext"),(n=t.context).clean==Ks&&(n.clean=new Promise(function(e){return r=e}),n.scheduler(function(){var e,t;t=da((e=function(e){ngDevMode&&js(e,"component");for(var t=da(e).view;t.parent;)t=t.parent;return t}(n.component)).context.component),ngDevMode&&js(t.data,"Component host node should be attached to an LView"),function(n,r,i,o){var s=ea(e,t);try{zs.begin&&zs.begin(),ia(),ra(Xs),aa(0,0)}finally{zs.end&&zs.end(),ta(s)}}(),r(null),n.clean=Ks}))}(this._view)},e.prototype.detach=function(){this._view.flags&=-9},e.prototype.reattach=function(){this._view.flags|=8},e.prototype.detectChanges=function(){ua(this.context)},e.prototype.checkNoChanges=function(){!function(e){$s=!0;try{ua(e)}finally{$s=!1}}(this.context)},e}(),Object(r.__extends)(function(e,t,n){var r=Zs.call(this,e.data,n)||this;return r._lViewNode=e,r},Zs),n("yLV6");var pa=function(){},ha=function(){},fa=function(){},ma="*";function ga(e,t){return void 0===t&&(t=null),{type:2,steps:e,options:t}}function ya(e){return{type:6,styles:e,offset:null}}function va(e){Promise.resolve(null).then(e)}var ba=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+t}return e.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.hasStarted=function(){return this._started},e.prototype.init=function(){},e.prototype.play=function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0},e.prototype.triggerMicrotask=function(){var e=this;va(function(){return e._onFinish()})},e.prototype._onStart=function(){this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]},e.prototype.pause=function(){},e.prototype.restart=function(){},e.prototype.finish=function(){this._onFinish()},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype.reset=function(){},e.prototype.setPosition=function(e){},e.prototype.getPosition=function(){return 0},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e}(),_a=function(){function e(e){var t=this;this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var n=0,r=0,i=0,o=this.players.length;0==o?va(function(){return t._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++n==o&&t._onFinish()}),e.onDestroy(function(){++r==o&&t._onDestroy()}),e.onStart(function(){++i==o&&t._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return e.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},e.prototype.init=function(){this.players.forEach(function(e){return e.init()})},e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype._onStart=function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[])},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.hasStarted=function(){return this._started},e.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(e){return e.play()})},e.prototype.pause=function(){this.players.forEach(function(e){return e.pause()})},e.prototype.restart=function(){this.players.forEach(function(e){return e.restart()})},e.prototype.finish=function(){this._onFinish(),this.players.forEach(function(e){return e.finish()})},e.prototype.destroy=function(){this._onDestroy()},e.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(e){return e.destroy()}),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype.reset=function(){this.players.forEach(function(e){return e.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},e.prototype.setPosition=function(e){var t=e*this.totalTime;this.players.forEach(function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})},e.prototype.getPosition=function(){var e=0;return this.players.forEach(function(t){var n=t.getPosition();e=Math.min(n,e)}),e},e.prototype.beforeDestroy=function(){this.players.forEach(function(e){e.beforeDestroy&&e.beforeDestroy()})},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e}(),wa="!";function Ea(e){return null!=e&&""+e!="false"}function Sa(e){return Array.isArray(e)?e:[e]}function Ca(e){return null==e?"":"string"==typeof e?e:e+"px"}var xa=27,Oa=function(){},Ta=new de("Location Initialized"),Ia=function(){},ka=new de("appBaseHref"),Aa=function(){function e(t){var n=this;this._subject=new Lt,this._platformStrategy=t;var r=this._platformStrategy.getBaseHref();this._baseHref=e.stripTrailingSlash(Pa(r)),this._platformStrategy.onPopState(function(e){n._subject.emit({url:n.path(!0),pop:!0,state:e.state,type:e.type})})}return e.prototype.path=function(e){return void 0===e&&(e=!1),this.normalize(this._platformStrategy.path(e))},e.prototype.isCurrentPathEqualTo=function(t,n){return void 0===n&&(n=""),this.path()==this.normalize(t+e.normalizeQueryParams(n))},e.prototype.normalize=function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Pa(t)))},e.prototype.prepareExternalUrl=function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)},e.prototype.go=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=null),this._platformStrategy.pushState(n,"",e,t)},e.prototype.replaceState=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=null),this._platformStrategy.replaceState(n,"",e,t)},e.prototype.forward=function(){this._platformStrategy.forward()},e.prototype.back=function(){this._platformStrategy.back()},e.prototype.subscribe=function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})},e.normalizeQueryParams=function(e){return e&&"?"!==e[0]?"?"+e:e},e.joinWithSlash=function(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t},e.stripTrailingSlash=function(e){var t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)},e}();function Pa(e){return e.replace(/\/index.html$/,"")}var Ra=function(e){function t(t,n){var r=e.call(this)||this;return r._platformLocation=t,r._baseHref="",null!=n&&(r._baseHref=n),r}return Object(r.__extends)(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t},t.prototype.prepareExternalUrl=function(e){var t=Aa.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+Aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+Aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t}(Ia),Ma=function(e){function t(t,n){var r=e.call(this)||this;if(r._platformLocation=t,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return Object(r.__extends)(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.prepareExternalUrl=function(e){return Aa.joinWithSlash(this._baseHref,e)},t.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.pathname+Aa.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?""+t+n:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+Aa.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+Aa.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t}(Ia),Na=void 0,Da=["en",[["a","p"],["AM","PM"],Na],[["AM","PM"],Na,Na],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Na,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Na,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Na,"{1} 'at' {0}",Na],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],ja={},La=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),Va=new de("UseV4Plurals"),Fa=function(){},za=function(e){function t(t,n){var r=e.call(this)||this;return r.locale=t,r.deprecatedPluralFn=n,r}return Object(r.__extends)(t,e),t.prototype.getPluralCategory=function(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){return function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=ja[t];if(n)return n;var r=t.split("-")[0];if(n=ja[r])return n;if("en"===r)return Da;throw new Error('Missing locale data for the locale "'+e+'".')}(e)[18]}(t||this.locale)(e)){case La.Zero:return"zero";case La.One:return"one";case La.Two:return"two";case La.Few:return"few";case La.Many:return"many";default:return"other"}},t}(Fa),Ba=function(){function e(e,t,n,r){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(e.prototype,"klass",{set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClass",{set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(In(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}},e.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},e.prototype._applyIterableChanges=function(e){var t=this;e.forEachAddedItem(function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Ce(e.item));t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})},e.prototype._applyClasses=function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!0)}):Object.keys(e).forEach(function(n){return t._toggleClass(n,!!e[n])}))},e.prototype._removeClasses=function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!1)}):Object.keys(e).forEach(function(e){return t._toggleClass(e,!1)}))},e.prototype._toggleClass=function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach(function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)})},e}(),Ua=function(){function e(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}return Object.defineProperty(e.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),e}(),Ha=function(){function e(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._differ=null}return Object.defineProperty(e.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(e){Jt()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(e)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){e&&(this._template=e)},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){if("ngForOf"in e){var t=e.ngForOf.currentValue;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(e){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((n=t).name||typeof n)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var n},e.prototype.ngDoCheck=function(){if(this._differ){var e=this._differ.diff(this.ngForOf);e&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this,n=[];e.forEachOperation(function(e,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new Ua(null,t.ngForOf,-1,-1),i),s=new Ga(e,o);n.push(s)}else null==i?t._viewContainer.remove(r):(o=t._viewContainer.get(r),t._viewContainer.move(o,i),s=new Ga(e,o),n.push(s))});for(var r=0;r0?U(e,n):Su(n):wu(e[0]),t)}}var Tu,Iu=new Set,ku=function(){function e(e){this.platform=e,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Au}return e.prototype.matchMedia=function(e){return this.platform.WEBKIT&&function(e){if(!Iu.has(e))try{Tu||((Tu=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(Tu)),Tu.sheet&&(Tu.sheet.insertRule("@media "+e+" {.fx-query-test{ }}",0),Iu.add(e))}catch(e){console.error(e)}}(e),this._matchMedia(e)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(cu))},token:e,providedIn:"root"}),e}();function Au(e){return{matches:"all"===e||""===e,media:e,addListener:function(){},removeListener:function(){}}}var Pu=function(){function e(e,t){this.mediaMatcher=e,this.zone=t,this._queries=new Map,this._destroySubject=new ee}return e.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},e.prototype.isMatched=function(e){var t=this;return Ru(Sa(e)).some(function(e){return t._registerQuery(e).mql.matches})},e.prototype.observe=function(e){var t=this;return function(){for(var e=[],t=0;t1?Array.prototype.slice.call(arguments):e)},r,n)})}Object;var Du=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.__extends(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.__extends(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(g)),ju=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=Date.now?Date.now:function(){return+new Date},e}(),Lu=function(e){function t(n,r){void 0===r&&(r=ju.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.__extends(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(ju),Vu=new Lu(Du),Fu=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new zu(e,this.durationSelector))},e}(),zu=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=f(this.durationSelector)(e);if(t===p)this.destination.error(p.e);else{var n=L(this,t);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),t&&(this.value=null,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(e,t,n,r){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(V);function Bu(e){return!l(e)&&e-parseFloat(e)+1>=0}function Uu(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}function Hu(e,t){return void 0===t&&(t=Vu),n=function(){return function(e,t,n){void 0===e&&(e=0);var r=-1;return Bu(t)?r=Number(t)<1?1:Number(t):T(t)&&(n=t),T(n)||(n=Vu),new x(function(t){var i=Bu(e)?e:+e-n.now();return n.schedule(Uu,i,{index:0,period:r,subscriber:t})})}(e,t)},function(e){return e.lift(new Fu(n))};var n}function Gu(e,t){return function(n){return n.lift(new Wu(e,t))}}var Wu=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new qu(e,this.predicate,this.thisArg))},e}(),qu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(b),Qu=function(){function e(e,t){this._ngZone=e,this._platform=t,this._scrolled=new ee,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return e.prototype.register=function(e){var t=this,n=e.elementScrolled().subscribe(function(){return t._scrolled.next(e)});this.scrollContainers.set(e,n)},e.prototype.deregister=function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))},e.prototype.scrolled=function(e){var t=this;return void 0===e&&(e=20),this._platform.isBrowser?x.create(function(n){t._globalSubscription||t._addGlobalListener();var r=e>0?t._scrolled.pipe(Hu(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){r.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}}):Cu()},e.prototype.ngOnDestroy=function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(t,n){return e.deregister(n)}),this._scrolled.complete()},e.prototype.ancestorScrolled=function(e,t){var n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(Gu(function(e){return!e||n.indexOf(e)>-1}))},e.prototype.getAncestorScrollContainers=function(e){var t=this,n=[];return this.scrollContainers.forEach(function(r,i){t._scrollableContainsElement(i,e)&&n.push(i)}),n},e.prototype._scrollableContainsElement=function(e,t){var n=t.nativeElement,r=e.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1},e.prototype._addGlobalListener=function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return Nu(window.document,"scroll").subscribe(function(){return e._scrolled.next()})})},e.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Vt),Xe(cu))},token:e,providedIn:"root"}),e}(),Zu=function(){function e(e,t){var n=this;this._platform=e,this._change=e.isBrowser?t.runOutsideAngular(function(){return Y(Nu(window,"resize"),Nu(window,"orientationchange"))}):Cu(),this._invalidateCache=this.change().subscribe(function(){return n._updateViewportSize()})}return e.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},e.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e},e.prototype.getViewportRect=function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),n=t.width,r=t.height;return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}},e.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=document.documentElement.getBoundingClientRect();return{top:-e.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-e.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}},e.prototype.change=function(e){return void 0===e&&(e=20),e>0?this._change.pipe(Hu(e)):this._change},e.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},e.ngInjectableDef=ce({factory:function(){return new e(Xe(cu),Xe(Vt))},token:e,providedIn:"root"}),e}(),Yu=function(){},Ku=function(e){function t(){var n=e.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,t.prototype),n}return r.__extends(t,e),t}(Error);function Xu(e){return function(t){return 0===e?Su():t.lift(new Ju(e))}}var Ju=function(){function e(e){if(this.total=e,this.total<0)throw new Ku}return e.prototype.call=function(e,t){return t.subscribe(new $u(e,this.total))},e}(),$u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(b);function el(){throw Error("Host already has a portal attached")}var tl=function(){function e(){}return e.prototype.attach=function(e){return null==e&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),e.hasAttached()&&el(),this._attachedHost=e,e.attach(this)},e.prototype.detach=function(){var e=this._attachedHost;null==e?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,e.detach())},Object.defineProperty(e.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),e.prototype.setAttachedHost=function(e){this._attachedHost=e},e}(),nl=function(e){function t(t,n,r){var i=e.call(this)||this;return i.component=t,i.viewContainerRef=n,i.injector=r,i}return Object(r.__extends)(t,e),t}(tl),rl=function(e){function t(t,n,r){var i=e.call(this)||this;return i.templateRef=t,i.viewContainerRef=n,i.context=r,i}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),t.prototype.attach=function(t,n){return void 0===n&&(n=this.context),this.context=n,e.prototype.attach.call(this,t)},t.prototype.detach=function(){return this.context=void 0,e.prototype.detach.call(this)},t}(tl),il=function(){function e(){this._isDisposed=!1}return e.prototype.hasAttached=function(){return!!this._attachedPortal},e.prototype.attach=function(e){return e||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&el(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),e instanceof nl?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof rl?(this._attachedPortal=e,this.attachTemplatePortal(e)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()},e.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},e.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},e.prototype.setDisposeFn=function(e){this._disposeFn=e},e.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},e}(),ol=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.outletElement=t,o._componentFactoryResolver=n,o._appRef=r,o._defaultInjector=i,o}return Object(r.__extends)(t,e),t.prototype.attachComponentPortal=function(e){var t,n=this,r=this._componentFactoryResolver.resolveComponentFactory(e.component);return e.viewContainerRef?(t=e.viewContainerRef.createComponent(r,e.viewContainerRef.length,e.injector||e.viewContainerRef.parentInjector),this.setDisposeFn(function(){return t.destroy()})):(t=r.create(e.injector||this._defaultInjector),this._appRef.attachView(t.hostView),this.setDisposeFn(function(){n._appRef.detachView(t.hostView),t.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(t)),t},t.prototype.attachTemplatePortal=function(e){var t=this,n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context);return r.detectChanges(),r.rootNodes.forEach(function(e){return t.outletElement.appendChild(e)}),this.setDisposeFn(function(){var e=n.indexOf(r);-1!==e&&n.remove(e)}),r},t.prototype.dispose=function(){e.prototype.dispose.call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)},t.prototype._getComponentRootNode=function(e){return e.hostView.rootNodes[0]},t}(il),sl=function(e){function t(t,n){var r=e.call(this)||this;return r._componentFactoryResolver=t,r._viewContainerRef=n,r._isInitialized=!1,r.attached=new Lt,r}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"portal",{get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&e.prototype.detach.call(this),t&&e.prototype.attach.call(this,t),this._attachedPortal=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attachedRef",{get:function(){return this._attachedRef},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._isInitialized=!0},t.prototype.ngOnDestroy=function(){e.prototype.dispose.call(this),this._attachedPortal=null,this._attachedRef=null},t.prototype.attachComponentPortal=function(t){t.setAttachedHost(this);var n=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,r=this._componentFactoryResolver.resolveComponentFactory(t.component),i=n.createComponent(r,n.length,t.injector||n.parentInjector);return e.prototype.setDisposeFn.call(this,function(){return i.destroy()}),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i},t.prototype.attachTemplatePortal=function(t){var n=this;t.setAttachedHost(this);var r=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return e.prototype.setDisposeFn.call(this,function(){return n._viewContainerRef.clear()}),this._attachedPortal=t,this._attachedRef=r,this.attached.emit(r),r},t}(il),al=function(){},ul=function(){function e(e,t){this._parentInjector=e,this._customTokens=t}return e.prototype.get=function(e,t){var n=this._customTokens.get(e);return void 0!==n?n:this._parentInjector.get(e,t)},e}(),ll=function(){function e(){}return e.prototype.enable=function(){},e.prototype.disable=function(){},e.prototype.attach=function(){},e}(),cl=function(){return function(e){var t=this;this.scrollStrategy=new ll,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",e&&Object.keys(e).filter(function(t){return void 0!==e[t]}).forEach(function(n){return t[n]=e[n]})}}();function dl(e,t){if("top"!==t&&"bottom"!==t&&"center"!==t)throw Error("ConnectedPosition: Invalid "+e+' "'+t+'". Expected "top", "bottom" or "center".')}function pl(e,t){if("start"!==t&&"end"!==t&&"center"!==t)throw Error("ConnectedPosition: Invalid "+e+' "'+t+'". Expected "start", "end" or "center".')}var hl=function(){function e(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}return e.prototype.attach=function(){},e.prototype.enable=function(){if(this._canBeEnabled()){var e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=Ca(-this._previousScrollPosition.left),e.style.top=Ca(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},e.prototype.disable=function(){if(this._isEnabled){var e=this._document.documentElement,t=this._document.body,n=e.style.scrollBehavior||"",r=t.style.scrollBehavior||"";this._isEnabled=!1,e.style.left=this._previousHTMLStyles.left,e.style.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),e.style.scrollBehavior=t.style.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.style.scrollBehavior=n,t.style.scrollBehavior=r}},e.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var e=this._document.body,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width},e}();function fl(){return Error("Scroll strategy has already been attached.")}var ml=function(){function e(e,t,n,r){var i=this;this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=function(){i.disable(),i._overlayRef.hasAttached()&&i._ngZone.run(function(){return i._overlayRef.detach()})}}return e.prototype.attach=function(e){if(this._overlayRef)throw fl();this._overlayRef=e},e.prototype.enable=function(){var e=this;if(!this._scrollSubscription){var t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(function(){var t=e._viewportRuler.getViewportScrollPosition().top;Math.abs(t-e._initialScrollPosition)>e._config.threshold?e._detach():e._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}},e.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},e}();function gl(e,t){return t.some(function(t){return e.bottomt.bottom||e.rightt.right})}function yl(e,t){return t.some(function(t){return e.topt.bottom||e.leftt.right})}var vl=function(){function e(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}return e.prototype.attach=function(e){if(this._overlayRef)throw fl();this._overlayRef=e},e.prototype.enable=function(){var e=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(e._overlayRef.updatePosition(),e._config&&e._config.autoClose){var t=e._overlayRef.overlayElement.getBoundingClientRect(),n=e._viewportRuler.getViewportSize(),r=n.width,i=n.height;gl(t,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(e.disable(),e._ngZone.run(function(){return e._overlayRef.detach()}))}}))},e.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},e}(),bl=function(){function e(e,t,n,r){var i=this;this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this.noop=function(){return new ll},this.close=function(e){return new ml(i._scrollDispatcher,i._ngZone,i._viewportRuler,e)},this.block=function(){return new hl(i._viewportRuler,i._document)},this.reposition=function(e){return new vl(i._scrollDispatcher,i._viewportRuler,i._ngZone,e)},this._document=r}return e.ngInjectableDef=ce({factory:function(){return new e(Xe(Qu),Xe(Zu),Xe(Vt),Xe(nu))},token:e,providedIn:"root"}),e}(),_l=function(){function e(e){var t=this;this._attachedOverlays=[],this._keydownListener=function(e){t._attachedOverlays.length&&t._attachedOverlays[t._attachedOverlays.length-1]._keydownEvents.next(e)},this._document=e}return e.prototype.ngOnDestroy=function(){this._detach()},e.prototype.add=function(e){this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(e)},e.prototype.remove=function(e){var t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),0===this._attachedOverlays.length&&this._detach()},e.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(nu))},token:e,providedIn:"root"}),e}(),wl=function(){function e(e){this._document=e}return e.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},e.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},e.prototype._createContainer=function(){var e=this._document.createElement("div");e.classList.add("cdk-overlay-container"),this._document.body.appendChild(e),this._containerElement=e},e.ngInjectableDef=ce({factory:function(){return new e(Xe(nu))},token:e,providedIn:"root"}),e}(),El=function(){function e(e,t,n,r,i,o,s){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._backdropElement=null,this._backdropClick=new ee,this._attachments=new ee,this._detachments=new ee,this._keydownEvents=new ee,r.scrollStrategy&&r.scrollStrategy.attach(this)}return Object.defineProperty(e.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),e.prototype.attach=function(e){var t=this,n=this._portalOutlet.attach(e);return this._config.positionStrategy&&this._config.positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(Xu(1)).subscribe(function(){t.hasAttached()&&t.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),n},e.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._config.positionStrategy&&this._config.positionStrategy.detach&&this._config.positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable();var e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),e}},e.prototype.dispose=function(){var e=this.hasAttached();this._config.positionStrategy&&this._config.positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._pane=null,e&&this._detachments.next(),this._detachments.complete()},e.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},e.prototype.backdropClick=function(){return this._backdropClick.asObservable()},e.prototype.attachments=function(){return this._attachments.asObservable()},e.prototype.detachments=function(){return this._detachments.asObservable()},e.prototype.keydownEvents=function(){return this._keydownEvents.asObservable()},e.prototype.getConfig=function(){return this._config},e.prototype.updatePosition=function(){this._config.positionStrategy&&this._config.positionStrategy.apply()},e.prototype.updateSize=function(e){this._config=Object(r.__assign)({},this._config,e),this._updateElementSize()},e.prototype.setDirection=function(e){this._config=Object(r.__assign)({},this._config,{direction:e}),this._updateElementDirection()},e.prototype.getDirection=function(){var e=this._config.direction;return e?"string"==typeof e?e:e.value:"ltr"},e.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},e.prototype._updateElementSize=function(){(this._config.width||0===this._config.width)&&(this._pane.style.width=Ca(this._config.width)),(this._config.height||0===this._config.height)&&(this._pane.style.height=Ca(this._config.height)),(this._config.minWidth||0===this._config.minWidth)&&(this._pane.style.minWidth=Ca(this._config.minWidth)),(this._config.minHeight||0===this._config.minHeight)&&(this._pane.style.minHeight=Ca(this._config.minHeight)),(this._config.maxWidth||0===this._config.maxWidth)&&(this._pane.style.maxWidth=Ca(this._config.maxWidth)),(this._config.maxHeight||0===this._config.maxHeight)&&(this._pane.style.maxHeight=Ca(this._config.maxHeight))},e.prototype._togglePointerEvents=function(e){this._pane.style.pointerEvents=e?"auto":"none"},e.prototype._attachBackdrop=function(){var e=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",function(t){return e._backdropClick.next(t)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){e._backdropElement&&e._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},e.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},e.prototype.detachBackdrop=function(){var e=this,t=this._backdropElement;if(t){var n=function(){t&&t.parentNode&&t.parentNode.removeChild(t),e._backdropElement==t&&(e._backdropElement=null)};t.classList.remove("cdk-overlay-backdrop-showing"),this._config.backdropClass&&this._toggleClasses(t,this._config.backdropClass,!1),t.addEventListener("transitionend",n),t.style.pointerEvents="none",this._ngZone.runOutsideAngular(function(){return setTimeout(n,500)})}},e.prototype._toggleClasses=function(e,t,n){var r=e.classList;Sa(t).forEach(function(e){n?r.add(e):r.remove(e)})},e}(),Sl=function(){function e(e,t,n,r){var i=this;this._viewportRuler=t,this._document=n,this._platform=r,this._isInitialRender=!0,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new ee,this._resizeSubscription=g.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this.positionChanges=x.create(function(e){var t=i._positionChanges.subscribe(e);return i._positionChangeSubscriptions++,function(){t.unsubscribe(),i._positionChangeSubscriptions--}}),this.setOrigin(e)}return Object.defineProperty(e.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),e.prototype.attach=function(e){var t=this;if(this._overlayRef&&e!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),e.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){return t.apply()})},e.prototype.apply=function(){if(!(this._isDisposed||this._platform&&!this._platform.isBrowser))if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var e,t=this._originRect,n=this._overlayRect,r=this._viewportRect,i=[],o=0,s=this._preferredPositions;op&&(p=g,d=m)}return this._isPushed=!1,void this._applyPosition(d.position,d.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(e.position,e.originPoint);this._applyPosition(e.position,e.originPoint)}},e.prototype.detach=function(){this._resizeSubscription.unsubscribe()},e.prototype.dispose=function(){this._isDisposed||(this.detach(),this._boundingBox=null,this._positionChanges.complete(),this._isDisposed=!0)},e.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var e=this._lastPosition||this._preferredPositions[0],t=this._getOriginPoint(this._originRect,e);this._applyPosition(e,t)}},e.prototype.withScrollableContainers=function(e){this.scrollables=e},e.prototype.withPositions=function(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},e.prototype.withViewportMargin=function(e){return this._viewportMargin=e,this},e.prototype.withFlexibleDimensions=function(e){return void 0===e&&(e=!0),this._hasFlexibleDimensions=e,this},e.prototype.withGrowAfterOpen=function(e){return void 0===e&&(e=!0),this._growAfterOpen=e,this},e.prototype.withPush=function(e){return void 0===e&&(e=!0),this._canPush=e,this},e.prototype.withLockedPosition=function(e){return void 0===e&&(e=!0),this._positionLocked=e,this},e.prototype.setOrigin=function(e){return this._origin=e instanceof cn?e.nativeElement:e,this},e.prototype.withDefaultOffsetX=function(e){return this._offsetX=e,this},e.prototype.withDefaultOffsetY=function(e){return this._offsetY=e,this},e.prototype.withTransformOriginOn=function(e){return this._transformOriginSelector=e,this},e.prototype._getOriginPoint=function(e,t){var n;if("center"==t.originX)n=e.left+e.width/2;else{var r=this._isRtl()?e.right:e.left,i=this._isRtl()?e.left:e.right;n="start"==t.originX?r:i}return{x:n,y:"center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom}},e.prototype._getOverlayPoint=function(e,t,n){var r;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,{x:e.x+r,y:e.y+("center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height)}},e.prototype._getOverlayFit=function(e,t,n,r){var i=e.x,o=e.y,s=this._getOffset(r,"x"),a=this._getOffset(r,"y");s&&(i+=s),a&&(o+=a);var u=0-o,l=o+t.height-n.height,c=this._subtractOverflows(t.width,0-i,i+t.width-n.width),d=this._subtractOverflows(t.height,u,l),p=c*d;return{visibleArea:p,isCompletelyWithinViewport:t.width*t.height===p,fitsInViewportVertically:d===t.height,fitsInViewportHorizontally:c==t.width}},e.prototype._canFitWithFlexibleDimensions=function(e,t,n){if(this._hasFlexibleDimensions){var r=n.bottom-t.y,i=n.right-t.x,o=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth;return(e.fitsInViewportVertically||null!=o&&o<=r)&&(e.fitsInViewportHorizontally||null!=s&&s<=i)}},e.prototype._pushOverlayOnScreen=function(e,t){var n=this._viewportRect,r=Math.max(e.x+t.width-n.right,0),i=Math.max(e.y+t.height-n.bottom,0),o=Math.max(n.top-e.y,0),s=Math.max(n.left-e.x,0);return{x:e.x+(t.width<=n.width?s||-r:n.left-e.x),y:e.y+(t.height<=n.height?o||-i:n.top-e.y)}},e.prototype._applyPosition=function(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),this._lastPosition=e,this._positionChangeSubscriptions>0){var n=new function(e,t){this.connectionPair=e,this.scrollableViewProperties=t}(e,this._getScrollVisibility());this._positionChanges.next(n)}this._isInitialRender=!1},e.prototype._setTransformOrigin=function(e){if(this._transformOriginSelector){var t,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=e.overlayY;t="center"===e.overlayX?"center":this._isRtl()?"start"===e.overlayX?"right":"left":"start"===e.overlayX?"left":"right";for(var i=0;id&&!this._isInitialRender&&!this._growAfterOpen&&(r=e.y-d/2)}if("end"===t.overlayX&&!l||"start"===t.overlayX&&l)a=u.right-e.x+this._viewportMargin,o=e.x-u.left;else if("start"===t.overlayX&&!l||"end"===t.overlayX&&l)s=e.x,o=u.right-e.x;else{c=Math.min(u.right-e.x,e.x-u.top);var p=this._lastBoundingBoxSize.width;s=e.x-c,(o=2*c)>p&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.x-p/2)}return{top:r,left:s,bottom:i,right:a,width:o,height:n}},e.prototype._setBoundingBoxStyles=function(e,t){var n=this._calculateBoundingBoxRect(e,t);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right="",r.width=r.height="100%";else{var i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=Ca(n.height),r.top=Ca(n.top),r.bottom=Ca(n.bottom),r.width=Ca(n.width),r.left=Ca(n.left),r.right=Ca(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",i&&(r.maxHeight=Ca(i)),o&&(r.maxWidth=Ca(o))}this._lastBoundingBoxSize=n,Cl(this._boundingBox.style,r)},e.prototype._resetBoundingBoxStyles=function(){Cl(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},e.prototype._resetOverlayElementStyles=function(){Cl(this._pane.style,{top:"",left:"",bottom:"",right:"",position:""})},e.prototype._setOverlayElementStyles=function(e,t){var n={};this._hasExactPosition()?(Cl(n,this._getExactOverlayY(t,e)),Cl(n,this._getExactOverlayX(t,e))):n.position="static";var r="",i=this._getOffset(t,"x"),o=this._getOffset(t,"y");i&&(r+="translateX("+i+"px) "),o&&(r+="translateY("+o+"px)"),n.transform=r.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),Cl(this._pane.style,n)},e.prototype._getExactOverlayY=function(e,t){var n={top:null,bottom:null},r=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect)),"bottom"===e.overlayY?n.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":n.top=Ca(r.y),n},e.prototype._getExactOverlayX=function(e,t){var n={left:null,right:null},r=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect)),"right"==(this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left")?n.right=this._document.documentElement.clientWidth-(r.x+this._overlayRect.width)+"px":n.left=Ca(r.x),n},e.prototype._getScrollVisibility=function(){var e=this._origin.getBoundingClientRect(),t=this._pane.getBoundingClientRect(),n=this.scrollables.map(function(e){return e.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:yl(e,n),isOriginOutsideView:gl(e,n),isOverlayClipped:yl(t,n),isOverlayOutsideView:gl(t,n)}},e.prototype._subtractOverflows=function(e){for(var t=[],n=1;n0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r0;s||(s=e[o]=[]);var u=Mc(t)?Zone.root:Zone.current;if(0===s.length)s.push({zone:u,handler:i});else{for(var l=!1,c=0;c-1},t}(pc),zc=["alt","control","meta","shift"],Bc={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},Uc=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t.prototype.supports=function(e){return null!=t.parseEventName(e)},t.prototype.addEventListener=function(e,n,r){var i=t.parseEventName(n),o=t.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return Wl().onAndCancel(e,i.domEventName,o)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var i=t._normalizeKey(n.pop()),o="";if(zc.forEach(function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o+=e+".")}),o+=i,0!=n.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},t.getEventFullKey=function(e){var t="",n=Wl().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),zc.forEach(function(r){r!=n&&(0,Bc[r])(e)&&(t+=r+".")}),t+=n},t.eventCallback=function(e,n,r){return function(i){t.getEventFullKey(i)===e&&r.runGuarded(function(){return n(i)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t}(pc),Hc=function(){},Gc=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n}return Object(r.__extends)(t,e),t.prototype.sanitize=function(e,t){if(null==t)return null;switch(e){case br.NONE:return t;case br.HTML:return t instanceof qc?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),function(e,t){var n=null;try{rr=rr||new Xn(e);var r=t?String(t):"";n=rr.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=rr.getInertBodyElement(r)}while(r!==o);var s=new pr,a=s.sanitizeChildren(gr(n)||n);return Jt()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var u=gr(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}(this._doc,String(t)));case br.STYLE:return t instanceof Qc?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),function(e){if(!(e=String(e).trim()))return"";var t=e.match(vr);return t&&er(t[1])===t[1]||e.match(yr)&&function(e){for(var t=!0,n=!0,r=0;r visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.0, 0.0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function _d(e){return Oo(2,[(e()(),di(0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(e,t,n){var r=!0,i=e.component;return"@state.start"===t&&(r=!1!==i._animationStart()&&r),"@state.done"===t&&(r=!1!==i._animationDone(n)&&r),r},null,null)),$i(1,278528,null,0,Ba,[zn,Bn,cn,ln],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t=131072,n=eu,r=[bn],to(-1,t|=16,null,0,n,n,r)),(e()(),So(3,null,["",""]))],function(e,t){e(t,1,0,"mat-tooltip",t.component.tooltipClass)},function(e,t){var n=t.component;e(t,0,0,function(e,t,n,r){if(On.isWrapped(r)){r=On.unwrap(r);var i=e.def.nodes[0].bindingIndex+0,o=On.unwrap(e.oldValues[i]);e.oldValues[i]=new On(o)}return r}(t,0,0,zi(t,2).transform(n._isHandset)).matches,n._visibility),e(t,3,0,n.message)});var t,n,r}var wd=ki("mat-tooltip-component",Fl,function(e){return Oo(0,[(e()(),di(0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(e,t,n){var r=!0;return"body:click"===t&&(r=!1!==zi(e,1)._handleBodyInteraction()&&r),r},_d,bd)),$i(1,49152,null,0,Fl,[bn,Pu],null,null)],null,function(e,t){e(t,0,0,"visible"===zi(t,1)._visibility?1:null)})},{},{},[]),Ed=function(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabel=null,this.autoFocus=!0,this.closeOnNavigation=!0};function Sd(){throw Error("Attempting to attach dialog content after content is already attached")}var Cd=function(e){function t(t,n,r,i,o){var s=e.call(this)||this;return s._elementRef=t,s._focusTrapFactory=n,s._changeDetectorRef=r,s._document=i,s._config=o,s._elementFocusedBeforeDialogWasOpened=null,s._state="enter",s._animationStateChanged=new Lt,s._ariaLabelledBy=null,s}return Object(r.__extends)(t,e),t.prototype.attachComponentPortal=function(e){return this._portalOutlet.hasAttached()&&Sd(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(e)},t.prototype.attachTemplatePortal=function(e){return this._portalOutlet.hasAttached()&&Sd(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(e)},t.prototype._trapFocus=function(){this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)),this._config.autoFocus&&this._focusTrap.focusInitialElementWhenReady()},t.prototype._restoreFocus=function(){var e=this._elementFocusedBeforeDialogWasOpened;e&&"function"==typeof e.focus&&e.focus(),this._focusTrap&&this._focusTrap.destroy()},t.prototype._savePreviouslyFocusedElement=function(){var e=this;this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then(function(){return e._elementRef.nativeElement.focus()}))},t.prototype._onAnimationDone=function(e){"enter"===e.toState?this._trapFocus():"exit"===e.toState&&this._restoreFocus(),this._animationStateChanged.emit(e)},t.prototype._onAnimationStart=function(e){this._animationStateChanged.emit(e)},t.prototype._startExitAnimation=function(){this._state="exit",this._changeDetectorRef.markForCheck()},t}(il),xd=0,Od=function(){function e(e,t,n,r){void 0===r&&(r="mat-dialog-"+xd++);var i=this;this._overlayRef=e,this._containerInstance=t,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpen=new ee,this._afterClosed=new ee,this._beforeClose=new ee,this._locationChanges=g.EMPTY,t._id=r,t._animationStateChanged.pipe(Gu(function(e){return"done"===e.phaseName&&"enter"===e.toState}),Xu(1)).subscribe(function(){i._afterOpen.next(),i._afterOpen.complete()}),t._animationStateChanged.pipe(Gu(function(e){return"done"===e.phaseName&&"exit"===e.toState}),Xu(1)).subscribe(function(){return i._overlayRef.dispose()}),e.detachments().subscribe(function(){i._beforeClose.next(i._result),i._beforeClose.complete(),i._locationChanges.unsubscribe(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()}),e.keydownEvents().pipe(Gu(function(e){return e.keyCode===xa&&!i.disableClose})).subscribe(function(){return i.close()}),n&&(this._locationChanges=n.subscribe(function(){i._containerInstance._config.closeOnNavigation&&i.close()}))}return e.prototype.close=function(e){var t=this;this._result=e,this._containerInstance._animationStateChanged.pipe(Gu(function(e){return"start"===e.phaseName}),Xu(1)).subscribe(function(){t._beforeClose.next(e),t._beforeClose.complete(),t._overlayRef.detachBackdrop()}),this._containerInstance._startExitAnimation()},e.prototype.afterOpen=function(){return this._afterOpen.asObservable()},e.prototype.afterClosed=function(){return this._afterClosed.asObservable()},e.prototype.beforeClose=function(){return this._beforeClose.asObservable()},e.prototype.backdropClick=function(){return this._overlayRef.backdropClick()},e.prototype.keydownEvents=function(){return this._overlayRef.keydownEvents()},e.prototype.updatePosition=function(e){var t=this._getPositionStrategy();return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._overlayRef.updatePosition(),this},e.prototype.updateSize=function(e,t){return void 0===e&&(e="auto"),void 0===t&&(t="auto"),this._getPositionStrategy().width(e).height(t),this._overlayRef.updatePosition(),this},e.prototype._getPositionStrategy=function(){return this._overlayRef.getConfig().positionStrategy},e}(),Td=new de("MatDialogData"),Id=new de("mat-dialog-default-options"),kd=new de("mat-dialog-scroll-strategy");function Ad(e){return function(){return e.scrollStrategies.block()}}var Pd=function(){function e(e,t,n,r,i,o,s){var a,u=this;this._overlay=e,this._injector=t,this._location=n,this._defaultOptions=r,this._scrollStrategy=i,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ee,this._afterOpenAtThisLevel=new ee,this._ariaHiddenElements=new Map,this.afterAllClosed=(a=function(){return u.openDialogs.length?u._afterAllClosed:u._afterAllClosed.pipe(Ou(void 0))},new x(function(e){var t;try{t=a()}catch(t){return void e.error(t)}return(t?H(t):Su()).subscribe(e)}))}return Object.defineProperty(e.prototype,"openDialogs",{get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"afterOpen",{get:function(){return this._parentDialog?this._parentDialog.afterOpen:this._afterOpenAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_afterAllClosed",{get:function(){var e=this._parentDialog;return e?e._afterAllClosed:this._afterAllClosedAtThisLevel},enumerable:!0,configurable:!0}),e.prototype.open=function(e,t){var n=this;if((t=function(e,t){return Object(r.__assign)({},t,e)}(t,this._defaultOptions||new Ed)).id&&this.getDialogById(t.id))throw Error('Dialog with id "'+t.id+'" exists already. The dialog id must be unique.');var i=this._createOverlay(t),o=this._attachDialogContainer(i,t),s=this._attachDialogContent(e,o,i,t);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.afterClosed().subscribe(function(){return n._removeOpenDialog(s)}),this.afterOpen.next(s),s},e.prototype.closeAll=function(){for(var e=this.openDialogs.length;e--;)this.openDialogs[e].close()},e.prototype.getDialogById=function(e){return this.openDialogs.find(function(t){return t.id===e})},e.prototype._createOverlay=function(e){var t=this._getOverlayConfig(e);return this._overlay.create(t)},e.prototype._getOverlayConfig=function(e){var t=new cl({positionStrategy:this._overlay.position().global(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight});return e.backdropClass&&(t.backdropClass=e.backdropClass),t},e.prototype._attachDialogContainer=function(e,t){var n=new ul(t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,new WeakMap([[Ed,t]])),r=new nl(Cd,t.viewContainerRef,n);return e.attach(r).instance},e.prototype._attachDialogContent=function(e,t,n,r){var i=new Od(n,t,this._location,r.id);if(r.hasBackdrop&&n.backdropClick().subscribe(function(){i.disableClose||i.close()}),e instanceof yn)t.attachTemplatePortal(new rl(e,null,{$implicit:r.data,dialogRef:i}));else{var o=this._createInjector(r,i,t),s=t.attachComponentPortal(new nl(e,void 0,o));i.componentInstance=s.instance}return i.updateSize(r.width,r.height).updatePosition(r.position),i},e.prototype._createInjector=function(e,t,n){var r=e&&e.viewContainerRef&&e.viewContainerRef.injector,i=new WeakMap([[Cd,n],[Td,e.data],[Od,t]]);return!e.direction||r&&r.get(Ul,null)||i.set(Ul,{value:e.direction,change:Cu()}),new ul(r||this._injector,i)},e.prototype._removeOpenDialog=function(e){var t=this.openDialogs.indexOf(e);t>-1&&(this.openDialogs.splice(t,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(e,t){e?t.setAttribute("aria-hidden",e):t.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._afterAllClosed.next()))},e.prototype._hideNonDialogContentFromAssistiveTechnology=function(){var e=this._overlayContainer.getContainerElement();if(e.parentElement)for(var t=e.parentElement.children,n=t.length-1;n>-1;n--){var r=t[n];r===e||"SCRIPT"===r.nodeName||"STYLE"===r.nodeName||r.hasAttribute("aria-live")||(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}},e}(),Rd=0,Md=function(){function e(e,t,n){this.dialogRef=e,this._elementRef=t,this._dialog=n,this.ariaLabel="Close dialog"}return e.prototype.ngOnInit=function(){this.dialogRef||(this.dialogRef=Ld(this._elementRef,this._dialog.openDialogs))},e.prototype.ngOnChanges=function(e){var t=e._matDialogClose||e._matDialogCloseResult;t&&(this.dialogResult=t.currentValue)},e}(),Nd=function(){function e(e,t,n){this._dialogRef=e,this._elementRef=t,this._dialog=n,this.id="mat-dialog-title-"+Rd++}return e.prototype.ngOnInit=function(){var e=this;this._dialogRef||(this._dialogRef=Ld(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(function(){var t=e._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=e.id)})},e}(),Dd=function(){},jd=function(){};function Ld(e,t){for(var n=e.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?t.find(function(e){return e.id===n.id}):null}var Vd=function(){},Fd=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new zd(e,this.dueTime,this.scheduler))},e}(),zd=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Bd,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(b);function Bd(e){e.debouncedNext()}function Ud(e,t,n){return function(r){return r.lift(new Hd(e,t,n))}}var Hd=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new Gd(e,this.nextOrObserver,this.error,this.complete))},e}(),Gd=function(e){function t(t,n,r,o){var s=e.call(this,t)||this;return s._tapNext=E,s._tapError=E,s._tapComplete=E,s._tapError=r||E,s._tapComplete=o||E,i(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||E,s._tapError=n.error||E,s._tapComplete=n.complete||E),s}return r.__extends(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(b);function Wd(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}var qd=0,Qd=new Map,Zd=null,Yd=function(){function e(e){this._document=e}return e.prototype.describe=function(e,t){this._canBeDescribed(e,t)&&(Qd.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))},e.prototype.removeDescription=function(e,t){if(this._canBeDescribed(e,t)){this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t);var n=Qd.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t),Zd&&0===Zd.childNodes.length&&this._deleteMessagesContainer()}},e.prototype.ngOnDestroy=function(){for(var e=this._document.querySelectorAll("[cdk-describedby-host]"),t=0;t=0},e.prototype.isFocusable=function(e){return function(e){return!function(e){return function(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function(e){return function(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||Xd(e))}(e)&&!this.isDisabled(e)&&this.isVisible(e)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(cu))},token:e,providedIn:"root"}),e}();function Xd(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function Jd(e){if(!Xd(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var $d=function(){function e(e,t,n,r,i){void 0===i&&(i=!1),this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null},e.prototype.attachAnchors=function(){var e=this;this._startAnchor||(this._startAnchor=this._createAnchor()),this._endAnchor||(this._endAnchor=this._createAnchor()),this._ngZone.runOutsideAngular(function(){e._startAnchor.addEventListener("focus",function(){e.focusLastTabbableElement()}),e._endAnchor.addEventListener("focus",function(){e.focusFirstTabbableElement()}),e._element.parentNode&&(e._element.parentNode.insertBefore(e._startAnchor,e._element),e._element.parentNode.insertBefore(e._endAnchor,e._element.nextSibling))})},e.prototype.focusInitialElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})},e.prototype.focusFirstTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})},e.prototype.focusLastTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})},e.prototype._getRegionBoundary=function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-"+e+"], [cdkFocusRegion"+e+"], [cdk-focus-"+e+"]"),n=0;n=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._createAnchor=function(){var e=this._document.createElement("div");return e.tabIndex=this._enabled?0:-1,e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e},e.prototype._executeOnStable=function(e){this._ngZone.isStable?e():this._ngZone.onStable.asObservable().pipe(Xu(1)).subscribe(e)},e}(),ep=function(){function e(e,t,n){this._checker=e,this._ngZone=t,this._document=n}return e.prototype.create=function(e,t){return void 0===t&&(t=!1),new $d(e,this._checker,this._ngZone,this._document,t)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Kd),Xe(Vt),Xe(nu))},token:e,providedIn:"root"}),e}(),tp=function(){function e(e,t){this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=function(){},this._monitoredElementCount=0}return e.prototype.monitor=function(e,t){var n=this;if(void 0===t&&(t=!1),!this._platform.isBrowser)return Cu(null);if(this._elementInfo.has(e)){var r=this._elementInfo.get(e);return r.checkChildren=t,r.subject.asObservable()}var i={unlisten:function(){},checkChildren:t,subject:new ee};this._elementInfo.set(e,i),this._incrementMonitoredElementCount();var o=function(t){return n._onFocus(t,e)},s=function(t){return n._onBlur(t,e)};return this._ngZone.runOutsideAngular(function(){e.addEventListener("focus",o,!0),e.addEventListener("blur",s,!0)}),i.unlisten=function(){e.removeEventListener("focus",o,!0),e.removeEventListener("blur",s,!0)},i.subject.asObservable()},e.prototype.stopMonitoring=function(e){var t=this._elementInfo.get(e);t&&(t.unlisten(),t.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._decrementMonitoredElementCount())},e.prototype.focusVia=function(e,t){this._setOriginForCurrentEventQueue(t),"function"==typeof e.focus&&e.focus()},e.prototype.ngOnDestroy=function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})},e.prototype._registerGlobalListeners=function(){var e=this;if(this._platform.isBrowser){var t=function(){e._lastTouchTarget=null,e._setOriginForCurrentEventQueue("keyboard")},n=function(){e._lastTouchTarget||e._setOriginForCurrentEventQueue("mouse")},r=function(t){null!=e._touchTimeoutId&&clearTimeout(e._touchTimeoutId),e._lastTouchTarget=t.target,e._touchTimeoutId=setTimeout(function(){return e._lastTouchTarget=null},650)},i=function(){e._windowFocused=!0,e._windowFocusTimeoutId=setTimeout(function(){return e._windowFocused=!1})};this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",t,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",r,!du()||{passive:!0,capture:!0}),window.addEventListener("focus",i)}),this._unregisterGlobalListeners=function(){document.removeEventListener("keydown",t,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("touchstart",r,!du()||{passive:!0,capture:!0}),window.removeEventListener("focus",i),clearTimeout(e._windowFocusTimeoutId),clearTimeout(e._touchTimeoutId),clearTimeout(e._originTimeoutId)}}},e.prototype._toggleClass=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.prototype._setClasses=function(e,t){this._elementInfo.get(e)&&(this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t))},e.prototype._setOriginForCurrentEventQueue=function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,t._originTimeoutId=setTimeout(function(){return t._origin=null})})},e.prototype._wasCausedByTouch=function(e){var t=e.target;return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))},e.prototype._onFocus=function(e,t){var n=this._elementInfo.get(t);if(n&&(n.checkChildren||t===e.target)){var r=this._origin;r||(r=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"),this._setClasses(t,r),this._emitOrigin(n.subject,r),this._lastFocusOrigin=r}},e.prototype._onBlur=function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))},e.prototype._emitOrigin=function(e,t){this._ngZone.run(function(){return e.next(t)})},e.prototype._incrementMonitoredElementCount=function(){1==++this._monitoredElementCount&&this._registerGlobalListeners()},e.prototype._decrementMonitoredElementCount=function(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=function(){})},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Vt),Xe(cu))},token:e,providedIn:"root"}),e}(),np=Lr({encapsulation:2,styles:[".mat-dialog-container{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);display:block;padding:24px;border-radius:2px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}@media screen and (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:12px 0;display:flex;flex-wrap:wrap;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],data:{animation:[{type:7,name:"slideDialog",definitions:[{type:0,name:"enter",styles:{type:6,styles:{transform:"none",opacity:1},offset:null},options:void 0},{type:0,name:"void",styles:{type:6,styles:{transform:"translate3d(0, 25%, 0) scale(0.9)",opacity:0},offset:null},options:void 0},{type:0,name:"exit",styles:{type:6,styles:{transform:"translate3d(0, 25%, 0)",opacity:0},offset:null},options:void 0},{type:1,expr:"* => *",animation:{type:4,styles:null,timings:"400ms cubic-bezier(0.25, 0.8, 0.25, 1)"},options:null}],options:{}}]}});function rp(e){return Oo(0,[(e()(),ci(0,null,null,0))],null,null)}function ip(e){return Oo(0,[go(402653184,1,{_portalOutlet:0}),(e()(),ci(16777216,null,null,1,null,rp)),$i(2,212992,[[1,4]],0,sl,[It,vn],{portal:[0,"portal"]},null)],function(e,t){e(t,2,0,"")},null)}var op=ki("mat-dialog-container",Cd,function(e){return Oo(0,[(e()(),di(0,0,null,null,1,"mat-dialog-container",[["class","mat-dialog-container"],["tabindex","-1"]],[[1,"id",0],[1,"role",0],[1,"aria-labelledby",0],[1,"aria-label",0],[1,"aria-describedby",0],[40,"@slideDialog",0]],[["component","@slideDialog.start"],["component","@slideDialog.done"]],function(e,t,n){var r=!0;return"component:@slideDialog.start"===t&&(r=!1!==zi(e,1)._onAnimationStart(n)&&r),"component:@slideDialog.done"===t&&(r=!1!==zi(e,1)._onAnimationDone(n)&&r),r},ip,np)),$i(1,49152,null,0,Cd,[cn,ep,bn,[2,nu],Ed],null,null)],null,function(e,t){e(t,0,0,zi(t,1)._id,zi(t,1)._config.role,zi(t,1)._config.ariaLabel?null:zi(t,1)._ariaLabelledBy,zi(t,1)._config.ariaLabel,zi(t,1)._config.ariaDescribedBy||null,zi(t,1)._state)})},{},{},[]),sp=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return r.__extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new K;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(ee),ap=new de("Flex Layout token, disable the default breakpoints",{providedIn:"root",factory:function(){return!1}}),up=new de("Flex Layout token, add the orientation breakpoints",{providedIn:"root",factory:function(){return!1}}),lp=new de("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:function(){return null}}),cp=[{alias:"xs",mediaQuery:"(min-width: 0px) and (max-width: 599px)"},{alias:"gt-xs",overlapping:!0,mediaQuery:"(min-width: 600px)"},{alias:"lt-sm",overlapping:!0,mediaQuery:"(max-width: 599px)"},{alias:"sm",mediaQuery:"(min-width: 600px) and (max-width: 959px)"},{alias:"gt-sm",overlapping:!0,mediaQuery:"(min-width: 960px)"},{alias:"lt-md",overlapping:!0,mediaQuery:"(max-width: 959px)"},{alias:"md",mediaQuery:"(min-width: 960px) and (max-width: 1279px)"},{alias:"gt-md",overlapping:!0,mediaQuery:"(min-width: 1280px)"},{alias:"lt-lg",overlapping:!0,mediaQuery:"(max-width: 1279px)"},{alias:"lg",mediaQuery:"(min-width: 1280px) and (max-width: 1919px)"},{alias:"gt-lg",overlapping:!0,mediaQuery:"(min-width: 1920px)"},{alias:"lt-xl",overlapping:!0,mediaQuery:"(max-width: 1920px)"},{alias:"xl",mediaQuery:"(min-width: 1920px) and (max-width: 5000px)"}],dp="(orientations: landscape) and (min-width: 960px) and (max-width: 1279px)",pp="(orientations: portrait) and (min-width: 600px) and (max-width: 839px)",hp="(orientations: portrait) and (min-width: 840px)",fp="(orientations: landscape) and (min-width: 1280px)",mp={HANDSET:"(orientations: portrait) and (max-width: 599px), (orientations: landscape) and (max-width: 959px)",TABLET:pp+" , "+dp,WEB:hp+", "+fp+" ",HANDSET_PORTRAIT:"(orientations: portrait) and (max-width: 599px)",TABLET_PORTRAIT:pp+" ",WEB_PORTRAIT:""+hp,HANDSET_LANDSCAPE:"(orientations: landscape) and (max-width: 959px)]",TABLET_LANDSCAPE:""+dp,WEB_LANDSCAPE:""+fp},gp=[{alias:"handset",mediaQuery:mp.HANDSET},{alias:"handset.landscape",mediaQuery:mp.HANDSET_LANDSCAPE},{alias:"handset.portrait",mediaQuery:mp.HANDSET_PORTRAIT},{alias:"tablet",mediaQuery:mp.TABLET},{alias:"tablet.landscape",mediaQuery:mp.TABLET},{alias:"tablet.portrait",mediaQuery:mp.TABLET_PORTRAIT},{alias:"web",mediaQuery:mp.WEB,overlapping:!0},{alias:"web.landscape",mediaQuery:mp.WEB_LANDSCAPE,overlapping:!0},{alias:"web.portrait",mediaQuery:mp.WEB_PORTRAIT,overlapping:!0}];function yp(e){for(var t=[],n=1;n0?e.charAt(0):"",n=e.length>1?e.slice(1):"";return t.toUpperCase()+n}function _p(e,t){void 0===t&&(t=[]);var n,r={};return e.forEach(function(e){r[e.alias]=e}),t.forEach(function(e){r[e.alias]?yp(r[e.alias],e):r[e.alias]=e}),(n=Object.keys(r).map(function(e){return r[e]})).forEach(function(e){e.suffix||(e.suffix=e.alias.replace(vp,"|").split("|").map(bp).join(""),e.overlapping=!!e.overlapping)}),n}var wp=new de("Token (@angular/flex-layout) Breakpoints",{providedIn:"root",factory:function(){var e=Xe(lp),t=Xe(ap),n=Xe(up),r=[].concat.apply([],(e||[]).map(function(e){return Array.isArray(e)?e:[e]})),i=cp.concat(n?gp:[]);return t?_p(r):_p(i,r)}}),Ep=function(){function e(e){this._registry=e}return Object.defineProperty(e.prototype,"items",{get:function(){return this._registry.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortedItems",{get:function(){var e=this._registry.filter(function(e){return!0===e.overlapping}),t=this._registry.filter(function(e){return!0!==e.overlapping});return e.concat(t)},enumerable:!0,configurable:!0}),e.prototype.findByAlias=function(e){return this._registry.find(function(t){return t.alias==e})||null},e.prototype.findByQuery=function(e){return this._registry.find(function(t){return t.mediaQuery==e})||null},Object.defineProperty(e.prototype,"overlappings",{get:function(){return this._registry.filter(function(e){return 1==e.overlapping})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aliases",{get:function(){return this._registry.map(function(e){return e.alias})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"suffixes",{get:function(){return this._registry.map(function(e){return e.suffix?e.suffix:""})},enumerable:!0,configurable:!0}),e.ngInjectableDef=ce({factory:function(){return new e(Xe(wp))},token:e,providedIn:"root"}),e}(),Sp=function(){function e(e,t,n,r){void 0===e&&(e=!1),void 0===t&&(t="all"),void 0===n&&(n=""),void 0===r&&(r=""),this.matches=e,this.mediaQuery=t,this.mqAlias=n,this.suffix=r}return e.prototype.clone=function(){return new e(this.matches,this.mediaQuery,this.mqAlias,this.suffix)},e}(),Cp=function(){function e(e,t,n){this._zone=e,this._platformId=t,this._document=n,this._registry=new Map,this._source=new sp(new Sp(!0)),this._observable$=this._source.asObservable()}return e.prototype.isActive=function(e){var t=this._registry.get(e);return!!t&&t.matches},e.prototype.observe=function(e){return e&&this.registerQuery(e),this._observable$.pipe(Gu(function(t){return!e||t.mediaQuery===e}))},e.prototype.registerQuery=function(e){var t=this,n=function(e){return void 0===e?[]:"string"==typeof e?[e]:(t={},e.filter(function(e){return!t.hasOwnProperty(e)&&(t[e]=!0)}));var t}(e);n.length>0&&(this._prepareQueryCSS(n,this._document),n.forEach(function(e){var n=t._registry.get(e),r=function(n){t._zone.run(function(){var r=new Sp(n.matches,e);t._source.next(r)})};n||((n=t._buildMQL(e)).addListener(r),t._registry.set(e,n)),n.matches&&r(n)}))},e.prototype._buildMQL=function(e){return ou(this._platformId)&&window.matchMedia("all").addListener?window.matchMedia(e):{matches:"all"===e||""===e,media:e,addListener:function(){},removeListener:function(){}}},e.prototype._prepareQueryCSS=function(e,t){var n=e.filter(function(e){return!xp[e]});if(n.length>0){var r=n.join(", ");try{var i=t.createElement("style");i.setAttribute("type","text/css"),i.styleSheet||i.appendChild(t.createTextNode("\n/*\n @angular/flex-layout - workaround for possible browser quirk with mediaQuery listeners\n see http://bit.ly/2sd4HMP\n*/\n@media "+r+" {.fx-query-test{ }}\n")),t.head.appendChild(i),n.forEach(function(e){return xp[e]=i})}catch(e){console.error(e)}}},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Vt),Xe(gt),Xe(nu))},token:e,providedIn:"root"}),e}(),xp={};function Op(e,t){return yp(e,t?{mqAlias:t.alias,suffix:t.suffix}:{})}var Tp=function(){},Ip=function(){function e(e,t){this.breakpoints=e,this.mediaWatcher=t,this.filterOverlaps=!0,this._registerBreakPoints(),this.observable$=this._buildObservable()}return e.prototype.isActive=function(e){var t=this._toMediaQuery(e);return this.mediaWatcher.isActive(t)},e.prototype.subscribe=function(e,t,n){return this.observable$.subscribe(e,t,n)},e.prototype.asObservable=function(){return this.observable$},e.prototype._registerBreakPoints=function(){var e=this.breakpoints.sortedItems.map(function(e){return e.mediaQuery});this.mediaWatcher.registerQuery(e)},e.prototype._buildObservable=function(){var e=this,t=this;return this.mediaWatcher.observe().pipe(Gu(function(e){return!0===e.matches}),Gu(function(n){var r=e.breakpoints.findByQuery(n.mediaQuery);return!r||!(t.filterOverlaps&&r.overlapping)}),F(function(t){return Op(t,e._findByQuery(t.mediaQuery))}))},e.prototype._findByAlias=function(e){return this.breakpoints.findByAlias(e)},e.prototype._findByQuery=function(e){return this.breakpoints.findByQuery(e)},e.prototype._toMediaQuery=function(e){var t=this._findByAlias(e)||this._findByQuery(e);return t?t.mediaQuery:e},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Ep),Xe(Cp))},token:e,providedIn:"root"}),e}(),kp=function(){},Ap=function(){function e(){this.stylesheet=new Map}return e.prototype.addStyleToElement=function(e,t,n){var r=this.stylesheet.get(e);r?r.set(t,n):this.stylesheet.set(e,new Map([[t,n]]))},e.prototype.clearStyles=function(){this.stylesheet.clear()},e.prototype.getStyleForElement=function(e,t){var n=this.stylesheet.get(e),r="";if(n){var i=n.get(t);"number"!=typeof i&&"string"!=typeof i||(r=i+"")}return r},e.ngInjectableDef=ce({factory:function(){return new e},token:e,providedIn:"root"}),e}(),Pp=new de("Flex Layout token, should flex stylings be applied to parents automatically",{providedIn:"root",factory:function(){return!1}}),Rp=new de("FlexLayoutServerLoaded",{providedIn:"root",factory:function(){return!1}}),Mp=new de("Flex Layout token, whether to add vendor prefix styles inline for elements",{providedIn:"root",factory:function(){return!1}}),Np=["row","column","row-reverse","column-reverse"],Dp=function(){function e(e,t,n){this._options=e,this._mediaMonitor=t,this._onMediaChanges=n,this._subscribers=[],this._registryMap=this._buildRegistryMap(),this._subscribers=this._configureChangeObservers()}return Object.defineProperty(e.prototype,"registryFromLargest",{get:function(){return this._registryMap.slice().reverse()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mediaMonitor",{get:function(){return this._mediaMonitor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedInputKey",{get:function(){return this._activatedInputKey||this._options.baseKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedInput",{get:function(){var e=this.activatedInputKey;return this.hasKeyValue(e)?this._lookupKeyValue(e):this._options.defaultValue},enumerable:!0,configurable:!0}),e.prototype.hasKeyValue=function(e){return void 0!==this._options.inputKeys[e]},e.prototype.destroy=function(){this._subscribers.forEach(function(e){e.unsubscribe()}),this._subscribers=[]},e.prototype._configureChangeObservers=function(){var e=this,t=[];return this._registryMap.forEach(function(n){e._keyInUse(n.key)&&t.push(e.mediaMonitor.observe(n.alias).pipe(F(function(t){return(t=t.clone()).property=e._options.baseKey,t})).subscribe(function(t){e._onMonitorEvents(t)}))}),t},e.prototype._buildRegistryMap=function(){var e=this;return this.mediaMonitor.breakpoints.map(function(t){return yp({},t,{baseKey:e._options.baseKey,key:e._options.baseKey+t.suffix})}).filter(function(t){return e._keyInUse(t.key)})},e.prototype._onMonitorEvents=function(e){e.property==this._options.baseKey&&(e.value=this._calculateActivatedValue(e),this._onMediaChanges(e))},e.prototype._keyInUse=function(e){return void 0!==this._lookupKeyValue(e)},e.prototype._calculateActivatedValue=function(e){var t=this._options.baseKey+e.suffix,n=this._activatedInputKey;return this._activatedInputKey=this._validateInputKey(n=e.matches?t:n==t?"":n),this.activatedInput},e.prototype._validateInputKey=function(e){var t=this,n=function(e){return!t._keyInUse(e)};return n(e)&&this.mediaMonitor.activeOverlaps.some(function(r){var i=t._options.baseKey+r.suffix;return!n(i)&&(e=i,!0)}),e},e.prototype._lookupKeyValue=function(e){return this._options.inputKeys[e]},e}(),jp=function(){function e(e,t,n){this._mediaMonitor=e,this._elementRef=t,this._styler=n,this._inputMap={},this._hasInitialized=!1}return Object.defineProperty(e.prototype,"hasMediaQueryListener",{get:function(){return!!this._mqActivation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedValue",{get:function(){return this._mqActivation?this._mqActivation.activatedInput:void 0},set:function(e){var t,n="baseKey";this._mqActivation&&(t=this._inputMap[n=this._mqActivation.activatedInputKey],this._inputMap[n]=e);var r,i=new Tn(t,e,!1);this.ngOnChanges(((r={})[n]=i,r))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this._elementRef.nativeElement.parentNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return this._elementRef.nativeElement},enumerable:!0,configurable:!0}),e.prototype._queryInput=function(e){return this._inputMap[e]},e.prototype.ngOnInit=function(){this._display=this._getDisplayStyle(),this._hasInitialized=!0},e.prototype.ngOnChanges=function(e){throw new Error("BaseFxDirective::ngOnChanges should be overridden in subclass: "+e)},e.prototype.ngOnDestroy=function(){this._mqActivation&&this._mqActivation.destroy(),delete this._mediaMonitor},e.prototype._getDefaultVal=function(e,t){var n=this._queryInput(e);return void 0!==n&&null!==n&&""!==n?n:t},e.prototype._getDisplayStyle=function(e){return void 0===e&&(e=this.nativeElement),this._styler.lookupStyle(e,"display")},e.prototype._getAttributeValue=function(e,t){return void 0===t&&(t=this.nativeElement),this._styler.lookupAttributeValue(t,e)},e.prototype._getFlowDirection=function(e,t){void 0===t&&(t=!1);var n,r="row";if(e&&(r=(n=this._styler.getFlowDirection(e))[0],!n[1]&&t)){var i=function(e){var t,n,r=function(e){var t=(e=e?e.toLowerCase():"").split(" "),n=t[0],r=t[1],i=t[2];return Np.find(function(e){return e===n})||(n=Np[0]),"inline"===r&&(r="inline"!==i?i:"",i="inline"),[n,function(e){if(e)switch(e.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":e="wrap-reverse";break;case"no":case"none":case"nowrap":e="nowrap";break;default:e="wrap"}return e}(r),!!i]}(e);return n=r[2],void 0===(t=r[1])&&(t=null),void 0===n&&(n=!1),{display:n?"inline-flex":"flex","box-sizing":"border-box","flex-direction":r[0],"flex-wrap":t||null}}(r);this._styler.applyStyleToElements(i,[e])}return r.trim()||"row"},e.prototype._applyStyleToElement=function(e,t,n){void 0===n&&(n=this.nativeElement),this._styler.applyStyleToElement(n,e,t)},e.prototype._applyStyleToElements=function(e,t){this._styler.applyStyleToElements(e,t)},e.prototype._cacheInput=function(e,t){if("object"==typeof t)for(var n in t)this._inputMap[n]=t[n];else e&&(this._inputMap[e]=t)},e.prototype._listenForMediaQueryChanges=function(e,t,n){if(!this._mqActivation){var r=new function(e,t,n){this.baseKey=e,this.defaultValue=t,this.inputKeys=n}(e,t,this._inputMap);this._mqActivation=new Dp(r,this._mediaMonitor,function(e){return n(e)})}return this._mqActivation},Object.defineProperty(e.prototype,"childrenNodes",{get:function(){for(var e=this.nativeElement.children,t=[],n=e.length;n--;)t[n]=e[n];return t},enumerable:!0,configurable:!0}),e.prototype.hasResponsiveAPI=function(e){return Object.keys(this._inputMap).length-(this._inputMap[e]?1:0)>0},e.prototype.hasKeyValue=function(e){return this._mqActivation.hasKeyValue(e)},Object.defineProperty(e.prototype,"hasInitialized",{get:function(){return this._hasInitialized},enumerable:!0,configurable:!0}),e}(),Lp=function(){function e(e,t){this._breakpoints=e,this._matchMedia=t,this._registerBreakpoints()}return Object.defineProperty(e.prototype,"breakpoints",{get:function(){return this._breakpoints.items.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeOverlaps",{get:function(){var e=this;return this._breakpoints.overlappings.reverse().filter(function(t){return e._matchMedia.isActive(t.mediaQuery)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){var e=this,t=null;this.breakpoints.reverse().forEach(function(n){""!==n.alias&&!t&&e._matchMedia.isActive(n.mediaQuery)&&(t=n)});var n=this.breakpoints[0];return t||(this._matchMedia.isActive(n.mediaQuery)?n:null)},enumerable:!0,configurable:!0}),e.prototype.isActive=function(e){var t=this._breakpoints.findByAlias(e)||this._breakpoints.findByQuery(e);return this._matchMedia.isActive(t?t.mediaQuery:e)},e.prototype.observe=function(e){var t=this._breakpoints.findByAlias(e||"")||this._breakpoints.findByQuery(e||"");return this._matchMedia.observe(t?t.mediaQuery:e).pipe(F(function(e){return Op(e,t)}),Gu(function(e){return!t||""!==e.mqAlias}))},e.prototype._registerBreakpoints=function(){var e=this._breakpoints.sortedItems.map(function(e){return e.mediaQuery});this._matchMedia.registerQuery(e)},e.ngInjectableDef=ce({factory:function(){return new e(Xe(Ep),Xe(Cp))},token:e,providedIn:"root"}),e}();function Vp(e){for(var t in e){var n=e[t]||"";switch(t){case"display":e.display="flex"===n?["-webkit-flex","flex"]:"inline-flex"===n?["-webkit-inline-flex","inline-flex"]:n;break;case"align-items":case"align-self":case"align-content":case"flex":case"flex-basis":case"flex-flow":case"flex-grow":case"flex-shrink":case"flex-wrap":case"justify-content":e["-webkit-"+t]=n;break;case"flex-direction":e["-webkit-flex-direction"]=n=n||"row",e["flex-direction"]=n;break;case"order":e.order=e["-webkit-"+t]=isNaN(n)?"0":n}}return e}var Fp=function(){function e(e,t,n,r){this._serverStylesheet=e,this._serverModuleLoaded=t,this._platformId=n,this.noVendorPrefixes=r}return e.prototype.applyStyleToElement=function(e,t,n){var r={};"string"==typeof t&&(r[t]=n,t=r),r=this.noVendorPrefixes?t:Vp(t),this._applyMultiValueStyleToElement(r,e)},e.prototype.applyStyleToElements=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.noVendorPrefixes?e:Vp(e);t.forEach(function(e){n._applyMultiValueStyleToElement(r,e)})},e.prototype.getFlowDirection=function(e){var t=this.lookupStyle(e,"flex-direction");t===zp&&(t="");var n=this.lookupInlineStyle(e,"flex-direction")||su(this._platformId)&&this._serverModuleLoaded?t:"";return[t||"row",n]},e.prototype.lookupAttributeValue=function(e,t){return e.getAttribute(t)||""},e.prototype.lookupInlineStyle=function(e,t){return e.style[t]||e.style.getPropertyValue(t)||""},e.prototype.lookupStyle=function(e,t,n){void 0===n&&(n=!1);var r="";return e&&((r=this.lookupInlineStyle(e,t))||(ou(this._platformId)?n||(r=getComputedStyle(e).getPropertyValue(t)):this._serverModuleLoaded&&(r=this._serverStylesheet.getStyleForElement(e,t)))),r?r.trim():zp},e.prototype._applyMultiValueStyleToElement=function(e,t){var n=this;Object.keys(e).sort().forEach(function(r){var i=Array.isArray(e[r])?e[r]:[e[r]];i.sort();for(var o=0,s=i;o0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(Du),Hp=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(Lu))(Up);function Gp(e,t){return new x(t?function(n){return t.schedule(Wp,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function Wp(e){e.subscriber.error(e.error)}var qp=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Cu(this.value);case"E":return Gp(this.error);case"C":return Su()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),Qp=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return r.__extends(t,e),t.dispatch=function(e){e.notification.observe(e.destination),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.add(this.scheduler.schedule(t.dispatch,this.delay,new Zp(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(qp.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(qp.createError(e))},t.prototype._complete=function(){this.scheduleMessage(qp.createComplete())},t}(b),Zp=function(e,t){this.notification=e,this.destination=t},Yp=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.__extends(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new Kp(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new K;if(this.isStopped||this.hasError?t=g.EMPTY:(this.observers.push(e),t=new X(this,e)),i&&e.add(e=new Qp(e,i)),n)for(var s=0;st&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(ee),Kp=function(e,t){this.time=e,this.value=t},Xp="inline",Jp=["row","column","row-reverse","column-reverse"];function $p(e){var t=(e=e?e.toLowerCase():"").split(" "),n=t[0],r=t[1],i=t[2];return Jp.find(function(e){return e===n})||(n=Jp[0]),r===Xp&&(r=i!==Xp?i:"",i=Xp),[n,function(e){if(e)switch(e.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":e="wrap-reverse";break;case"no":case"none":case"nowrap":e="nowrap";break;default:e="wrap"}return e}(r),!!i]}function eh(e){return $p(e)[0].indexOf("row")>-1}var th=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i._announcer=new Yp(1),i.layout$=i._announcer.asObservable(),i}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"layout",{set:function(e){this._cacheInput("layout",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutXs",{set:function(e){this._cacheInput("layoutXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutSm",{set:function(e){this._cacheInput("layoutSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutMd",{set:function(e){this._cacheInput("layoutMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutLg",{set:function(e){this._cacheInput("layoutLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutXl",{set:function(e){this._cacheInput("layoutXl",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutGtXs",{set:function(e){this._cacheInput("layoutGtXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutGtSm",{set:function(e){this._cacheInput("layoutGtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutGtMd",{set:function(e){this._cacheInput("layoutGtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutGtLg",{set:function(e){this._cacheInput("layoutGtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutLtSm",{set:function(e){this._cacheInput("layoutLtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutLtMd",{set:function(e){this._cacheInput("layoutLtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutLtLg",{set:function(e){this._cacheInput("layoutLtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutLtXl",{set:function(e){this._cacheInput("layoutLtXl",e)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(e){(null!=e.layout||this._mqActivation)&&this._updateWithDirection()},t.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this._listenForMediaQueryChanges("layout","row",function(e){t._updateWithDirection(e.value)}),this._updateWithDirection()},t.prototype._updateWithDirection=function(e){e=e||this._queryInput("layout")||"row",this._mqActivation&&(e=this._mqActivation.activatedInput);var t=function(e){var t=$p(e);return function(e,n,r){return void 0===n&&(n=null),void 0===r&&(r=!1),{display:r?"inline-flex":"flex","box-sizing":"border-box","flex-direction":t[0],"flex-wrap":n||null}}(0,t[1],t[2])}(e||"");this._applyStyleToElement(t),this._announcer.next({direction:t["flex-direction"],wrap:!!t["flex-wrap"]&&"nowrap"!==t["flex-wrap"]})},t}(jp),nh=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t,n,s)||this;return a._zone=i,a._directionality=o,a._layout="row",r&&(a._layoutWatcher=r.layout$.subscribe(a._onLayoutChange.bind(a))),a._directionWatcher=a._directionality.change.subscribe(a._updateWithValue.bind(a)),a}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"gap",{set:function(e){this._cacheInput("gap",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapXs",{set:function(e){this._cacheInput("gapXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapSm",{set:function(e){this._cacheInput("gapSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapMd",{set:function(e){this._cacheInput("gapMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapLg",{set:function(e){this._cacheInput("gapLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapXl",{set:function(e){this._cacheInput("gapXl",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapGtXs",{set:function(e){this._cacheInput("gapGtXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapGtSm",{set:function(e){this._cacheInput("gapGtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapGtMd",{set:function(e){this._cacheInput("gapGtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapGtLg",{set:function(e){this._cacheInput("gapGtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapLtSm",{set:function(e){this._cacheInput("gapLtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapLtMd",{set:function(e){this._cacheInput("gapLtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapLtLg",{set:function(e){this._cacheInput("gapLtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gapLtXl",{set:function(e){this._cacheInput("gapLtXl",e)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(e){(null!=e.gap||this._mqActivation)&&this._updateWithValue()},t.prototype.ngAfterContentInit=function(){var e=this;this._watchContentChanges(),this._listenForMediaQueryChanges("gap","0",function(t){e._updateWithValue(t.value)}),this._updateWithValue()},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this._layoutWatcher&&this._layoutWatcher.unsubscribe(),this._observer&&this._observer.disconnect(),this._directionWatcher&&this._directionWatcher.unsubscribe()},t.prototype._watchContentChanges=function(){var e=this;this._zone.runOutsideAngular(function(){"undefined"!=typeof MutationObserver&&(e._observer=new MutationObserver(function(t){t.some(function(e){return e.addedNodes&&e.addedNodes.length>0||e.removedNodes&&e.removedNodes.length>0})&&e._updateWithValue()}),e._observer.observe(e.nativeElement,{childList:!0}))})},t.prototype._onLayoutChange=function(e){var t=this;this._layout=(e.direction||"").toLowerCase(),Jp.find(function(e){return e===t._layout})||(this._layout="row"),this._updateWithValue()},t.prototype._updateWithValue=function(e){var t=this,n=e||this._queryInput("gap")||"0";this._mqActivation&&(n=this._mqActivation.activatedInput);var r=this.childrenNodes.filter(function(e){return 1===e.nodeType&&"none"!=t._getDisplayStyle(e)}).sort(function(e,n){var r=+t._styler.lookupStyle(e,"order"),i=+t._styler.lookupStyle(n,"order");return isNaN(r)||isNaN(i)||r===i?0:r>i?1:-1});if(r.length>0)if(n.endsWith(rh))n=n.substring(0,n.indexOf(rh)),this._applyStyleToElements(this._buildGridPadding(n),r),this._applyStyleToElement(this._buildGridMargin(n));else{var i=r.pop();this._applyStyleToElements(this._buildCSS(n),r),this._applyStyleToElements(this._buildCSS(),[i])}},t.prototype._buildGridPadding=function(e){var t="0px",n="0px";return"rtl"===this._directionality.value?n=e:t=e,{padding:"0px "+t+" "+e+" "+n}},t.prototype._buildGridMargin=function(e){var t="0px",n="0px";return"rtl"===this._directionality.value?n="-"+e:t="-"+e,{margin:"0px "+t+" -"+e+" "+n}},t.prototype._buildCSS=function(e){void 0===e&&(e=null);var t,n={"margin-left":null,"margin-right":null,"margin-top":null,"margin-bottom":null};switch(this._layout){case"column":t="margin-bottom";break;case"column-reverse":t="margin-top";break;case"row":t="rtl"===this._directionality.value?"margin-left":"margin-right";break;case"row-reverse":t="rtl"===this._directionality.value?"margin-right":"margin-left";break;default:t="rtl"===this._directionality.value?"margin-left":"margin-right"}return n[t]=e,n},t}(jp),rh=" grid";function ih(e){for(var t=[],n=1;n0)r[2]=Bp(e.substring(i).trim()),2==(o=e.substr(0,i).trim().split(" ")).length&&(r[0]=o[0],r[1]=o[1]);else if(0==i)r[2]=Bp(e.trim());else{var o;r=3===(o=e.split(" ")).length?o:[t,n,e]}return r}(String(t).replace(";",""),this._queryInput("grow"),this._queryInput("shrink"));this._applyStyleToElement(this._validateValue.apply(this,n))},t.prototype._validateValue=function(e,t,n){var r=this._getFlowDirection(this.parentElement,!!this.addFlexStyles).indexOf("column")>-1?"column":"row",i=eh(r)?"max-width":"max-height",o=eh(r)?"min-width":"min-height",s=String(n).indexOf("calc")>-1,a=s||"auto"==n,u=String(n).indexOf("%")>-1&&!s,l=String(n).indexOf("px")>-1||String(n).indexOf("em")>-1||String(n).indexOf("vw")>-1||String(n).indexOf("vh")>-1,c=String(n).indexOf("px")>-1||a,d=s||l;e="0"==e?0:e,t="0"==t?0:t;var p=!e&&!t,h={},f={"max-width":null,"max-height":null,"min-width":null,"min-height":null};switch(n||""){case"":n="row"===r?"0%":"auto";break;case"initial":case"nogrow":e=0,n="auto";break;case"grow":n="100%";break;case"noshrink":t=0,n="auto";break;case"auto":break;case"none":e=0,t=0,n="auto";break;default:d||u||isNaN(n)||(n+="%"),"0%"===n&&(d=!0),"0px"===n&&(n="0%"),h=ih(f,s?{"flex-grow":e,"flex-shrink":t,"flex-basis":d?n:"100%"}:{flex:e+" "+t+" "+(d?n:"100%")})}return h.flex||h["flex-grow"]||(h=ih(f,s?{"flex-grow":e,"flex-shrink":t,"flex-basis":n}:{flex:e+" "+t+" "+n})),"0%"!==n&&(h[o]=p||c&&e?n:null,h[i]=p||!a&&t?n:null),h[o]||h[i]?this._layout&&this._layout.wrap&&(h[s?"flex-basis":"flex"]=h[i]?s?h[i]:e+" "+t+" "+h[i]:s?h[o]:e+" "+t+" "+h[o]):h=ih(f,s?{"flex-grow":e,"flex-shrink":t,"flex-basis":n}:{flex:e+" "+t+" "+n}),ih(h,{"box-sizing":"border-box"})},t}(jp),sh=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"order",{set:function(e){this._cacheInput("order",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderXs",{set:function(e){this._cacheInput("orderXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderSm",{set:function(e){this._cacheInput("orderSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderMd",{set:function(e){this._cacheInput("orderMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderLg",{set:function(e){this._cacheInput("orderLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderXl",{set:function(e){this._cacheInput("orderXl",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderGtXs",{set:function(e){this._cacheInput("orderGtXs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderGtSm",{set:function(e){this._cacheInput("orderGtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderGtMd",{set:function(e){this._cacheInput("orderGtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderGtLg",{set:function(e){this._cacheInput("orderGtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderLtSm",{set:function(e){this._cacheInput("orderLtSm",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderLtMd",{set:function(e){this._cacheInput("orderLtMd",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderLtLg",{set:function(e){this._cacheInput("orderLtLg",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orderLtXl",{set:function(e){this._cacheInput("orderLtXl",e)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(e){(null!=e.order||this._mqActivation)&&this._updateWithValue()},t.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this._listenForMediaQueryChanges("order","0",function(e){t._updateWithValue(e.value)}),this._updateWithValue()},t.prototype._updateWithValue=function(e){e=e||this._queryInput("order")||"0",this._mqActivation&&(e=this._mqActivation.activatedInput),this._applyStyleToElement(this._buildCSS(e))},t.prototype._buildCSS=function(e){return e=parseInt(e,10),{order:isNaN(e)?0:e}},t}(jp),ah=function(){},uh=function(){},lh=function(){},ch=function(){},dh=function(){},ph=Lr({encapsulation:2,styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:block;position:relative;padding:24px;border-radius:2px}.mat-card:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-card .mat-divider{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider{left:auto;right:0}.mat-card .mat-divider.mat-divider-inset{position:static;margin:0}.mat-card.mat-card-flat{box-shadow:none}@media screen and (-ms-high-contrast:active){.mat-card{outline:solid 1px}}.mat-card-actions,.mat-card-content,.mat-card-subtitle,.mat-card-title{display:block;margin-bottom:16px}.mat-card-actions{margin-left:-16px;margin-right:-16px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 48px);margin:0 -24px 16px -24px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-footer{display:block;margin:0 -24px -24px -24px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button{margin:0 4px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header-text{margin:0 8px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0}.mat-card-lg-image,.mat-card-md-image,.mat-card-sm-image{margin:-8px 0}.mat-card-title-group{display:flex;justify-content:space-between;margin:0 -8px}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}@media (max-width:599px){.mat-card{padding:24px 16px}.mat-card-actions{margin-left:-8px;margin-right:-8px}.mat-card-image{width:calc(100% + 32px);margin:16px -16px}.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}.mat-card-header{margin:-8px 0 0 0}.mat-card-footer{margin-left:-16px;margin-right:-16px}}.mat-card-content>:first-child,.mat-card>:first-child{margin-top:0}.mat-card-content>:last-child:not(.mat-card-footer),.mat-card>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-24px}.mat-card>.mat-card-actions:last-child{margin-bottom:-16px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child{margin-left:0;margin-right:0}.mat-card-subtitle:not(:first-child),.mat-card-title:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],data:{}});function hh(e){return Oo(2,[wo(null,0),wo(null,1)],null,null)}function fh(){for(var e,t=[],n=0;ne?{max:{max:e,actual:t.value}}:null}},e.required=function(e){return vh(e.value)?{required:!0}:null},e.requiredTrue=function(e){return!0===e.value?null:{required:!0}},e.email=function(e){return vh(e.value)?null:_h.test(e.value)?null:{email:!0}},e.minLength=function(e){return function(t){if(vh(t.value))return null;var n=t.value?t.value.length:0;return ne?{maxlength:{requiredLength:e,actualLength:n}}:null}},e.pattern=function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(vh(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r},e.nullValidator=function(e){return null},e.compose=function(e){if(!e)return null;var t=e.filter(Eh);return 0==t.length?null:function(e){return Ch(function(e,n){return t.map(function(t){return t(e)})}(e))}},e.composeAsync=function(e){if(!e)return null;var t=e.filter(Eh);return 0==t.length?null:function(e){return fh(function(e,n){return t.map(function(t){return t(e)})}(e).map(Sh)).pipe(F(Ch))}},e}();function Eh(e){return null!=e}function Sh(e){var t=ut(e)?H(e):e;if(!lt(t))throw new Error("Expected validator to return Promise or Observable.");return t}function Ch(e){var t=e.reduce(function(e,t){return null!=t?Object(r.__assign)({},e,t):e},{});return 0===Object.keys(t).length?null:t}var xh=new de("NgValueAccessor"),Oh=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}(),Th=new de("CompositionEventMode"),Ih=function(){function e(e,t,n){var r;this._renderer=e,this._elementRef=t,this._compositionMode=n,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Wl()?Wl().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._handleInput=function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this.onChange(e)},e}();function kh(e){return e.validate?function(t){return e.validate(t)}:e}function Ah(e){return e.validate?function(t){return e.validate(t)}:e}var Ph=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}();function Rh(){throw new Error("unimplemented")}var Mh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return Rh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Rh()},enumerable:!0,configurable:!0}),t}(gh),Nh=function(){function e(){this._accessors=[]}return e.prototype.add=function(e,t){this._accessors.push([e,t])},e.prototype.remove=function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)},e.prototype.select=function(e){var t=this;this._accessors.forEach(function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})},e.prototype._isSameGroup=function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name},e}(),Dh=function(){function e(e,t,n,r){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){this._control=this._injector.get(Mh),this._checkName(),this._registry.add(this._control,this)},e.prototype.ngOnDestroy=function(){this._registry.remove(this)},e.prototype.writeValue=function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},e.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}},e.prototype.fireUncheck=function(e){this.writeValue(e)},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},e.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')},e}(),jh=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}(),Lh='\n

\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',Vh='\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',Fh='\n
\n
\n \n
\n
',zh=function(){function e(){}return e.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+Lh)},e.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+Vh+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+Fh)},e.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+Lh)},e.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+Vh)},e.arrayParentException=function(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')},e.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},e.ngModelWarning=function(e){console.warn("\n It looks like you're using ngModel on the same form field as "+e+". \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/"+("formControl"===e?"FormControlDirective":"FormControlName")+"#use-with-ngmodel\n ")},e}();function Bh(e,t){return Object(r.__spread)(t.path,[e])}function Uh(e,t){e||qh(t,"Cannot find control with"),t.valueAccessor||qh(t,"No value accessor for form control with"),e.validator=wh.compose([e.validator,t.validator]),e.asyncValidator=wh.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange(function(n){e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&Hh(e,t)})}(e,t),function(e,t){e.registerOnChange(function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(function(){e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&Hh(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(function(e){t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})}),t._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})})}function Hh(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Gh(e,t){null==e&&qh(t,"Cannot find control with"),e.validator=wh.compose([e.validator,t.validator]),e.asyncValidator=wh.composeAsync([e.asyncValidator,t.asyncValidator])}function Wh(e){return qh(e,"There is no FormControl instance attached to form control element with")}function qh(e,t){var n;throw n=e.path.length>1?"path: '"+e.path.join(" -> ")+"'":e.path[0]?"name: '"+e.path+"'":"unspecified name attribute",new Error(t+" "+n)}function Qh(e){return null!=e?wh.compose(e.map(kh)):null}function Zh(e){return null!=e?wh.composeAsync(e.map(Ah)):null}var Yh=[Oh,jh,Ph,function(){function e(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Se}return Object.defineProperty(e.prototype,"compareWith",{set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),(e+": "+t).slice(0,50))}(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},e.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._registerOption=function(){return(this._idCounter++).toString()},e.prototype._getOptionId=function(e){try{for(var t=Object(r.__values)(Array.from(this._optionMap.keys())),n=t.next();!n.done;n=t.next()){var i=n.value;if(this._compareWith(this._optionMap.get(i),e))return i}}catch(e){o={error:e}}finally{try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(o)throw o.error}}return null;var o,s},e.prototype._getOptionValue=function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e},e}(),function(){function e(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Se}return Object.defineProperty(e.prototype,"compareWith",{set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){var t,n=this;if(this.value=e,Array.isArray(e)){var r=e.map(function(e){return n._getOptionId(e)});t=function(e,t){e._setSelected(r.indexOf(t.toString())>-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)},e.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o-1&&e.splice(n,1)}var Jh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},t.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return Bh(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return Qh(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Zh(this._asyncValidators)},enumerable:!0,configurable:!0}),t.prototype._checkParentType=function(){},t}(yh),$h=function(){function e(e){this._cd=e}return Object.defineProperty(e.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),e}(),ef=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t}($h),tf=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t}($h);function nf(e){var t=of(e)?e.validators:e;return Array.isArray(t)?Qh(t):t||null}function rf(e,t){var n=of(t)?t.asyncValidators:e;return Array.isArray(n)?Zh(n):n||null}function of(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var sf=function(){function e(e,t){this.validator=e,this.asyncValidator=t,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return"VALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"invalid",{get:function(){return"INVALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return"PENDING"==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return"DISABLED"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return"DISABLED"!==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),e.prototype.setValidators=function(e){this.validator=nf(e)},e.prototype.setAsyncValidators=function(e){this.asyncValidator=rf(e)},e.prototype.clearValidators=function(){this.validator=null},e.prototype.clearAsyncValidators=function(){this.asyncValidator=null},e.prototype.markAsTouched=function(e){void 0===e&&(e={}),this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)},e.prototype.markAsUntouched=function(e){void 0===e&&(e={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)},e.prototype.markAsDirty=function(e){void 0===e&&(e={}),this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)},e.prototype.markAsPristine=function(e){void 0===e&&(e={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)},e.prototype.markAsPending=function(e){void 0===e&&(e={}),this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)},e.prototype.disable=function(e){void 0===e&&(e={}),this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable(Object(r.__assign)({},e,{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(e),this._onDisabledChange.forEach(function(e){return e(!0)})},e.prototype.enable=function(e){void 0===e&&(e={}),this.status="VALID",this._forEachChild(function(t){t.enable(Object(r.__assign)({},e,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(e),this._onDisabledChange.forEach(function(e){return e(!1)})},e.prototype._updateAncestors=function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),this._parent._updatePristine(),this._parent._updateTouched())},e.prototype.setParent=function(e){this._parent=e},e.prototype.updateValueAndValidity=function(e){void 0===e&&(e={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)},e.prototype._updateTreeValidity=function(e){void 0===e&&(e={emitEvent:!0}),this._forEachChild(function(t){return t._updateTreeValidity(e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})},e.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"},e.prototype._runValidator=function(){return this.validator?this.validator(this):null},e.prototype._runAsyncValidator=function(e){var t=this;if(this.asyncValidator){this.status="PENDING";var n=Sh(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return t.setErrors(n,{emitEvent:e})})}},e.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},e.prototype.setErrors=function(e,t){void 0===t&&(t={}),this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)},e.prototype.get=function(e){return function(e,t,n){return null==t?null:(t instanceof Array||(t=t.split(".")),t instanceof Array&&0===t.length?null:t.reduce(function(e,t){return e instanceof uf?e.controls[t]||null:e instanceof lf&&e.at(t)||null},e))}(this,e)},e.prototype.getError=function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null},e.prototype.hasError=function(e,t){return!!this.getError(e,t)},Object.defineProperty(e.prototype,"root",{get:function(){for(var e=this;e._parent;)e=e._parent;return e},enumerable:!0,configurable:!0}),e.prototype._updateControlsErrors=function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)},e.prototype._initObservables=function(){this.valueChanges=new Lt,this.statusChanges=new Lt},e.prototype._calculateStatus=function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"},e.prototype._anyControlsHaveStatus=function(e){return this._anyControls(function(t){return t.status===e})},e.prototype._anyControlsDirty=function(){return this._anyControls(function(e){return e.dirty})},e.prototype._anyControlsTouched=function(){return this._anyControls(function(e){return e.touched})},e.prototype._updatePristine=function(e){void 0===e&&(e={}),this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)},e.prototype._updateTouched=function(e){void 0===e&&(e={}),this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)},e.prototype._isBoxedValue=function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e},e.prototype._registerOnCollectionChange=function(e){this._onCollectionChange=e},e.prototype._setUpdateStrategy=function(e){of(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)},e}(),af=function(e){function t(t,n,r){void 0===t&&(t=null);var i=e.call(this,nf(n),rf(r,n))||this;return i._onChange=[],i._applyFormState(t),i._setUpdateStrategy(n),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i._initObservables(),i}return Object(r.__extends)(t,e),t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(function(e){return e(n.value,!1!==t.emitViewToModelChange)}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){void 0===t&&(t={}),this.setValue(e,t)},t.prototype.reset=function(e,t){void 0===e&&(e=null),void 0===t&&(t={}),this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1},t.prototype._updateValue=function(){},t.prototype._anyControls=function(e){return!1},t.prototype._allControlsDisabled=function(){return this.disabled},t.prototype.registerOnChange=function(e){this._onChange.push(e)},t.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},t.prototype.registerOnDisabledChange=function(e){this._onDisabledChange.push(e)},t.prototype._forEachChild=function(e){},t.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))},t.prototype._applyFormState=function(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e},t}(sf),uf=function(e){function t(t,n,r){var i=e.call(this,nf(n),rf(r,n))||this;return i.controls=t,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return Object(r.__extends)(t,e),t.prototype.registerControl=function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)},t.prototype.addControl=function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.removeControl=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.contains=function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled},t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this._checkAllValuesPresent(e),Object.keys(e).forEach(function(r){n._throwIfControlMissing(r),n.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){var n=this;void 0===t&&(t={}),Object.keys(e).forEach(function(r){n.controls[r]&&n.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.reset=function(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)},t.prototype.getRawValue=function(){return this._reduceChildren({},function(e,t,n){return e[n]=t instanceof af?t.value:t.getRawValue(),e})},t.prototype._syncPendingControls=function(){var e=this._reduceChildren(!1,function(e,t){return!!t._syncPendingControls()||e});return e&&this.updateValueAndValidity({onlySelf:!0}),e},t.prototype._throwIfControlMissing=function(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error("Cannot find form control with name: "+e+".")},t.prototype._forEachChild=function(e){var t=this;Object.keys(this.controls).forEach(function(n){return e(t.controls[n],n)})},t.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})},t.prototype._updateValue=function(){this.value=this._reduceValue()},t.prototype._anyControls=function(e){var t=this,n=!1;return this._forEachChild(function(r,i){n=n||t.contains(i)&&e(r)}),n},t.prototype._reduceValue=function(){var e=this;return this._reduceChildren({},function(t,n,r){return(n.enabled||e.disabled)&&(t[r]=n.value),t})},t.prototype._reduceChildren=function(e,t){var n=e;return this._forEachChild(function(e,r){n=t(n,e,r)}),n},t.prototype._allControlsDisabled=function(){try{for(var e=Object(r.__values)(Object.keys(this.controls)),t=e.next();!t.done;t=e.next())if(this.controls[t.value].enabled)return!1}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return Object.keys(this.controls).length>0||this.disabled;var n,i},t.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},t}(sf),lf=function(e){function t(t,n,r){var i=e.call(this,nf(n),rf(r,n))||this;return i.controls=t,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return Object(r.__extends)(t,e),t.prototype.at=function(e){return this.controls[e]},t.prototype.push=function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.insert=function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()},t.prototype.removeAt=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity()},t.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(t.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this._checkAllValuesPresent(e),e.forEach(function(e,r){n._throwIfControlMissing(r),n.at(r).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){var n=this;void 0===t&&(t={}),e.forEach(function(e,r){n.at(r)&&n.at(r).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.reset=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={}),this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)},t.prototype.getRawValue=function(){return this.controls.map(function(e){return e instanceof af?e.value:e.getRawValue()})},t.prototype._syncPendingControls=function(){var e=this.controls.reduce(function(e,t){return!!t._syncPendingControls()||e},!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e},t.prototype._throwIfControlMissing=function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)},t.prototype._forEachChild=function(e){this.controls.forEach(function(t,n){e(t,n)})},t.prototype._updateValue=function(){var e=this;this.value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})},t.prototype._anyControls=function(e){return this.controls.some(function(t){return t.enabled&&e(t)})},t.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})},t.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: "+n+".")})},t.prototype._allControlsDisabled=function(){try{for(var e=Object(r.__values)(this.controls),t=e.next();!t.done;t=e.next())if(t.value.enabled)return!1}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return this.controls.length>0||this.disabled;var n,i},t.prototype._registerControl=function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)},t}(sf),cf=Promise.resolve(null),df=function(e){function t(t,n){var r=e.call(this)||this;return r.submitted=!1,r._directives=[],r.ngSubmit=new Lt,r.form=new uf({},Qh(t),Zh(n)),r}return Object(r.__extends)(t,e),t.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this;cf.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Uh(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)})},t.prototype.getControl=function(e){return this.form.get(e.path)},t.prototype.removeControl=function(e){var t=this;cf.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name),Xh(t._directives,e)})},t.prototype.addFormGroup=function(e){var t=this;cf.then(function(){var n=t._findContainer(e.path),r=new uf({});Gh(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.removeFormGroup=function(e){var t=this;cf.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)})},t.prototype.getFormGroup=function(e){return this.form.get(e.path)},t.prototype.updateModel=function(e,t){var n=this;cf.then(function(){n.form.get(e.path).setValue(t)})},t.prototype.setValue=function(e){this.control.setValue(e)},t.prototype.onSubmit=function(e){return this.submitted=!0,Kh(this.form,this._directives),this.ngSubmit.emit(e),!1},t.prototype.onReset=function(){this.resetForm()},t.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this.submitted=!1},t.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},t.prototype._findContainer=function(e){return e.pop(),e.length?this.form.get(e):this.form},t}(yh),pf=function(){function e(){}return e.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+Lh+'\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n
\n \n \n
\n ')},e.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+Vh+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+Fh)},e.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},e.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+Vh+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+Fh)},e}(),hf=function(e){function t(t,n,r){var i=e.call(this)||this;return i._parent=t,i._validators=n,i._asyncValidators=r,i}return Object(r.__extends)(t,e),t.prototype._checkParentType=function(){this._parent instanceof t||this._parent instanceof df||pf.modelGroupParentException()},t}(Jh),ff=Promise.resolve(null),mf=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.control=new af,o._registered=!1,o.update=new Lt,o._parent=t,o._rawValidators=n||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t)||qh(e,"Value accessor was not provided as an array for form control with");var n=void 0,r=void 0,i=void 0;return t.forEach(function(t){var o;t.constructor===Ih?n=t:(o=t,Yh.some(function(e){return o.constructor===e})?(r&&qh(e,"More than one built-in value accessor matches form control with"),r=t):(i&&qh(e,"More than one custom value accessor matches form control with"),i=t))}),i||r||n||(qh(e,"No valid value accessor for form control with"),null)}(o,i),o}return Object(r.__extends)(t,e),t.prototype.ngOnChanges=function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),function(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!Se(t,n.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},t.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(t.prototype,"path",{get:function(){return this._parent?Bh(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return Qh(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Zh(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},t.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},t.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},t.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},t.prototype._setUpStandalone=function(){Uh(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},t.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},t.prototype._checkParentType=function(){!(this._parent instanceof hf)&&this._parent instanceof Jh?pf.formGroupNameException():this._parent instanceof hf||this._parent instanceof df||pf.modelParentException()},t.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||pf.missingNameException()},t.prototype._updateValue=function(e){var t=this;ff.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})},t.prototype._updateDisabled=function(e){var t=this,n=e.isDisabled.currentValue,r=""===n||n&&"false"!==n;ff.then(function(){r&&!t.control.disabled?t.control.disable():!r&&t.control.disabled&&t.control.enable()})},t}(Mh),gf=function(e){function t(t,n){var r=e.call(this)||this;return r._validators=t,r._asyncValidators=n,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new Lt,r}return Object(r.__extends)(t,e),t.prototype.ngOnChanges=function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this.form.get(e.path);return Uh(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t},t.prototype.getControl=function(e){return this.form.get(e.path)},t.prototype.removeControl=function(e){Xh(this.directives,e)},t.prototype.addFormGroup=function(e){var t=this.form.get(e.path);Gh(t,e),t.updateValueAndValidity({emitEvent:!1})},t.prototype.removeFormGroup=function(e){},t.prototype.getFormGroup=function(e){return this.form.get(e.path)},t.prototype.addFormArray=function(e){var t=this.form.get(e.path);Gh(t,e),t.updateValueAndValidity({emitEvent:!1})},t.prototype.removeFormArray=function(e){},t.prototype.getFormArray=function(e){return this.form.get(e.path)},t.prototype.updateModel=function(e,t){this.form.get(e.path).setValue(t)},t.prototype.onSubmit=function(e){return this.submitted=!0,Kh(this.form,this.directives),this.ngSubmit.emit(e),!1},t.prototype.onReset=function(){this.resetForm()},t.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this.submitted=!1},t.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(function(e,t){t.valueAccessor.registerOnChange(function(){return Wh(t)}),t.valueAccessor.registerOnTouched(function(){return Wh(t)}),t._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}(t.control,t),n&&Uh(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})},t.prototype._updateRegistrations=function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},t.prototype._updateValidators=function(){var e=Qh(this._validators);this.form.validator=wh.compose([this.form.validator,e]);var t=Zh(this._asyncValidators);this.form.asyncValidator=wh.composeAsync([this.form.asyncValidator,t])},t.prototype._checkFormPresent=function(){this.form||zh.missingFormException()},t}(yh),yf=function(){function e(){}return Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=null!=e&&!1!==e&&""+e!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),e.prototype.validate=function(e){return this.required?wh.required(e):null},e.prototype.registerOnValidatorChange=function(e){this._onChange=e},e}(),vf=function(){},bf=function(){},_f=function(){},wf=0,Ef=function(e){function t(t,n,r,i,o,s,a){var u=e.call(this,t)||this;return u._focusMonitor=r,u._changeDetectorRef=i,u._ngZone=s,u._animationMode=a,u.onChange=function(e){},u.onTouched=function(){},u._uniqueId="mat-slide-toggle-"+ ++wf,u._required=!1,u._checked=!1,u._dragging=!1,u.name=null,u.id=u._uniqueId,u.labelPosition="after",u.ariaLabel=null,u.ariaLabelledby=null,u.change=new Lt,u.tabIndex=parseInt(o)||0,u}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(e){this._required=Ea(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=Ea(e),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var e=this;this._focusMonitor.monitor(this._inputElement.nativeElement).subscribe(function(t){return e._onInputFocusChange(t)})},t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement)},t.prototype._onChangeEvent=function(e){e.stopPropagation(),this._dragging?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())},t.prototype._onInputClick=function(e){e.stopPropagation()},t.prototype.writeValue=function(e){this.checked=!!e},t.prototype.registerOnChange=function(e){this.onChange=e},t.prototype.registerOnTouched=function(e){this.onTouched=e},t.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},t.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},t.prototype.toggle=function(){this.checked=!this.checked},t.prototype._onInputFocusChange=function(e){this._focusRipple||"keyboard"!==e?e||(this.onTouched(),this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null)):this._focusRipple=this._ripple.launch(0,0,{persistent:!0})},t.prototype._emitChangeEvent=function(){this.onChange(this.checked),this.change.emit(new function(e,t){this.source=e,this.checked=t}(this,this.checked))},t.prototype._getDragPercentage=function(e){var t=e/this._thumbBarWidth*100;return this._previousChecked&&(t+=100),Math.max(0,Math.min(t,100))},t.prototype._onDragStart=function(){if(!this.disabled&&!this._dragging){var e=this._thumbEl.nativeElement;this._thumbBarWidth=this._thumbBarEl.nativeElement.clientWidth-e.clientWidth,e.classList.add("mat-dragging"),this._previousChecked=this.checked,this._dragging=!0}},t.prototype._onDrag=function(e){this._dragging&&(this._dragPercentage=this._getDragPercentage(e.deltaX),this._thumbEl.nativeElement.style.transform="translate3d("+this._dragPercentage/100*this._thumbBarWidth+"px, 0, 0)")},t.prototype._onDragEnd=function(){var e=this;if(this._dragging){var t=this._dragPercentage>50;t!==this.checked&&(this.checked=t,this._emitChangeEvent()),this._ngZone.runOutsideAngular(function(){return setTimeout(function(){e._dragging&&(e._dragging=!1,e._thumbEl.nativeElement.classList.remove("mat-dragging"),e._thumbEl.nativeElement.style.transform="")})})}},t.prototype._onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},t}(function(e,t){return void 0===t&&(t=0),function(e){function n(){for(var n=[],r=0;r *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t) *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'+e+'" is not supported'),t;var o=i[1],s=i[2],a=i[3];t.push(vm(o,a)),"<"!=s[0]||o==mm&&a==mm||t.push(vm(a,o))}(e,i,r)}):i.push(n),i),animation:o,queryCount:t.queryCount,depCount:t.depCount,options:Cm(e.options)}},e.prototype.visitSequence=function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return hm(n,e,t)}),options:Cm(e.options)}},e.prototype.visitGroup=function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=hm(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:Cm(e.options)}},e.prototype.visitAnimate=function(e,t){var n,r=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return xm($f(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=xm(0,0,"");return i.dynamic=!0,i.strValue=r,i}return xm((n=n||$f(r,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=r;var i=e.styles?e.styles:ya({});if(5==i.type)n=this.visitKeyframes(i,t);else{var o=e.styles,s=!1;if(!o){s=!0;var a={};r.easing&&(a.easing=r.easing),o=ya(a)}t.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,t);u.isEmptyStep=s,n=u}return t.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}},e.prototype.visitStyle=function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n},e.prototype._makeStyleAst=function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach(function(e){"string"==typeof e?e==ma?n.push(e):t.errors.push("The provided style string value "+e+" is not allowed."):n.push(e)}):n.push(e.styles);var r=!1,i=null;return n.forEach(function(e){if(Sm(e)){var t=e,n=t.easing;if(n&&(i=n,delete t.easing),!r)for(var o in t)if(t[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:e.offset,containsDynamicStyles:r,options:null}},e.prototype._validateStyleAst=function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var s,a,u,l=t.collectedStyles[t.currentQuerySelector],c=l[r],d=!0;c&&(o!=i&&o>=c.startTime&&i<=c.endTime&&(t.errors.push('The CSS property "'+r+'" that exists between the times of "'+c.startTime+'ms" and "'+c.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),d=!1),o=c.startTime),d&&(l[r]={startTime:o,endTime:i}),t.options&&(s=t.errors,a=t.options.params||{},(u=sm(e[r])).length&&u.forEach(function(e){a.hasOwnProperty(e)||s.push("Unable to resolve the local animation param "+e+" in the given list of values")}))}else t.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},e.prototype.visitKeyframes=function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],s=!1,a=!1,u=0,l=e.steps.map(function(e){var r=n._makeStyleAst(e,t),l=null!=r.offset?r.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(Sm(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(Sm(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),a=a||c<0||c>1,s=s||c0&&i0?i==p?1:d*i:o[i],a=s*m;t.currentTime=h+f.delay+a,f.duration=a,n._validateStyleAst(e,t),e.offset=s,r.styles.push(e)}),r},e.prototype.visitReference=function(e,t){return{type:8,animation:hm(this,im(e.animation),t),options:Cm(e.options)}},e.prototype.visitAnimateChild=function(e,t){return t.depCount++,{type:9,options:Cm(e.options)}},e.prototype.visitAnimateRef=function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Cm(e.options)}},e.prototype.visitQuery=function(e,t){var n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;var o=Object(r.__read)(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return":self"==e});return t&&(e=e.replace(bm,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),s=o[0],a=o[1];t.currentQuerySelector=n.length?n+" "+s:s,Mf(t.collectedStyles,t.currentQuerySelector,{});var u=hm(this,im(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:u,originalSelector:e.selector,options:Cm(e.options)}},e.prototype.visitStagger=function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:$f(e.timings,t.errors,!0);return{type:12,animation:hm(this,im(e.animation),t),timings:n,options:null}},e}(),Em=function(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function Sm(e){return!Array.isArray(e)&&"object"==typeof e}function Cm(e){var t;return e?(e=em(e)).params&&(e.params=(t=e.params)?em(t):null):e={},e}function xm(e,t,n){return{duration:e,delay:t,easing:n}}function Om(e,t,n,r,i,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var Tm=function(){function e(){this._map=new Map}return e.prototype.consume=function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t},e.prototype.append=function(e,t){var n=this._map.get(e);n||this._map.set(e,n=[]),n.push.apply(n,Object(r.__spread)(t))},e.prototype.has=function(e){return this._map.has(e)},e.prototype.clear=function(){this._map.clear()},e}(),Im=new RegExp(":enter","g"),km=new RegExp(":leave","g");function Am(e,t,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new Pm).buildKeyframes(e,t,n,r,i,o,s,a,u,l)}var Pm=function(){function e(){}return e.prototype.buildKeyframes=function(e,t,n,r,i,o,s,a,u,l){void 0===l&&(l=[]),u=u||new Tm;var c=new Mm(e,t,u,r,i,l,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),hm(this,n,c);var d=c.timelines.filter(function(e){return e.containsAnimation()});if(d.length&&Object.keys(s).length){var p=d[d.length-1];p.allowOnlyTimelineStyles()||p.setStyles([s],null,c.errors,a)}return d.length?d.map(function(e){return e.buildKeyframes()}):[Om(t,[],[],[],0,0,"",!1)]},e.prototype.visitTrigger=function(e,t){},e.prototype.visitState=function(e,t){},e.prototype.visitTransition=function(e,t){},e.prototype.visitAnimateChild=function(e,t){var n=t.subInstructions.consume(t.element);if(n){var r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e},e.prototype.visitAnimateRef=function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e},e.prototype._visitSubInstructions=function(e,t,n){var r=t.currentTimeline.currentTime,i=null!=n.duration?Xf(n.duration):null,o=null!=n.delay?Xf(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r},e.prototype.visitReference=function(e,t){t.updateOptions(e.options,!0),hm(this,e.animation,t),t.previousNode=e},e.prototype.visitSequence=function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Rm);var s=Xf(o.delay);i.delayNextStep(s)}e.steps.length&&(e.steps.forEach(function(e){return hm(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e},e.prototype.visitGroup=function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?Xf(e.options.delay):0;e.steps.forEach(function(s){var a=t.createSubContext(e.options);o&&a.delayNextStep(o),hm(n,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e},e.prototype._visitTiming=function(e,t){if(e.dynamic){var n=e.strValue;return $f(t.params?am(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}},e.prototype.visitAnimate=function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e},e.prototype.visitStyle=function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e},e.prototype.visitKeyframes=function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e},e.prototype.visitQuery=function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?Xf(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Rm);var s=r,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;var u=null;a.forEach(function(r,i){t.currentQueryIndex=i;var a=t.createSubContext(e.options,r);o&&a.delayNextStep(o),r===t.element&&(u=a.currentTimeline),hm(n,e.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),u&&(t.currentTimeline.mergeTimelineCollectedStyles(u),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e},e.prototype.visitStagger=function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),s=o*(t.currentQueryTotal-1),a=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var u=t.currentTimeline;a&&u.delayNextStep(a);var l=u.currentTime;hm(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},e}(),Rm={},Mm=function(){function e(e,t,n,r,i,o,s,a){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Rm,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new Nm(this._driver,t,0),s.push(this.currentTimeline)}return Object.defineProperty(e.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),e.prototype.updateOptions=function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=Xf(r.duration)),null!=r.delay&&(i.delay=Xf(r.delay));var o=r.params;if(o){var s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(e){t&&s.hasOwnProperty(e)||(s[e]=am(o[e],s,n.errors))})}}},e.prototype._copyOptions=function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach(function(e){n[e]=t[e]})}}return e},e.prototype.createSubContext=function(t,n,r){void 0===t&&(t=null);var i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},e.prototype.transformIntoNewTimeline=function(e){return this.previousNode=Rm,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline},e.prototype.appendInstructionToTimeline=function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new Dm(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r},e.prototype.incrementTime=function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)},e.prototype.delayNextStep=function(e){e>0&&this.currentTimeline.delayNextStep(e)},e.prototype.invokeQuery=function(e,t,n,i,o,s){var a=[];if(i&&a.push(this.element),e.length>0){e=(e=e.replace(Im,"."+this._enterClassName)).replace(km,"."+this._leaveClassName);var u=this._driver.query(this.element,e,1!=n);0!==n&&(u=n<0?u.slice(u.length+n,u.length):u.slice(0,n)),a.push.apply(a,Object(r.__spread)(u))}return o||0!=a.length||s.push('`query("'+t+'")` returned zero elements. (Use `query("'+t+'", { optional: true })` if you wish to allow this.)'),a},e}(),Nm=function(){function e(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}return e.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},e.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),e.prototype.delayNextStep=function(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e},e.prototype.fork=function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)},e.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},e.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},e.prototype.forwardTime=function(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()},e.prototype._updateStyle=function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}},e.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},e.prototype.applyEmptyStep=function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(function(e){t._backFill[e]=t._globalTimelineStyles[e]||ma,t._currentKeyframe[e]=ma}),this._currentEmptyStepKeyframe=this._currentKeyframe},e.prototype.setStyles=function(e,t,n,r){var i=this;t&&(this._previousKeyframe.easing=t);var o=r&&r.params||{},s=function(e,t){var n,r={};return e.forEach(function(e){"*"===e?(n=n||Object.keys(t)).forEach(function(e){r[e]=ma}):tm(e,!1,r)}),r}(e,this._globalTimelineStyles);Object.keys(s).forEach(function(e){var t=am(s[e],o,n);i._pendingStyles[e]=t,i._localTimelineStyles.hasOwnProperty(e)||(i._backFill[e]=i._globalTimelineStyles.hasOwnProperty(e)?i._globalTimelineStyles[e]:ma),i._updateStyle(e,t)})},e.prototype.applyStylesToKeyframe=function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){e._currentKeyframe[n]=t[n]}),Object.keys(this._localTimelineStyles).forEach(function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])}))},e.prototype.snapshotCurrentStyles=function(){var e=this;Object.keys(this._localTimelineStyles).forEach(function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)})},e.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(e.prototype,"properties",{get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e},enumerable:!0,configurable:!0}),e.prototype.mergeTimelineCollectedStyles=function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})},e.prototype.buildKeyframes=function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,s){var a=tm(o,!0);Object.keys(a).forEach(function(e){var r=a[e];r==wa?t.add(e):r==ma&&n.add(e)}),r||(a.offset=s/e.duration),i.push(a)});var o=t.size?um(t.values()):[],s=n.size?um(n.values()):[];if(r){var a=i[0],u=em(a);a.offset=0,u.offset=1,i=[a,u]}return Om(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)},e}(),Dm=function(e){function t(t,n,r,i,o,s,a){void 0===a&&(a=!1);var u=e.call(this,t,n,s.delay)||this;return u.element=n,u.keyframes=r,u.preStyleProps=i,u.postStyleProps=o,u._stretchStartingKeyframe=a,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return Object(r.__extends)(t,e),t.prototype.containsAnimation=function(){return this.keyframes.length>1},t.prototype.buildKeyframes=function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=r+n,a=n/s,u=tm(e[0],!1);u.offset=0,o.push(u);var l=tm(e[0],!1);l.offset=jm(a),o.push(l);for(var c=e.length-1,d=1;d<=c;d++){var p=tm(e[d],!1);p.offset=jm((n+p.offset*r)/s),o.push(p)}r=s,n=0,i="",e=o}return Om(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)},t}(Nm);function jm(e,t){void 0===t&&(t=3);var n=Math.pow(10,t-1);return Math.round(e*n)/n}var Lm=function(){},Vm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.normalizePropertyName=function(e,t){return cm(e)},t.prototype.normalizeStyleValue=function(e,t,n,r){var i="",o=n.toString().trim();if(Fm[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push("Please provide a CSS unit value for "+e+":"+n)}return o+i},t}(Lm),Fm=function(e){var t={};return"width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",").forEach(function(e){return t[e]=!0}),t}();function zm(e,t,n,r,i,o,s,a,u,l,c,d,p){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:d,errors:p}}var Bm={},Um=function(){function e(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}return e.prototype.match=function(e,t,n,r){return function(e,t,n,r,i){return e.some(function(e){return e(t,n,r,i)})}(this.ast.matchers,e,t,n,r)},e.prototype.buildStyles=function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o},e.prototype.build=function(e,t,n,i,o,s,a,u,l){var c=[],d=this.ast.options&&this.ast.options.params||Bm,p=this.buildStyles(n,a&&a.params||Bm,c),h=u&&u.params||Bm,f=this.buildStyles(i,h,c),m=new Set,g=new Map,y=new Map,v="void"===i,b={params:Object(r.__assign)({},d,h)},_=Am(e,t,this.ast.animation,o,s,p,f,b,l,c),w=0;if(_.forEach(function(e){w=Math.max(e.duration+e.delay,w)}),c.length)return zm(t,this._triggerName,n,i,v,p,f,[],[],g,y,w,c);_.forEach(function(e){var n=e.element,r=Mf(g,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=Mf(y,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&m.add(n)});var E=um(m.values());return zm(t,this._triggerName,n,i,v,p,f,_,E,g,y,w)},e}(),Hm=function(){function e(e,t){this.styles=e,this.defaultParams=t}return e.prototype.buildStyles=function(e,t){var n={},r=em(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=am(o,r,t)),n[e]=o})}}),n},e}(),Gm=function(){function e(e,t){var n=this;this.name=e,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(function(e){n.states[e.name]=new Hm(e.style,e.options&&e.options.params||{})}),Wm(this.states,"true","1"),Wm(this.states,"false","0"),t.transitions.forEach(function(t){n.transitionFactories.push(new Um(e,t,n.states))}),this.fallbackTransition=new Um(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return Object.defineProperty(e.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),e.prototype.matchTransition=function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null},e.prototype.matchStyles=function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)},e}();function Wm(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var qm=new Tm,Qm=function(){function e(e,t){this._driver=e,this._normalizer=t,this._animations={},this._playersById={},this.players=[]}return e.prototype.register=function(e,t){var n=[],r=_m(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r},e.prototype._buildPlayer=function(e,t,n){var r=e.element,i=kf(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)},e.prototype.create=function(e,t,n){var r=this;void 0===n&&(n={});var i,o=[],s=this._animations[e],a=new Map;if(s?(i=Am(this._driver,t,s,"ng-enter","ng-leave",{},{},n,qm,o)).forEach(function(e){var t=Mf(a,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),i=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));a.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=r._driver.computeStyle(t,n,ma)})});var u=If(i.map(function(e){var t=a.get(e.element);return r._buildPlayer(e,{},t)}));return this._playersById[e]=u,u.onDestroy(function(){return r.destroy(e)}),this.players.push(u),u},e.prototype.destroy=function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)},e.prototype._getPlayer=function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t},e.prototype.listen=function(e,t,n,r){var i=Rf(t,"","","");return Af(this._getPlayer(e),n,i,r),function(){}},e.prototype.command=function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])},e}(),Zm=[],Ym={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Km={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Xm="__ng_removed",Jm=function(){function e(e,t){void 0===t&&(t=""),this.namespaceId=t;var n=e&&e.hasOwnProperty("value");if(this.value=function(e){return null!=e?e:null}(n?e.value:e),n){var r=em(e);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(e.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),e.prototype.absorbOptions=function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach(function(e){null==n[e]&&(n[e]=t[e])})}},e}(),$m=new Jm("void"),eg=new Jm("DELETED"),tg=function(){function e(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,lg(t,this._hostClassName)}return e.prototype.listen=function(e,t,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+t+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+t+'" because the provided event is undefined!');if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+t+'" is not supported!');var s=Mf(this._elementListeners,e,[]),a={name:t,phase:n,callback:r};s.push(a);var u=Mf(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(lg(e,"ng-trigger"),lg(e,"ng-trigger-"+t),u[t]=$m),function(){o._engine.afterFlush(function(){var e=s.indexOf(a);e>=0&&s.splice(e,1),o._triggers[t]||delete u[t]})}},e.prototype.register=function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)},e.prototype._getTrigger=function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'+e+'" has not been registered!');return t},e.prototype.trigger=function(e,t,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(t),s=new rg(this.id,t,e),a=this._engine.statesByElement.get(e);a||(lg(e,"ng-trigger"),lg(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,a={}));var u=a[t],l=new Jm(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[t]=l,u){if(u===eg)return s}else u=$m;if("void"===l.value||u.value!==l.value){var c=Mf(this._engine.playersByElement,e,[]);c.forEach(function(e){e.namespaceId==i.id&&e.triggerName==t&&e.queued&&e.destroy()});var d=o.matchTransition(u.value,l.value,e,l.params),p=!1;if(!d){if(!r)return;d=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:d,fromState:u,toState:l,player:s,isFallbackTransition:p}),p||(lg(e,"ng-animate-queued"),s.onStart(function(){cg(e,"ng-animate-queued")})),s.onDone(function(){var t=i.players.indexOf(s);t>=0&&i.players.splice(t,1);var n=i._engine.playersByElement.get(e);if(n){var r=n.indexOf(s);r>=0&&n.splice(r,1)}}),this.players.push(s),c.push(s),s}if(!function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0;i=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e},e.prototype.register=function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n},e.prototype.registerTrigger=function(e,t,n){var r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++},e.prototype.destroy=function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}},e.prototype._fetchNamespace=function(e){return this._namespaceLookup[e]},e.prototype.fetchNamespacesByElement=function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(e){var s=this._fetchNamespace(e);s&&s.insertNode(t,n)}r&&this.collectEnterElement(t)}},e.prototype.collectEnterElement=function(e){this.collectedEnterElements.push(e)},e.prototype.markElementAsDisabled=function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),lg(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),cg(e,"ng-animate-disabled"))},e.prototype.removeNode=function(e,t,n){if(ig(t)){var r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n)}else this._onRemovalComplete(t,n)},e.prototype.markElementAsRemoved=function(e,t,n,r){this.collectedLeaveElements.push(t),t[Xm]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},e.prototype.listen=function(e,t,n,r,i){return ig(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}},e.prototype._buildInstruction=function(e,t,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t)},e.prototype.destroyInnerAnimations=function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach(function(e){return t.finishActiveQueriedAnimationOnElement(e)})},e.prototype.destroyActiveAnimationsForElement=function(e){var t=this.playersByElement.get(e);t&&t.forEach(function(e){e.queued?e.markedForDestroy=!0:e.destroy()});var n=this.statesByElement.get(e);n&&Object.keys(n).forEach(function(e){return n[e]=eg})},e.prototype.finishActiveQueriedAnimationOnElement=function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach(function(e){return e.finish()})},e.prototype.whenRenderingDone=function(){var e=this;return new Promise(function(t){if(e.players.length)return If(e.players).onDone(function(){return t()});t()})},e.prototype.processLeaveNode=function(e){var t=this,n=e[Xm];if(n&&n.setForRemoval){if(e[Xm]=Ym,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(function(n){t.markElementAsDisabled(e,!1)})},e.prototype.flush=function(e){var t=this;void 0===e&&(e=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(e,n){return t._balanceNamespaceList(e,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r=0;x--)this._namespaceList[x].drainQueuedTransitions(t).forEach(function(e){var t=e.player,r=e.element;if(S.push(t),n.collectedEnterElements.length){var s=r[Xm];if(s&&s.setForMove)return void t.destroy()}if(p&&n.driver.containsElement(p,r)){var d=w.get(r),h=m.get(r),f=n._buildInstruction(e,i,h,d);if(f.errors&&f.errors.length)C.push(f);else{if(e.isFallbackTransition)return t.onStart(function(){return rm(r,f.fromStyles)}),t.onDestroy(function(){return nm(r,f.toStyles)}),void o.push(t);f.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),i.append(r,f.timelines),a.push({instruction:f,player:t,element:r}),f.queriedElements.forEach(function(e){return Mf(u,e,[]).push(t)}),f.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=l.get(t);r||l.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),f.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=c.get(t);r||c.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}}else t.destroy()});if(C.length){var O=[];C.forEach(function(e){O.push("@"+e.triggerName+" has failed due to:\n"),e.errors.forEach(function(e){return O.push("- "+e+"\n")})}),S.forEach(function(e){return e.destroy()}),this.reportError(O)}var T=new Map,I=new Map;a.forEach(function(e){var t=e.element;i.has(t)&&(I.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,T))}),o.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){Mf(T,t,[]).push(e),e.destroy()})});var k=y.filter(function(e){return pg(e,l,c)}),A=new Map;sg(A,this.driver,b,c,ma).forEach(function(e){pg(e,l,c)&&k.push(e)});var P=new Map;f.forEach(function(e,t){sg(P,n.driver,new Set(e),l,wa)}),k.forEach(function(e){var t=A.get(e),n=P.get(e);A.set(e,Object(r.__assign)({},t,n))});var R=[],M=[],N={};a.forEach(function(e){var t=e.element,r=e.player,a=e.instruction;if(i.has(t)){if(d.has(t))return r.onDestroy(function(){return nm(t,a.toStyles)}),r.disabled=!0,r.overrideTotalTime(a.totalTime),void o.push(r);var u=N;if(I.size>1){for(var l=t,c=[];l=l.parentNode;){var p=I.get(l);if(p){u=p;break}c.push(l)}c.forEach(function(e){return I.set(e,u)})}var h=n._buildAnimation(r.namespaceId,a,T,s,P,A);if(r.setRealPlayer(h),u===N)R.push(r);else{var f=n.playersByElement.get(u);f&&f.length&&(r.parentPlayer=If(f)),o.push(r)}}else rm(t,a.fromStyles),r.onDestroy(function(){return nm(t,a.toStyles)}),M.push(r),d.has(t)&&o.push(r)}),M.forEach(function(e){var t=s.get(e.element);if(t&&t.length){var n=If(t);e.setRealPlayer(n)}}),o.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var D=0;D0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new ba(e.duration,e.delay)},e}(),rg=function(){function e(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new ba,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return e.prototype.setRealPlayer=function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(function(n){t._queuedCallbacks[n].forEach(function(t){return Af(e,n,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)},e.prototype.getRealPlayer=function(){return this._player},e.prototype.overrideTotalTime=function(e){this.totalTime=e},e.prototype.syncPlayerEvents=function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart(function(){return n.triggerCallback("start")}),e.onDone(function(){return t.finish()}),e.onDestroy(function(){return t.destroy()})},e.prototype._queueEvent=function(e,t){Mf(this._queuedCallbacks,e,[]).push(t)},e.prototype.onDone=function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)},e.prototype.onStart=function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)},e.prototype.onDestroy=function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)},e.prototype.init=function(){this._player.init()},e.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},e.prototype.play=function(){!this.queued&&this._player.play()},e.prototype.pause=function(){!this.queued&&this._player.pause()},e.prototype.restart=function(){!this.queued&&this._player.restart()},e.prototype.finish=function(){this._player.finish()},e.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},e.prototype.reset=function(){!this.queued&&this._player.reset()},e.prototype.setPosition=function(e){this.queued||this._player.setPosition(e)},e.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},e.prototype.triggerCallback=function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)},e}();function ig(e){return e&&1===e.nodeType}function og(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function sg(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(og(e))});var s=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r[Xm]=Km,s.push(r))}),e.set(r,o)});var a=0;return n.forEach(function(e){return og(e,o[a++])}),s}function ag(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;return t.forEach(function(e){var t=function e(t){if(!t)return 1;var o=i.get(t);if(o)return o;var s=t.parentNode;return o=n.has(s)?s:r.has(s)?1:e(s),i.set(t,o),o}(e);1!==t&&n.get(t).push(e)}),n}var ug="$$classes";function lg(e,t){if(e.classList)e.classList.add(t);else{var n=e[ug];n||(n=e[ug]={}),n[t]=!0}}function cg(e,t){if(e.classList)e.classList.remove(t);else{var n=e[ug];n&&delete n[t]}}function dg(e,t,n){If(n).onDone(function(){return e.processLeaveNode(t)})}function pg(e,t,n){var r=n.get(e);if(!r)return!1;var i=t.get(e);return i?r.forEach(function(e){return i.add(e)}):t.set(e,r),n.delete(e),!0}var hg=function(){function e(e,t){var n=this;this._driver=e,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new ng(e,t),this._timelineEngine=new Qm(e,t),this._transitionEngine.onRemovalComplete=function(e,t){return n.onRemovalComplete(e,t)}}return e.prototype.registerTrigger=function(e,t,n,r,i){var o=e+"-"+r,s=this._triggerCache[o];if(!s){var a=[],u=_m(this._driver,i,a);if(a.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function(e,t){return new Gm(e,t)}(r,u),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(t,r,s)},e.prototype.register=function(e,t){this._transitionEngine.register(e,t)},e.prototype.destroy=function(e,t){this._transitionEngine.destroy(e,t)},e.prototype.onInsert=function(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)},e.prototype.onRemove=function(e,t,n){this._transitionEngine.removeNode(e,t,n)},e.prototype.disableAnimations=function(e,t){this._transitionEngine.markElementAsDisabled(e,t)},e.prototype.process=function(e,t,n,i){if("@"==n.charAt(0)){var o=Object(r.__read)(Nf(n),2);this._timelineEngine.command(o[0],t,o[1],i)}else this._transitionEngine.trigger(e,t,n,i)},e.prototype.listen=function(e,t,n,i,o){if("@"==n.charAt(0)){var s=Object(r.__read)(Nf(n),2);return this._timelineEngine.listen(s[0],t,s[1],o)}return this._transitionEngine.listen(e,t,n,i,o)},e.prototype.flush=function(e){void 0===e&&(e=-1),this._transitionEngine.flush(e)},Object.defineProperty(e.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),e.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},e}(),fg="animation",mg="animationend",gg=function(){function e(e,t,n,r,i,o,s){var a=this;this._element=e,this._name=t,this._duration=n,this._delay=r,this._easing=i,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(e){return a._handleCallback(e)}}return e.prototype.apply=function(){var e,t,n;t=this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name,(n=Eg(e=this._element,"").trim()).length&&(function(e,t){for(var n=0;n=this._delay&&n>=this._duration&&this.finish()},e.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),_g(this._element,this._eventFn,!0))},e.prototype.destroy=function(){var e,t,n,r;this._destroyed||(this._destroyed=!0,this.finish(),t=this._name,(r=bg(n=Eg(e=this._element,"").split(","),t))>=0&&(n.splice(r,1),wg(e,"",n.join(","))))},e}();function yg(e,t,n){wg(e,"PlayState",n,vg(e,t))}function vg(e,t){var n=Eg(e,"");return n.indexOf(",")>0?bg(n.split(","),t):bg([n],t)}function bg(e,t){for(var n=0;n=0)return n;return-1}function _g(e,t,n){n?e.removeEventListener(mg,t):e.addEventListener(mg,t)}function wg(e,t,n,r){var i=fg+t;if(null!=r){var o=e.style[i];if(o.length){var s=o.split(",");s[r]=n,n=s.join(",")}}e.style[i]=n}function Eg(e,t){return e.style[fg+t]}var Sg="linear",Cg=function(e){return e[e.INITIALIZED=1]="INITIALIZED",e[e.STARTED=2]="STARTED",e[e.FINISHED=3]="FINISHED",e[e.DESTROYED=4]="DESTROYED",e}({}),xg=function(){function e(e,t,n,r,i,o,s){this.element=e,this.keyframes=t,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this.state=0,this.easing=o||Sg,this.totalTime=r+i,this._buildStyler()}return e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.destroy=function(){this.init(),this.state>=Cg.DESTROYED||(this.state=Cg.DESTROYED,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]},e.prototype._flushStartFns=function(){this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]},e.prototype.finish=function(){this.init(),this.state>=Cg.FINISHED||(this.state=Cg.FINISHED,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},e.prototype.setPosition=function(e){this._styler.setPosition(e)},e.prototype.getPosition=function(){return this._styler.getPosition()},e.prototype.hasStarted=function(){return this.state>=Cg.STARTED},e.prototype.init=function(){this.state>=Cg.INITIALIZED||(this.state=Cg.INITIALIZED,this._styler.apply(),this._delay&&this._styler.pause())},e.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this.state=Cg.STARTED),this._styler.resume()},e.prototype.pause=function(){this.init(),this._styler.pause()},e.prototype.restart=function(){this.reset(),this.play()},e.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},e.prototype._buildStyler=function(){var e=this;this._styler=new gg(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return e.finish()})},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e.prototype.beforeDestroy=function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this.state>=Cg.FINISHED;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:fm(e.element,r))})}this.currentSnapshot=t},e}(),Og=function(e){function t(t,n){var r=e.call(this)||this;return r.element=t,r._startingStyles={},r.__initialized=!1,r._styles=Qf(n),r}return Object(r.__extends)(t,e),t.prototype.init=function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(e){t._startingStyles[e]=t.element.style[e]}),e.prototype.init.call(this))},t.prototype.play=function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(e){return t.element.style.setProperty(e,t._styles[e])}),e.prototype.play.call(this))},t.prototype.destroy=function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)}),this._startingStyles=null,e.prototype.destroy.call(this))},t}(ba),Tg=function(){function e(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return e.prototype.validateStyleProperty=function(e){return Uf(e)},e.prototype.matchesElement=function(e,t){return Gf(e,t)},e.prototype.containsElement=function(e,t){return Wf(e,t)},e.prototype.query=function(e,t,n){return qf(e,t,n)},e.prototype.computeStyle=function(e,t,n){return window.getComputedStyle(e)[t]},e.prototype.buildKeyframeElement=function(e,t,n){var r="@keyframes "+t+" {\n",i="";(n=n.map(function(e){return Qf(e)})).forEach(function(e){i=" ";var t=parseFloat(e.offset);r+=""+i+100*t+"% {\n",i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+=i+"animation-timing-function: "+n+";\n"));default:return void(r+=""+i+t+": "+n+";\n")}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.innerHTML=r,o},e.prototype.animate=function(e,t,n,r,i,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(e){return e instanceof xg}),u={};dm(n,r)&&a.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var l=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach(function(e){Object.keys(e).forEach(function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=pm(e,t,u));if(0==n)return new Og(e,l);var c="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(d);var p=new xg(e,t,c,n,r,i,l);return p.onDestroy(function(){var e;(e=d).parentNode.removeChild(e)}),p},e.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},e}(),Ig=function(){function e(e,t,n){this.element=e,this.keyframes=t,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return e.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},e.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},e.prototype._buildPlayer=function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",function(){return e._onFinish()})}},e.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},e.prototype._triggerWebAnimation=function(e,t,n){return e.animate(t,n)},e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},e.prototype.pause=function(){this.init(),this.domPlayer.pause()},e.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},e.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},e.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},e.prototype.restart=function(){this.reset(),this.play()},e.prototype.hasStarted=function(){return this._started},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype.setPosition=function(e){this.domPlayer.currentTime=e*this.time},e.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(e.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),e.prototype.beforeDestroy=function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:fm(e.element,n))}),this.currentSnapshot=t},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e}(),kg=function(){function e(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Ag().toString()),this._cssKeyframesDriver=new Tg}return e.prototype.validateStyleProperty=function(e){return Uf(e)},e.prototype.matchesElement=function(e,t){return Gf(e,t)},e.prototype.containsElement=function(e,t){return Wf(e,t)},e.prototype.query=function(e,t,n){return qf(e,t,n)},e.prototype.computeStyle=function(e,t,n){return window.getComputedStyle(e)[t]},e.prototype.overrideWebAnimationsSupport=function(e){this._isNativeImpl=e},e.prototype.animate=function(e,t,n,r,i,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,r,i,o);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var u={},l=o.filter(function(e){return e instanceof Ig});return dm(n,r)&&l.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})}),t=pm(e,t=t.map(function(e){return tm(e,!1)}),u),new Ig(e,t,a)},e}();function Ag(){return"undefined"!=typeof Element&&Element.prototype.animate||{}}var Pg=function(e){function t(t,n){var r=e.call(this)||this;return r._nextAnimationId=0,r._renderer=t.createRenderer(n.body,{id:"0",encapsulation:Je.None,styles:[],data:{animation:[]}}),r}return Object(r.__extends)(t,e),t.prototype.build=function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?ga(e):e;return Ng(this._renderer,null,t,"register",[n]),new Rg(t,this._renderer)},t}(fa),Rg=function(e){function t(t,n){var r=e.call(this)||this;return r._id=t,r._renderer=n,r}return Object(r.__extends)(t,e),t.prototype.create=function(e,t){return new Mg(this._id,e,t||{},this._renderer)},t}(function(){}),Mg=function(){function e(e,t,n,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return e.prototype._listen=function(e,t){return this._renderer.listen(this.element,"@@"+this.id+":"+e,t)},e.prototype._command=function(e){for(var t=[],n=1;n=0&&e0){var r=e.slice(0,n),i=r.toLowerCase(),o=e.slice(n+1).trim();t.maybeSetNormalizedName(r,i),t.headers.has(i)?t.headers.get(i).push(o):t.headers.set(i,[o])}})}:function(){t.headers=new Map,Object.keys(e).forEach(function(n){var r=e[n],i=n.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(t.headers.set(i,r),t.maybeSetNormalizedName(n,i))})}:this.headers=new Map}return e.prototype.has=function(e){return this.init(),this.headers.has(e.toLowerCase())},e.prototype.get=function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null},e.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},e.prototype.getAll=function(e){return this.init(),this.headers.get(e.toLowerCase())||null},e.prototype.append=function(e,t){return this.clone({name:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({name:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({name:e,value:t,op:"d"})},e.prototype.maybeSetNormalizedName=function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)},e.prototype.init=function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))},e.prototype.copyFrom=function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})},e.prototype.clone=function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n},e.prototype.applyUpdate=function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var i=("a"===e.op?this.headers.get(t):void 0)||[];i.push.apply(i,Object(r.__spread)(n)),this.headers.set(t,i);break;case"d":var o=e.value;if(o){var s=this.headers.get(t);if(!s)return;0===(s=s.filter(function(e){return-1===o.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}},e.prototype.forEach=function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})},e}(),Zg=function(){function e(){}return e.prototype.encodeKey=function(e){return Yg(e)},e.prototype.encodeValue=function(e){return Yg(e)},e.prototype.decodeKey=function(e){return decodeURIComponent(e)},e.prototype.decodeValue=function(e){return decodeURIComponent(e)},e}();function Yg(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Kg=function(){function e(e){void 0===e&&(e={});var t,n,i,o=this;if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new Zg,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(t=e.fromString,n=this.encoder,i=new Map,t.length>0&&t.split("&").forEach(function(e){var t=e.indexOf("="),o=Object(r.__read)(-1==t?[n.decodeKey(e),""]:[n.decodeKey(e.slice(0,t)),n.decodeValue(e.slice(t+1))],2),s=o[0],a=o[1],u=i.get(s)||[];u.push(a),i.set(s,u)}),i)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(function(t){var n=e.fromObject[t];o.map.set(t,Array.isArray(n)?n:[n])})):this.map=null}return e.prototype.has=function(e){return this.init(),this.map.has(e)},e.prototype.get=function(e){this.init();var t=this.map.get(e);return t?t[0]:null},e.prototype.getAll=function(e){return this.init(),this.map.get(e)||null},e.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},e.prototype.append=function(e,t){return this.clone({param:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({param:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({param:e,value:t,op:"d"})},e.prototype.toString=function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).join("&")},e.prototype.clone=function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n},e.prototype.init=function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=null)},e}();function Xg(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function Jg(e){return"undefined"!=typeof Blob&&e instanceof Blob}function $g(e){return"undefined"!=typeof FormData&&e instanceof FormData}var ey=function(){function e(e,t,n,r){var i;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,i=r):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.params&&(this.params=i.params)),this.headers||(this.headers=new Qg),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{var s=t.indexOf("?");this.urlWithParams=t+(-1===s?"?":s=200&&this.status<300}}());function ry(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var iy=function(){function e(e){this.handler=e}return e.prototype.request=function(e,t,n){var r,i=this;if(void 0===n&&(n={}),e instanceof ey)r=e;else{var o;o=n.headers instanceof Qg?n.headers:new Qg(n.headers);var s=void 0;n.params&&(s=n.params instanceof Kg?n.params:new Kg({fromObject:n.params})),r=new ey(e,t,void 0!==n.body?n.body:null,{headers:o,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var a=Cu(r).pipe(qg(function(e){return i.handler.handle(e)}));if(e instanceof ey||"events"===n.observe)return a;var u=a.pipe(Gu(function(e){return e instanceof ny}));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return u.pipe(F(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return u.pipe(F(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return u.pipe(F(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return u.pipe(F(function(e){return e.body}))}case"response":return u;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},e.prototype.delete=function(e,t){return void 0===t&&(t={}),this.request("DELETE",e,t)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("GET",e,t)},e.prototype.head=function(e,t){return void 0===t&&(t={}),this.request("HEAD",e,t)},e.prototype.jsonp=function(e,t){return this.request("JSONP",e,{params:(new Kg).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},e.prototype.options=function(e,t){return void 0===t&&(t={}),this.request("OPTIONS",e,t)},e.prototype.patch=function(e,t,n){return void 0===n&&(n={}),this.request("PATCH",e,ry(n,t))},e.prototype.post=function(e,t,n){return void 0===n&&(n={}),this.request("POST",e,ry(n,t))},e.prototype.put=function(e,t,n){return void 0===n&&(n={}),this.request("PUT",e,ry(n,t))},e}(),oy=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new sy(e,this.callback))},e}(),sy=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new g(n)),r}return r.__extends(t,e),t}(b);function ay(e){return function(t){var n=new uy(e),r=t.lift(n);return n.caught=r}}var uy=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new ly(e,this.selector,this.caught))},e}(),ly=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.selector=n,i.caught=r,i}return r.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle(),this.add(L(this,n))}},t}(V);function cy(e){return Error('Unable to find icon with the name "'+e+'"')}function dy(e){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was \""+e+'".')}function py(e){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was \""+e+'".')}var hy=function(e){e.nodeName?this.svgElement=e:this.url=e},fy=function(){function e(e,t,n){this._httpClient=e,this._sanitizer=t,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=n}return e.prototype.addSvgIcon=function(e,t){return this.addSvgIconInNamespace("",e,t)},e.prototype.addSvgIconLiteral=function(e,t){return this.addSvgIconLiteralInNamespace("",e,t)},e.prototype.addSvgIconInNamespace=function(e,t,n){return this._addSvgIconConfig(e,t,new hy(n))},e.prototype.addSvgIconLiteralInNamespace=function(e,t,n){var r=this._sanitizer.sanitize(br.HTML,n);if(!r)throw py(n);var i=this._createSvgElementForSingleIcon(r);return this._addSvgIconConfig(e,t,new hy(i))},e.prototype.addSvgIconSet=function(e){return this.addSvgIconSetInNamespace("",e)},e.prototype.addSvgIconSetLiteral=function(e){return this.addSvgIconSetLiteralInNamespace("",e)},e.prototype.addSvgIconSetInNamespace=function(e,t){return this._addSvgIconSetConfig(e,new hy(t))},e.prototype.addSvgIconSetLiteralInNamespace=function(e,t){var n=this._sanitizer.sanitize(br.HTML,t);if(!n)throw py(t);var r=this._svgElementFromString(n);return this._addSvgIconSetConfig(e,new hy(r))},e.prototype.registerFontClassAlias=function(e,t){return void 0===t&&(t=e),this._fontCssClassesByAlias.set(e,t),this},e.prototype.classNameForFontAlias=function(e){return this._fontCssClassesByAlias.get(e)||e},e.prototype.setDefaultFontSetClass=function(e){return this._defaultFontSetClass=e,this},e.prototype.getDefaultFontSetClass=function(){return this._defaultFontSetClass},e.prototype.getSvgIconFromUrl=function(e){var t=this,n=this._sanitizer.sanitize(br.RESOURCE_URL,e);if(!n)throw dy(e);var r=this._cachedIconsByUrl.get(n);return r?Cu(my(r)):this._loadSvgIconFromConfig(new hy(e)).pipe(Ud(function(e){return t._cachedIconsByUrl.set(n,e)}),F(function(e){return my(e)}))},e.prototype.getNamedSvgIcon=function(e,t){void 0===t&&(t="");var n=gy(t,e),r=this._svgIconConfigs.get(n);if(r)return this._getSvgFromConfig(r);var i=this._iconSetConfigs.get(t);return i?this._getSvgFromIconSetConfigs(e,i):Gp(cy(n))},e.prototype._getSvgFromConfig=function(e){return e.svgElement?Cu(my(e.svgElement)):this._loadSvgIconFromConfig(e).pipe(Ud(function(t){return e.svgElement=t}),F(function(e){return my(e)}))},e.prototype._getSvgFromIconSetConfigs=function(e,t){var n=this,r=this._extractIconWithNameFromAnySet(e,t);return r?Cu(r):fh(t.filter(function(e){return!e.svgElement}).map(function(e){return n._loadSvgIconSetFromConfig(e).pipe(ay(function(t){var r=n._sanitizer.sanitize(br.RESOURCE_URL,e.url);return console.error("Loading icon set URL: "+r+" failed: "+t.message),Cu(null)}))})).pipe(F(function(){var r=n._extractIconWithNameFromAnySet(e,t);if(!r)throw cy(e);return r}))},e.prototype._extractIconWithNameFromAnySet=function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.svgElement){var i=this._extractSvgIconFromSet(r.svgElement,e);if(i)return i}}return null},e.prototype._loadSvgIconFromConfig=function(e){var t=this;return this._fetchUrl(e.url).pipe(F(function(e){return t._createSvgElementForSingleIcon(e)}))},e.prototype._loadSvgIconSetFromConfig=function(e){var t=this;return e.svgElement?Cu(e.svgElement):this._fetchUrl(e.url).pipe(F(function(n){return e.svgElement||(e.svgElement=t._svgElementFromString(n)),e.svgElement}))},e.prototype._createSvgElementForSingleIcon=function(e){var t=this._svgElementFromString(e);return this._setSvgAttributes(t),t},e.prototype._extractSvgIconFromSet=function(e,t){var n=e.querySelector("#"+t);if(!n)return null;var r=n.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r));var i=this._svgElementFromString("");return i.appendChild(r),this._setSvgAttributes(i)},e.prototype._svgElementFromString=function(e){var t=this._document.createElement("DIV");t.innerHTML=e;var n=t.querySelector("svg");if(!n)throw Error(" tag not found");return n},e.prototype._toSvgElement=function(e){for(var t=this._svgElementFromString(""),n=0;n*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],data:{}});function Py(e){return Oo(2,[go(402653184,1,{ripple:0}),(e()(),di(1,0,null,null,1,"span",[["class","mat-button-wrapper"]],null,null,null,null,null)),wo(null,0),(e()(),di(3,0,null,null,1,"div",[["class","mat-button-ripple mat-ripple"],["matRipple",""]],[[2,"mat-button-ripple-round",null],[2,"mat-ripple-unbounded",null]],null,null,null,null)),$i(4,212992,[[1,4]],0,md,[cn,Vt,cu,[2,fd],[2,Ug]],{centered:[0,"centered"],disabled:[1,"disabled"],trigger:[2,"trigger"]},null),(e()(),di(5,0,null,null,0,"div",[["class","mat-button-focus-overlay"]],null,null,null,null,null))],function(e,t){var n=t.component;e(t,4,0,n.isIconButton,n._isRippleDisabled(),n._getHostElement())},function(e,t){var n=t.component;e(t,3,0,n.isRoundButton||n.isIconButton,zi(t,4).unbounded)})}var Ry=function(){function e(){this.newInfo$=new ee}return e.prototype.getInfo=function(){return this.info},e.prototype.updateInfo=function(e){this.info=e,this.newInfo$.next(e)},e}(),My=function(){function e(){}return e.prototype.getOpenViduPublicUrl=function(){var e=this;return new Promise(function(t,n){if(e.openviduPublicUrl)t(e.openviduPublicUrl);else{var r=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+"/config/openvidu-publicurl",i=new XMLHttpRequest;i.onreadystatechange=function(){4===i.readyState&&(200===i.status?(e.openviduPublicUrl=i.responseText,t(i.responseText)):n("Error getting OpenVidu publicurl"))},i.open("GET",r,!0),i.send()}})},e}(),Ny=n("PZzU"),Dy=function(){function e(){}return e.prototype.testVideo=function(){this.myReference.close(this.secret)},e}(),jy=function(){function e(e,t,n){var r=this;this.infoService=e,this.restService=t,this.dialog=n,this.lockScroll=!1,this.info=[],this.testStatus="DISCONNECTED",this.testButton="Test",this.tickClass="trigger",this.showSpinner=!1,this.msgChain=[],this.infoSubscription=this.infoService.newInfo$.subscribe(function(e){r.info.push(e),r.scrollToBottom()})}return e.prototype.ngOnInit=function(){var e=this,t=location.protocol.includes("https")?"wss://":"ws://",n=location.port?":"+location.port:"";this.websocket=new WebSocket(t+location.hostname+n+"/info"),this.websocket.onopen=function(e){console.log("Info websocket connected")},this.websocket.onclose=function(e){console.log("Info websocket closed")},this.websocket.onerror=function(e){console.log("Info websocket error")},this.websocket.onmessage=function(t){console.log("Info websocket message"),console.log(t.data),e.infoService.updateInfo(t.data)},this.restService.getOpenViduPublicUrl().then(function(t){e.openviduPublicUrl=t.replace("https://","wss://").replace("http://","ws://")}).catch(function(e){console.error(e)})},e.prototype.beforeunloadHandler=function(){this.session&&this.endTestVideo(),this.websocket.close()},e.prototype.ngOnDestroy=function(){this.session&&this.endTestVideo(),this.websocket.close()},e.prototype.toggleTestVideo=function(){this.session?this.endTestVideo():this.testVideo()},e.prototype.testVideo=function(){var e,t=this;(e=this.dialog.open(Dy)).componentInstance.myReference=e,e.afterClosed().subscribe(function(e){e&&(t.openviduPublicUrl?t.connectToSession(t.openviduPublicUrl+"?sessionId=testSession&secret="+e):t.restService.getOpenViduPublicUrl().then(function(n){t.openviduPublicUrl=n.replace("https://","wss://").replace("http://","ws://"),t.connectToSession(t.openviduPublicUrl+"?sessionId=testSession&secret="+e)}).catch(function(e){console.error(e)}))})},e.prototype.connectToSession=function(e){var t=this;this.msgChain=[];var n=new Ny.OpenVidu;this.session=n.initSession(),this.testStatus="CONNECTING",this.testButton="Testing...",this.session.connect(e).then(function(){t.msgChain.push("Connected to session"),t.testStatus="CONNECTED";var e=n.initPublisher("mirrored-video",{publishAudio:!0,publishVideo:!0,resolution:"640x480"},function(e){e&&console.error(e)});e.on("accessAllowed",function(){t.msgChain.push("Camera access allowed")}),e.on("accessDenied",function(){t.endTestVideo(),t.msgChain.push("Camera access denied")}),e.on("videoElementCreated",function(e){t.showSpinner=!0,t.msgChain.push("Video element created")}),e.on("streamCreated",function(e){t.msgChain.push("Stream created")}),e.on("streamPlaying",function(e){t.msgChain.push("Stream playing"),t.testButton="End test",t.testStatus="PLAYING",t.showSpinner=!1}),e.subscribeToRemote(),t.session.publish(e)}).catch(function(e){if(401===e.code){t.endTestVideo();var n=void 0;(n=t.dialog.open(Dy)).componentInstance.myReference=n,n.afterClosed().subscribe(function(e){e&&t.connectToSession(t.openviduPublicUrl+"?sessionId=testSession&secret="+e)})}else console.error(e),t.msgChain.push("Error connecting to session")})},e.prototype.endTestVideo=function(){this.session.disconnect(),this.session=null,this.testStatus="DISCONNECTED",this.testButton="Test",this.showSpinner=!1,this.info=[],this.msgChain=[]},e.prototype.scrollToBottom=function(){try{this.lockScroll||(this.myScrollContainer.nativeElement.scrollTop=this.myScrollContainer.nativeElement.scrollHeight)}catch(e){console.error("[Error]:"+e.toString())}},e}(),Ly=Lr({encapsulation:0,styles:[["#dashboard-div[_ngcontent-%COMP%]{height:100%;padding:20px}#log[_ngcontent-%COMP%]{height:90%}#log-content[_ngcontent-%COMP%]{height:90%;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;overflow-y:auto;overflow-x:hidden}ul[_ngcontent-%COMP%]{margin:0}#test-btn[_ngcontent-%COMP%]{text-transform:uppercase}mat-card-title[_ngcontent-%COMP%] button.blue[_ngcontent-%COMP%]{color:#fff;background-color:#08a}mat-card-title[_ngcontent-%COMP%] button.yellow[_ngcontent-%COMP%]{color:rgba(0,0,0,.87);background-color:#fc0}mat-spinner[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#tick-div[_ngcontent-%COMP%]{width:100px;height:100px;z-index:1;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#tooltip-tick[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;z-index:2}.circ[_ngcontent-%COMP%]{opacity:0;stroke-dasharray:130;stroke-dashoffset:130;transition:all 1s}.tick[_ngcontent-%COMP%]{stroke-dasharray:50;stroke-dashoffset:50;transition:stroke-dashoffset 1s .5s ease-out}.drawn[_ngcontent-%COMP%] + svg[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{opacity:1;stroke-dashoffset:0}#mirrored-video[_ngcontent-%COMP%]{position:relative}@media screen and (max-width:599px){mat-card-title[_ngcontent-%COMP%]{font-size:20px}}#loader[_ngcontent-%COMP%]{width:100px;height:100px;z-index:1;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#loader[_ngcontent-%COMP%] *[_ngcontent-%COMP%], #loader[_ngcontent-%COMP%] [_ngcontent-%COMP%]::after, #loader[_ngcontent-%COMP%] [_ngcontent-%COMP%]::before{box-sizing:border-box}.loader-1[_ngcontent-%COMP%]{height:100px;width:100px;-webkit-animation:4.8s linear infinite loader-1-1;animation:4.8s linear infinite loader-1-1}@-webkit-keyframes loader-1-1{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes loader-1-1{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.loader-1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;height:100px;width:100px;clip:rect(0,100px,100px,50px);-webkit-animation:1.2s linear infinite loader-1-2;animation:1.2s linear infinite loader-1-2}@-webkit-keyframes loader-1-2{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(220deg)}}@keyframes loader-1-2{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(220deg);transform:rotate(220deg)}}.loader-1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;height:100px;width:100px;clip:rect(0,100px,100px,50px);border:8px solid #4d4d4d;border-radius:50%;-webkit-animation:1.2s cubic-bezier(.77,0,.175,1) infinite loader-1-3;animation:1.2s cubic-bezier(.77,0,.175,1) infinite loader-1-3}@-webkit-keyframes loader-1-3{0%{-webkit-transform:rotate(-140deg)}50%{-webkit-transform:rotate(-160deg)}100%{-webkit-transform:rotate(140deg)}}@keyframes loader-1-3{0%{-webkit-transform:rotate(-140deg);transform:rotate(-140deg)}50%{-webkit-transform:rotate(-160deg);transform:rotate(-160deg)}100%{-webkit-transform:rotate(140deg);transform:rotate(140deg)}}"]],data:{}});function Vy(e){return Oo(0,[(e()(),di(0,0,null,null,2,"li",[],null,null,null,null,null)),(e()(),di(1,0,null,null,1,"p",[],null,null,null,null,null)),(e()(),So(2,null,["",""]))],null,function(e,t){e(t,2,0,t.context.$implicit)})}function Fy(e){return Oo(0,[(e()(),di(0,0,null,null,2,"div",[["id","loader"]],null,null,null,null,null)),(e()(),di(1,0,null,null,1,"div",[["class","loader-1 center"]],null,null,null,null,null)),(e()(),di(2,0,null,null,0,"span",[],null,null,null,null,null))],null,null)}function zy(e){return Oo(0,[(e()(),di(0,16777216,null,null,1,"div",[["id","tooltip-tick"],["matTooltip","The connection is successful"],["matTooltipPosition","below"]],null,[[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(e,t,n){var r=!0;return"longpress"===t&&(r=!1!==zi(e,1).show()&&r),"keydown"===t&&(r=!1!==zi(e,1)._handleKeydown(n)&&r),"touchend"===t&&(r=!1!==zi(e,1)._handleTouchend()&&r),r},null,null)),$i(1,147456,null,0,Vl,[kl,cn,Qu,vn,Vt,cu,Yd,tp,Dl,[2,Ul],[2,Ll]],{position:[0,"position"],message:[1,"message"]},null),(e()(),ci(0,null,null,0))],function(e,t){e(t,1,0,"below","The connection is successful")},null)}function By(e){return Oo(0,[(e()(),di(0,0,null,null,7,"div",[["id","tick-div"]],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,zy)),$i(2,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),di(3,0,null,null,1,"div",[],null,null,null,null,null)),$i(4,278528,null,0,Ba,[zn,Bn,cn,ln],{ngClass:[0,"ngClass"]},null),(e()(),di(5,0,null,null,2,":svg:svg",[[":xml:space","preserve"],[":xmlns:xlink","http://www.w3.org/1999/xlink"],["id","tick"],["style","enable-background:new 0 0 37 37;"],["version","1.1"],["viewBox","-1 -1 39 39"],["x","0px"],["xmlns","http://www.w3.org/2000/svg"],["y","0px"]],null,null,null,null,null)),(e()(),di(6,0,null,null,0,":svg:path",[["class","circ path"],["d","\n\tM30.5,6.5L30.5,6.5c6.6,6.6,6.6,17.4,0,24l0,0c-6.6,6.6-17.4,6.6-24,0l0,0c-6.6-6.6-6.6-17.4,0-24l0,0C13.1-0.2,23.9-0.2,30.5,6.5z"],["style","fill:none;stroke:#06d362;stroke-width:4;stroke-linejoin:round;stroke-miterlimit:10;"]],null,null,null,null,null)),(e()(),di(7,0,null,null,0,":svg:polyline",[["class","tick path"],["points","\n\t11.6,20 15.9,24.2 26.4,13.8 "],["style","fill:none;stroke:#06d362;stroke-width:4;stroke-linejoin:round;stroke-miterlimit:10;"]],null,null,null,null,null))],function(e,t){var n=t.component;e(t,2,0,"PLAYING"==n.testStatus),e(t,4,0,"PLAYING"==n.testStatus?"trigger drawn":"trigger")},null)}function Uy(e){return Oo(0,[(e()(),di(0,0,null,null,1,"p",[],null,null,null,null,null)),(e()(),So(1,null,["",""]))],null,function(e,t){e(t,1,0,t.context.$implicit)})}function Hy(e){return Oo(0,[go(402653184,1,{myScrollContainer:0}),(e()(),di(1,0,null,null,50,"div",[["fxLayout","row"],["fxLayout.xs","column"],["fxLayoutGap","20px"],["fxLayoutGap.xs","20px"],["id","dashboard-div"]],null,null,null,null,null)),$i(2,737280,null,0,th,[Lp,cn,Fp],{layout:[0,"layout"],layoutXs:[1,"layoutXs"]},null),$i(3,1785856,null,0,nh,[Lp,cn,[6,th],Vt,Ul,Fp],{gap:[0,"gap"],gapXs:[1,"gapXs"]},null),(e()(),di(4,0,null,null,23,"div",[["fxFlex","66%"],["fxFlexOrder","1"],["fxFlexOrder.xs","2"]],null,null,null,null,null)),$i(5,737280,null,0,oh,[Lp,cn,[3,th],Fp,[2,Pp]],{flex:[0,"flex"]},null),$i(6,737280,null,0,sh,[Lp,cn,Fp],{order:[0,"order"],orderXs:[1,"orderXs"]},null),(e()(),di(7,0,null,null,20,"mat-card",[["class","mat-card"],["id","log"]],null,null,null,hh,ph)),$i(8,49152,null,0,ch,[],null,null),(e()(),di(9,0,null,0,11,"mat-card-title",[["class","mat-card-title"]],null,null,null,null,null)),$i(10,16384,null,0,lh,[],null,null),(e()(),So(-1,null,["Server events "])),(e()(),di(12,0,null,null,8,"mat-slide-toggle",[["class","mat-slide-toggle"],["style","float: right; margin-left: auto;"],["title","Lock Scroll"]],[[8,"id",0],[2,"mat-checked",null],[2,"mat-disabled",null],[2,"mat-slide-toggle-label-before",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(e,t,n){var r=!0;return"ngModelChange"===t&&(r=!1!==(e.component.lockScroll=n)&&r),r},Wg,Gg)),$i(13,1228800,null,0,Ef,[cn,cu,tp,bn,[8,null],Vt,[2,Ug]],null,null),eo(1024,null,xh,function(e){return[e]},[Ef]),$i(15,671744,null,0,mf,[[8,null],[8,null],[8,null],[6,xh]],{model:[0,"model"]},{update:"ngModelChange"}),eo(2048,null,Mh,null,[mf]),$i(17,16384,null,0,ef,[[4,Mh]],null,null),(e()(),di(18,0,null,0,2,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,_y,by)),$i(19,638976,null,0,yy,[cn,fy,[8,null]],null,null),(e()(),So(-1,0,["lock_outline"])),(e()(),di(21,0,null,0,1,"mat-divider",[["class","mat-divider"],["role","separator"]],[[1,"aria-orientation",0],[2,"mat-divider-vertical",null],[2,"mat-divider-inset",null]],null,null,Cy,Sy)),$i(22,49152,null,0,wy,[],null,null),(e()(),di(23,0,[[1,0],["scrollMe",1]],0,4,"mat-card-content",[["class","mat-card-content"],["id","log-content"]],null,null,null,null,null)),$i(24,16384,null,0,uh,[],null,null),(e()(),di(25,0,null,null,2,"ul",[],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,Vy)),$i(27,802816,null,0,Ha,[vn,yn,zn],{ngForOf:[0,"ngForOf"]},null),(e()(),di(28,0,null,null,23,"div",[["fxFlex","33%"],["fxFlex.xs","auto"],["fxFlexOrder","2"],["fxFlexOrder.xs","1"]],null,null,null,null,null)),$i(29,737280,null,0,oh,[Lp,cn,[3,th],Fp,[2,Pp]],{flex:[0,"flex"],flexXs:[1,"flexXs"]},null),$i(30,737280,null,0,sh,[Lp,cn,Fp],{order:[0,"order"],orderXs:[1,"orderXs"]},null),(e()(),di(31,0,null,null,20,"mat-card",[["class","mat-card"],["id","video-loop"]],null,null,null,hh,ph)),$i(32,49152,null,0,ch,[],null,null),(e()(),di(33,0,null,0,6,"mat-card-title",[["class","mat-card-title"]],null,null,null,null,null)),$i(34,16384,null,0,lh,[],null,null),(e()(),So(-1,null,["Test the connection "])),(e()(),di(36,0,null,null,3,"button",[["id","test-btn"],["mat-raised-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.toggleTestVideo()&&r),r},Py,Ay)),$i(37,278528,null,0,Ba,[zn,Bn,cn,ln],{ngClass:[0,"ngClass"]},null),$i(38,180224,null,0,Iy,[cn,cu,tp,[2,Ug]],{disabled:[0,"disabled"]},null),(e()(),So(39,0,["",""])),(e()(),di(40,0,null,0,1,"mat-divider",[["class","mat-divider"],["role","separator"]],[[1,"aria-orientation",0],[2,"mat-divider-vertical",null],[2,"mat-divider-inset",null]],null,null,Cy,Sy)),$i(41,49152,null,0,wy,[],null,null),(e()(),di(42,0,null,0,9,"mat-card-content",[["class","mat-card-content"]],null,null,null,null,null)),$i(43,16384,null,0,uh,[],null,null),(e()(),di(44,0,null,null,4,"div",[["id","mirrored-video"]],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,Fy)),$i(46,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),ci(16777216,null,null,1,null,By)),$i(48,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),di(49,0,null,null,2,"div",[["id","msg-chain"]],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,Uy)),$i(51,802816,null,0,Ha,[vn,yn,zn],{ngForOf:[0,"ngForOf"]},null)],function(e,t){var n=t.component;e(t,2,0,"row","column"),e(t,3,0,"20px","20px"),e(t,5,0,"66%"),e(t,6,0,"1","2"),e(t,15,0,n.lockScroll),e(t,19,0),e(t,27,0,n.info),e(t,29,0,"33%","auto"),e(t,30,0,"2","1"),e(t,37,0,"DISCONNECTED"==n.testStatus?"blue":"PLAYING"==n.testStatus?"yellow":"disabled"),e(t,38,0,"CONNECTING"===n.testStatus||"CONNECTED"===n.testStatus),e(t,46,0,n.showSpinner),e(t,48,0,n.session),e(t,51,0,n.msgChain)},function(e,t){var n=t.component;e(t,12,1,[zi(t,13).id,zi(t,13).checked,zi(t,13).disabled,"before"==zi(t,13).labelPosition,"NoopAnimations"===zi(t,13)._animationMode,zi(t,17).ngClassUntouched,zi(t,17).ngClassTouched,zi(t,17).ngClassPristine,zi(t,17).ngClassDirty,zi(t,17).ngClassValid,zi(t,17).ngClassInvalid,zi(t,17).ngClassPending]),e(t,18,0,zi(t,19).inline),e(t,21,0,zi(t,22).vertical?"vertical":"horizontal",zi(t,22).vertical,zi(t,22).inset),e(t,36,0,zi(t,38).disabled||null,"NoopAnimations"===zi(t,38)._animationMode),e(t,39,0,n.testButton),e(t,40,0,zi(t,41).vertical?"vertical":"horizontal",zi(t,41).vertical,zi(t,41).inset)})}var Gy=ki("app-dashboard",jy,function(e){return Oo(0,[(e()(),di(0,0,null,null,1,"app-dashboard",[],null,[["window","beforeunload"]],function(e,t,n){var r=!0;return"window:beforeunload"===t&&(r=!1!==zi(e,1).beforeunloadHandler()&&r),r},Hy,Ly)),$i(1,245760,null,0,jy,[Ry,My,Pd],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Wy=function(){function e(){}return e.prototype.ngOnInit=function(){},e}(),qy=Lr({encapsulation:0,styles:[[""]],data:{}});function Qy(e){return Oo(0,[(e()(),di(0,0,null,null,1,"p",[],null,null,null,null,null)),(e()(),So(-1,null,[" session-details works!\n"]))],null,null)}var Zy=ki("app-session-details",Wy,function(e){return Oo(0,[(e()(),di(0,0,null,null,1,"app-session-details",[],null,null,null,Qy,qy)),$i(1,114688,null,0,Wy,[],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Yy=function(){function e(){}return e.prototype.ngAfterViewInit=function(){this._subscriber.addVideoElement(this.elementRef.nativeElement)},Object.defineProperty(e.prototype,"subscriber",{set:function(e){this._subscriber=e,this.elementRef&&this._subscriber.addVideoElement(this.elementRef.nativeElement)},enumerable:!0,configurable:!0}),e}(),Ky=Lr({encapsulation:2,styles:[],data:{}});function Xy(e){return Oo(0,[go(402653184,1,{elementRef:0}),(e()(),di(1,0,[[1,0],["videoElement",1]],null,0,"video",[],null,null,null,null,null))],null,null)}var Jy=function(){function e(){}return e.prototype.fixAspectRatio=function(e,t){var n=e.querySelector(".OT_root");if(n){var r=n.style.width;n.style.width=t+"px",n.style.width=r||""}},e.prototype.positionElement=function(e,t,n,r,i,o){var s=this,a={left:t+"px",top:n+"px",width:r+"px",height:i+"px"};this.fixAspectRatio(e,r),o&&$?($(e).stop(),$(e).animate(a,o.duration||200,o.easing||"swing",function(){s.fixAspectRatio(e,r),o.complete&&o.complete.call(s)})):$(e).css(a),this.fixAspectRatio(e,r)},e.prototype.getVideoRatio=function(e){if(!e)return.75;var t=e.querySelector("video");return t&&t.videoHeight&&t.videoWidth?t.videoHeight/t.videoWidth:e.videoHeight&&e.videoWidth?e.videoHeight/e.videoWidth:.75},e.prototype.getCSSNumber=function(e,t){var n=$(e).css(t);return n?parseInt(n,10):0},e.prototype.cheapUUID=function(){return(1e8*Math.random()).toFixed(0)},e.prototype.getHeight=function(e){var t=$(e).css("height");return t?parseInt(t,10):0},e.prototype.getWidth=function(e){var t=$(e).css("width");return t?parseInt(t,10):0},e.prototype.getBestDimensions=function(e,t,n,r,i,o){for(var s,a,u,l,c,d,p,h=1;h<=n;h++){var f=h,m=Math.ceil(n/f);(p=(d=Math.floor(i/m))/(c=Math.floor(r/f)))>t?d=c*(p=t):ps)&&(s=g,o=d,l=c,a=f,u=m)}return{maxArea:s,targetCols:a,targetRows:u,targetHeight:o,targetWidth:l,ratio:o/l}},e.prototype.arrange=function(e,t,n,r,i,o,s,a,u){var l,c,d=e.length;if(o){var p=this.getVideoRatio(e.length>0?e[0]:null);c=this.getBestDimensions(p,p,d,t,n,l)}else c=this.getBestDimensions(s,a,d,t,n,l);for(var h,f=0,m=0,g=[],y=0;yt?(h.height=Math.floor(h.height*(t/h.width)),h.width=t):h.width0){var w=n-b;for(b=0,y=0;y(t-h.width)/h.width&&(E=Math.floor((t-h.width)/h.width*h.height)),h.width+=Math.floor(E/h.height*h.width),h.height+=E,w-=E,_-=1}b+=h.height}}for(m=(n-b)/2,y=0;y."+this.opts.bigClass),this.filterDisplayNone),l=Array.prototype.filter.call(this.layoutContainer.querySelectorAll("#"+e+">*:not(."+this.opts.bigClass+")"),this.filterDisplayNone);if(u.length>0&&l.length>0){var c=void 0,d=void 0;r>this.getVideoRatio(u[0])?(c=n,s=t-(o=d=Math.floor(t*this.opts.bigPercentage))):(d=t,a=n-(i=c=Math.floor(n*this.opts.bigPercentage))),this.opts.bigFirst?(this.arrange(u,c,d,0,0,this.opts.bigFixedRatio,this.opts.bigMinRatio,this.opts.bigMaxRatio,this.opts.animate),this.arrange(l,n-i,t-o,i,o,this.opts.fixedRatio,this.opts.minRatio,this.opts.maxRatio,this.opts.animate)):(this.arrange(l,n-i,t-o,0,0,this.opts.fixedRatio,this.opts.minRatio,this.opts.maxRatio,this.opts.animate),this.arrange(u,c,d,a,s,this.opts.bigFixedRatio,this.opts.bigMinRatio,this.opts.bigMaxRatio,this.opts.animate))}else u.length>0&&0===l.length?this.arrange(u,n,t,0,0,this.opts.bigFixedRatio,this.opts.bigMinRatio,this.opts.bigMaxRatio,this.opts.animate):this.arrange(l,n-i,t-o,i,o,this.opts.fixedRatio,this.opts.minRatio,this.opts.maxRatio,this.opts.animate)}},e.prototype.initLayoutContainer=function(e,t){this.opts={maxRatio:null!=t.maxRatio?t.maxRatio:1.5,minRatio:null!=t.minRatio?t.minRatio:9/16,fixedRatio:null!=t.fixedRatio&&t.fixedRatio,animate:null!=t.animate&&t.animate,bigClass:null!=t.bigClass?t.bigClass:"OT_big",bigPercentage:null!=t.bigPercentage?t.bigPercentage:.8,bigFixedRatio:null!=t.bigFixedRatio&&t.bigFixedRatio,bigMaxRatio:null!=t.bigMaxRatio?t.bigMaxRatio:1.5,bigMinRatio:null!=t.bigMinRatio?t.bigMinRatio:9/16,bigFirst:null==t.bigFirst||t.bigFirst},this.layoutContainer="string"==typeof e?$(e):e},e.prototype.setLayoutOptions=function(e){this.opts=e},e}(),$y=function(){function e(e,t){var n=this;this.route=e,this.appRef=t,this.subscribers=[],this.numberOfScreenStreams=0,this.layoutOptions={maxRatio:1.5,minRatio:9/16,fixedRatio:!1,bigClass:"OV_big",bigPercentage:.8,bigFixedRatio:!1,bigMaxRatio:1.5,bigMinRatio:9/16,bigFirst:!0,animate:!0},this.route.params.subscribe(function(e){n.sessionId=e.sessionId,n.secret=e.secret})}return e.prototype.beforeunloadHandler=function(){this.leaveSession()},e.prototype.sizeChange=function(e){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.openviduLayout.updateLayout()},20)},e.prototype.ngOnDestroy=function(){this.leaveSession()},e.prototype.ngOnInit=function(){var e=this,t=new Ny.OpenVidu;this.session=t.initSession(),this.session.on("streamCreated",function(t){var n=!1;"SCREEN"===t.stream.typeOfVideo&&(e.numberOfScreenStreams++,n=!0);var r=e.session.subscribe(t.stream,void 0);r.on("streamPlaying",function(t){r.videos[0].video.parentElement.parentElement.classList.remove("custom-class"),e.updateLayout(n)}),e.addSubscriber(r)}),this.session.on("streamDestroyed",function(t){var n=!1;"SCREEN"===t.stream.typeOfVideo&&(e.numberOfScreenStreams--,n=!0),e.deleteSubscriber(t.stream.streamManager),e.updateLayout(n)});var n="wss://"+location.hostname+":4443?sessionId="+this.sessionId+"&secret="+this.secret+"&recorder=true";this.session.connect(n).catch(function(e){console.error(e)}),this.openviduLayout=new Jy,this.openviduLayout.initLayoutContainer(document.getElementById("layout"),this.layoutOptions)},e.prototype.addSubscriber=function(e){this.subscribers.push(e),this.appRef.tick()},e.prototype.deleteSubscriber=function(e){for(var t=-1,n=0;n-1&&this.subscribers.splice(t,1),this.appRef.tick()},e.prototype.leaveSession=function(){this.session&&this.session.disconnect(),this.subscribers=[],this.session=null},e.prototype.updateLayout=function(e){e&&(this.layoutOptions.fixedRatio=this.numberOfScreenStreams>0,this.openviduLayout.setLayoutOptions(this.layoutOptions)),this.openviduLayout.updateLayout()},e}(),ev=function(e){function t(){var n=e.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,t.prototype),n}return r.__extends(t,e),t}(Error);function tv(e){return function(t){return 0===e?Su():t.lift(new nv(e))}}var nv=function(){function e(e){if(this.total=e,this.total<0)throw new Ku}return e.prototype.call=function(e,t){return t.subscribe(new rv(e,this.total))},e}(),rv=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(e?Gu(function(t,n){return e(t,n,r)}):Q,tv(1),n?sv(t):iv(function(){return new ev}))}}function cv(e,t){return function(n){return n.lift(new dv(e,t,n))}}var dv=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new pv(e,this.predicate,this.thisArg,this.source))},e}(),pv=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.__extends(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(b);function hv(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Gu(function(t,n){return e(t,n,r)}):Q,Xu(1),n?sv(t):iv(function(){return new ev}))}}function fv(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new mv(e,t,n))}}var mv=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new gv(e,this.accumulator,this.seed,this.hasSeed))},e}(),gv=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.__extends(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(b),yv=function(e,t){this.id=e,this.url=t},vv=function(e){function t(t,n,r,i){void 0===r&&(r="imperative"),void 0===i&&(i=null);var o=e.call(this,t,n)||this;return o.navigationTrigger=r,o.restoredState=i,o}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},t}(yv),bv=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.urlAfterRedirects=r,i}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},t}(yv),_v=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.reason=r,i}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},t}(yv),wv=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.error=r,i}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},t}(yv),Ev=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(yv),Sv=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(yv),Cv=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n)||this;return s.urlAfterRedirects=r,s.state=i,s.shouldActivate=o,s}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},t}(yv),xv=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(yv),Ov=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(yv),Tv=function(){function e(e){this.route=e}return e.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},e}(),Iv=function(){function e(e){this.route=e}return e.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},e}(),kv=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Av=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Pv=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Rv=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Mv="primary",Nv=function(){function e(e){this.params=e||{}}return e.prototype.has=function(e){return this.params.hasOwnProperty(e)},e.prototype.get=function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null},e.prototype.getAll=function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]},Object.defineProperty(e.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),e}();function Dv(e){return new Nv(e)}function jv(e,t,n){var r=n.path.split("/");if(r.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length0?e[e.length-1]:null}function Wv(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function qv(e){return e.pipe(Z(),cv(function(e){return!0===e}))}function Qv(e){return lt(e)?e:ut(e)?H(Promise.resolve(e)):Cu(e)}function Zv(e,t,n){return n?function(e,t){return Uv(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!Jv(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!t.children[r])return!1;if(!e(t.children[r],n.children[r]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(function(n){return t[n]===e[n]})}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,r,i){if(n.segments.length>i.length)return!!Jv(s=n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!Jv(n.segments,i))return!1;for(var o in r.children){if(!n.children[o])return!1;if(!e(n.children[o],r.children[o]))return!1}return!0}var s=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!!Jv(n.segments,s)&&!!n.children[Mv]&&t(n.children[Mv],r,a)}(t,n,n.segments)}(e.root,t.root)}var Yv=function(){function e(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}return Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=Dv(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return nb.serialize(this)},e}(),Kv=function(){function e(e,t){var n=this;this.segments=e,this.children=t,this.parent=null,Wv(t,function(e,t){return e.parent=n})}return e.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(e.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return rb(this)},e}(),Xv=function(){function e(e,t){this.path=e,this.parameters=t}return Object.defineProperty(e.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=Dv(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return lb(this)},e}();function Jv(e,t){return e.length===t.length&&e.every(function(e,n){return e.path===t[n].path})}function $v(e,t){var n=[];return Wv(e.children,function(e,r){r===Mv&&(n=n.concat(t(e,r)))}),Wv(e.children,function(e,r){r!==Mv&&(n=n.concat(t(e,r)))}),n}var eb=function(){},tb=function(){function e(){}return e.prototype.parse=function(e){var t=new fb(e);return new Yv(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())},e.prototype.serialize=function(e){var t,n;return"/"+function e(t,n){if(!t.hasChildren())return rb(t);if(n){var r=t.children[Mv]?e(t.children[Mv],!1):"",i=[];return Wv(t.children,function(t,n){n!==Mv&&i.push(n+":"+e(t,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=$v(t,function(n,r){return r===Mv?[e(t.children[Mv],!1)]:[r+":"+e(n,!1)]});return rb(t)+"/("+o.join("//")+")"}(e.root,!0)+(t=e.queryParams,(n=Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return ob(e)+"="+ob(t)}).join("&"):ob(e)+"="+ob(n)})).length?"?"+n.join("&"):"")+("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"")},e}(),nb=new tb;function rb(e){return e.segments.map(function(e){return lb(e)}).join("/")}function ib(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ob(e){return ib(e).replace(/%3B/gi,";")}function sb(e){return ib(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ab(e){return decodeURIComponent(e)}function ub(e){return ab(e.replace(/\+/g,"%20"))}function lb(e){return""+sb(e.path)+(t=e.parameters,Object.keys(t).map(function(e){return";"+sb(e)+"="+sb(t[e])}).join(""));var t}var cb=/^[^\/()?;=#]+/;function db(e){var t=e.match(cb);return t?t[0]:""}var pb=/^[^=?&#]+/,hb=/^[^?&#]+/,fb=function(){function e(e){this.url=e,this.remaining=e}return e.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Kv([],{}):new Kv([],this.parseChildren())},e.prototype.parseQueryParams=function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e},e.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},e.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[Mv]=new Kv(e,t)),n},e.prototype.parseSegment=function(){var e=db(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(e),new Xv(ab(e),this.parseMatrixParams())},e.prototype.parseMatrixParams=function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e},e.prototype.parseParam=function(e){var t=db(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=db(this.remaining);r&&this.capture(n=r)}e[ab(t)]=ab(n)}},e.prototype.parseQueryParam=function(e){var t,n=(t=this.remaining.match(pb))?t[0]:"";if(n){this.capture(n);var r="";if(this.consumeOptional("=")){var i=function(e){var t=e.match(hb);return t?t[0]:""}(this.remaining);i&&this.capture(r=i)}var o=ub(n),s=ub(r);if(e.hasOwnProperty(o)){var a=e[o];Array.isArray(a)||(e[o]=a=[a]),a.push(s)}else e[o]=s}},e.prototype.parseParens=function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=db(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i=Mv);var o=this.parseChildren();t[i]=1===Object.keys(o).length?o[Mv]:new Kv([],o),this.consumeOptional("//")}return t},e.prototype.peekStartsWith=function(e){return this.remaining.startsWith(e)},e.prototype.consumeOptional=function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)},e.prototype.capture=function(e){if(!this.consumeOptional(e))throw new Error('Expected "'+e+'".')},e}(),mb=function(e){this.segmentGroup=e||null},gb=function(e){this.urlTree=e};function yb(e){return new x(function(t){return t.error(new mb(e))})}function vb(e){return new x(function(t){return t.error(new gb(e))})}function bb(e){return new x(function(t){return t.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+e+"'"))})}var _b=function(){function e(e,t,n,r,i){this.configLoader=t,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=e.get(Pt)}return e.prototype.apply=function(){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,Mv).pipe(F(function(t){return e.createUrlTree(t,e.urlTree.queryParams,e.urlTree.fragment)})).pipe(ay(function(t){if(t instanceof gb)return e.allowRedirects=!1,e.match(t.urlTree);if(t instanceof mb)throw e.noMatchError(t);throw t}))},e.prototype.match=function(e){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,e.root,Mv).pipe(F(function(n){return t.createUrlTree(n,e.queryParams,e.fragment)})).pipe(ay(function(e){if(e instanceof mb)throw t.noMatchError(e);throw e}))},e.prototype.noMatchError=function(e){return new Error("Cannot match any routes. URL Segment: '"+e.segmentGroup+"'")},e.prototype.createUrlTree=function(e,t,n){var r,i=e.segments.length>0?new Kv([],((r={})[Mv]=e,r)):e;return new Yv(i,t,n)},e.prototype.expandSegmentGroup=function(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(F(function(e){return new Kv([],e)})):this.expandSegment(e,n,t,n.segments,r,!0)},e.prototype.expandChildren=function(e,t,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Cu({});var o=[],s=[],a={};return Wv(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(e,t,l,u)).pipe(F(function(e){return a[i]=e}));i===Mv?o.push(c):s.push(c)}),Cu.apply(null,o.concat(s)).pipe(xu(),lv(),F(function(){return a}))}(n.children)},e.prototype.expandSegment=function(e,t,n,i,o,s){var a=this;return Cu.apply(void 0,Object(r.__spread)(n)).pipe(F(function(r){return a.expandSegmentAgainstRoute(e,t,n,r,i,o,s).pipe(ay(function(e){if(e instanceof mb)return Cu(null);throw e}))}),xu(),hv(function(e){return!!e}),ay(function(e,n){if(e instanceof ev||"EmptyError"===e.name){if(a.noLeftoversInUrl(t,i,o))return Cu(new Kv([],{}));throw new mb(t)}throw e}))},e.prototype.noLeftoversInUrl=function(e,t,n){return 0===t.length&&!e.children[n]},e.prototype.expandSegmentAgainstRoute=function(e,t,n,r,i,o,s){return Cb(r)!==o?yb(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,i):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o):yb(t)},e.prototype.expandSegmentAgainstRouteUsingRedirect=function(e,t,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o)},e.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(e,t,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?vb(o):this.lineralizeSegments(n,o).pipe(G(function(n){var o=new Kv(n,{});return i.expandSegment(e,o,t,n,r,!1)}))},e.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(e,t,n,r,i,o){var s=this,a=wb(t,r,i),u=a.consumedSegments,l=a.lastChild,c=a.positionalParamSegments;if(!a.matched)return yb(t);var d=this.applyRedirectCommands(u,r.redirectTo,c);return r.redirectTo.startsWith("/")?vb(d):this.lineralizeSegments(r,d).pipe(G(function(r){return s.expandSegment(e,t,n,r.concat(i.slice(l)),o,!1)}))},e.prototype.matchSegmentAgainstRoute=function(e,t,n,i){var o=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(F(function(e){return n._loadedConfig=e,new Kv(i,{})})):Cu(new Kv(i,{}));var s=wb(t,n,i),a=s.consumedSegments,u=s.lastChild;if(!s.matched)return yb(t);var l=i.slice(u);return this.getChildConfig(e,n).pipe(G(function(e){var n=e.module,i=e.routes,s=function(e,t,n,i){return n.length>0&&function(e,t,n){return i.some(function(n){return Sb(e,t,n)&&Cb(n)!==Mv})}(e,n)?{segmentGroup:Eb(new Kv(t,function(e,t){var n,i,o={};o[Mv]=t;try{for(var s=Object(r.__values)(e),a=s.next();!a.done;a=s.next()){var u=a.value;""===u.path&&Cb(u)!==Mv&&(o[Cb(u)]=new Kv([],{}))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o}(i,new Kv(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return i.some(function(n){return Sb(e,t,n)})}(e,n)?{segmentGroup:Eb(new Kv(e.segments,function(e,t,n,i){var o,s,a={};try{for(var u=Object(r.__values)(n),l=u.next();!l.done;l=u.next()){var c=l.value;Sb(e,t,c)&&!i[Cb(c)]&&(a[Cb(c)]=new Kv([],{}))}}catch(e){o={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}return Object(r.__assign)({},i,a)}(e,n,i,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,a,l,i),u=s.segmentGroup,c=s.slicedSegments;return 0===c.length&&u.hasChildren()?o.expandChildren(n,i,u).pipe(F(function(e){return new Kv(a,e)})):0===i.length&&0===c.length?Cu(new Kv(a,{})):o.expandSegment(n,u,i,c,Mv,!0).pipe(F(function(e){return new Kv(a.concat(e.segments),e.children)}))}))},e.prototype.getChildConfig=function(e,t){var n=this;return t.children?Cu(new Lv(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Cu(t._loadedConfig):function(e,t){var n=t.canLoad;return n&&0!==n.length?qv(H(n).pipe(F(function(n){var r=e.get(n);return Qv(r.canLoad?r.canLoad(t):r(t))}))):Cu(!0)}(e.injector,t).pipe(G(function(r){return r?n.configLoader.load(e.injector,t).pipe(F(function(e){return t._loadedConfig=e,e})):function(e){return new x(function(t){return t.error(((n=Error("NavigationCancelingError: Cannot load children because the guard of the route \"path: '"+e.path+"'\" returned false")).ngNavigationCancelingError=!0,n));var n})}(t)})):Cu(new Lv([],e))},e.prototype.lineralizeSegments=function(e,t){for(var n=[],r=t.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Cu(n);if(r.numberOfChildren>1||!r.children[Mv])return bb(e.redirectTo);r=r.children[Mv]}},e.prototype.applyRedirectCommands=function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)},e.prototype.applyRedirectCreatreUrlTree=function(e,t,n,r){var i=this.createSegmentGroup(e,t.root,n,r);return new Yv(i,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)},e.prototype.createQueryParams=function(e,t){var n={};return Wv(e,function(e,r){if("string"==typeof e&&e.startsWith(":")){var i=e.substring(1);n[r]=t[i]}else n[r]=e}),n},e.prototype.createSegmentGroup=function(e,t,n,r){var i=this,o=this.createSegments(e,t.segments,n,r),s={};return Wv(t.children,function(t,o){s[o]=i.createSegmentGroup(e,t,n,r)}),new Kv(o,s)},e.prototype.createSegments=function(e,t,n,r){var i=this;return t.map(function(t){return t.path.startsWith(":")?i.findPosParam(e,t,r):i.findOrReturn(t,n)})},e.prototype.findPosParam=function(e,t,n){var r=n[t.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+e+"'. Cannot find '"+t.path+"'.");return r},e.prototype.findOrReturn=function(e,t){var n,i,o=0;try{for(var s=Object(r.__values)(t),a=s.next();!a.done;a=s.next()){var u=a.value;if(u.path===e.path)return t.splice(o),u;o++}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return e},e}();function wb(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(t.matcher||jv)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Eb(e){if(1===e.numberOfChildren&&e.children[Mv]){var t=e.children[Mv];return new Kv(e.segments.concat(t.segments),t.children)}return e}function Sb(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Cb(e){return e.outlet||Mv}var xb=function(){function e(e){this._root=e}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),e.prototype.parent=function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null},e.prototype.children=function(e){var t=Ob(e,this._root);return t?t.children.map(function(e){return e.value}):[]},e.prototype.firstChild=function(e){var t=Ob(e,this._root);return t&&t.children.length>0?t.children[0].value:null},e.prototype.siblings=function(e){var t=Tb(e,this._root);return t.length<2?[]:t[t.length-2].children.map(function(e){return e.value}).filter(function(t){return t!==e})},e.prototype.pathFromRoot=function(e){return Tb(e,this._root).map(function(e){return e.value})},e}();function Ob(e,t){if(e===t.value)return t;try{for(var n=Object(r.__values)(t.children),i=n.next();!i.done;i=n.next()){var o=Ob(e,i.value);if(o)return o}}catch(e){s={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}}return null;var s,a}function Tb(e,t){if(e===t.value)return[t];try{for(var n=Object(r.__values)(t.children),i=n.next();!i.done;i=n.next()){var o=Tb(e,i.value);if(o.length)return o.unshift(t),o}}catch(e){s={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}}return[];var s,a}var Ib=function(){function e(e,t){this.value=e,this.children=t}return e.prototype.toString=function(){return"TreeNode("+this.value+")"},e}();function kb(e){var t={};return e&&e.children.forEach(function(e){return t[e.value.outlet]=e}),t}var Ab=function(e){function t(t,n){var r=e.call(this,t)||this;return r.snapshot=n,jb(r,t),r}return Object(r.__extends)(t,e),t.prototype.toString=function(){return this.snapshot.toString()},t}(xb);function Pb(e,t){var n=function(e,t){var n=new Nb([],{},{},"",{},Mv,t,null,e.root,-1,{});return new Db("",new Ib(n,[]))}(e,t),r=new sp([new Xv("",{})]),i=new sp({}),o=new sp({}),s=new sp({}),a=new sp(""),u=new Rb(r,i,s,a,o,Mv,t,n.root);return u.snapshot=n.root,new Ab(new Ib(u,[]),n)}var Rb=function(){function e(e,t,n,r,i,o,s,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(e.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(F(function(e){return Dv(e)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(F(function(e){return Dv(e)}))),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},e}();function Mb(e,t){void 0===t&&(t="emptyOnly");var n=e.pathFromRoot,i=0;if("always"!==t)for(i=n.length-1;i>=1;){var o=n[i],s=n[i-1];if(o.routeConfig&&""===o.routeConfig.path)i--;else{if(s.component)break;i--}}return function(e){return e.reduce(function(e,t){return{params:Object(r.__assign)({},e.params,t.params),data:Object(r.__assign)({},e.data,t.data),resolve:Object(r.__assign)({},e.resolve,t._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(i))}var Nb=function(){function e(e,t,n,r,i,o,s,a,u,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this.routeConfig=a,this._urlSegment=u,this._lastPathIndex=l,this._resolve=c}return Object.defineProperty(e.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=Dv(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=Dv(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"Route(url:'"+this.url.map(function(e){return e.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},e}(),Db=function(e){function t(t,n){var r=e.call(this,n)||this;return r.url=t,jb(r,n),r}return Object(r.__extends)(t,e),t.prototype.toString=function(){return Lb(this._root)},t}(xb);function jb(e,t){t.value._routerState=e,t.children.forEach(function(t){return jb(e,t)})}function Lb(e){var t=e.children.length>0?" { "+e.children.map(Lb).join(", ")+" } ":"";return""+e.value+t}function Vb(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Uv(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),Uv(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n0&&zb(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(e){return"object"==typeof e&&null!=e&&e.outlets});if(r&&r!==Gv(n))throw new Error("{outlets:{}} has to be the last command")}return e.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},e}(),Hb=function(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n};function Gb(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets[Mv]:""+e}function Wb(e,t,n){if(e||(e=new Kv([],{})),0===e.segments.length&&e.hasChildren())return qb(e,t,n);var r=function(e,t,n){for(var r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};i=n.length)return o;var s=e.segments[i],a=Gb(n[r]),u=r0&&void 0===a)break;if(a&&u&&"object"==typeof u&&void 0===u.outlets){if(!Kb(a,u,s))return o;r+=2}else{if(!Kb(a,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex=2?function(n){return S(fv(e,t),tv(1),sv(t))(n)}:function(t){return S(fv(function(t,n,r){return e(t,n,r+1)}),tv(1))(t)}}(function(e,t){return e})):Cu(null)},e.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},e.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},e.prototype.setupChildRouteGuards=function(e,t,n,r){var i=this,o=kb(t);e.children.forEach(function(e){i.setupRouteGuards(e,o[e.value.outlet],n,r.concat([e.value])),delete o[e.value.outlet]}),Wv(o,function(e,t){return i.deactivateRouteAndItsChildren(e,n.getContext(t))})},e.prototype.setupRouteGuards=function(e,t,n,r){var i=e.value,o=t?t.value:null,s=n?n.getContext(e.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var a=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);a?this.canActivateChecks.push(new Xb(r)):(i.data=o.data,i._resolvedData=o._resolvedData),this.setupChildRouteGuards(e,t,i.component?s?s.children:null:n,r),a&&this.canDeactivateChecks.push(new Jb(s.outlet.component,o))}else o&&this.deactivateRouteAndItsChildren(t,s),this.canActivateChecks.push(new Xb(r)),this.setupChildRouteGuards(e,null,i.component?s?s.children:null:n,r)},e.prototype.shouldRunGuardsAndResolvers=function(e,t,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!Fb(e,t)||!Uv(e.queryParams,t.queryParams);case"paramsChange":default:return!Fb(e,t)}},e.prototype.deactivateRouteAndItsChildren=function(e,t){var n=this,r=kb(e),i=e.value;Wv(r,function(e,r){n.deactivateRouteAndItsChildren(e,i.component?t?t.children.getContext(r):null:t)}),this.canDeactivateChecks.push(new Jb(i.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,i))},e.prototype.runCanDeactivateChecks=function(){var e=this;return H(this.canDeactivateChecks).pipe(G(function(t){return e.runCanDeactivate(t.component,t.route)}),cv(function(e){return!0===e}))},e.prototype.runCanActivateChecks=function(){var e=this;return H(this.canActivateChecks).pipe(qg(function(t){return qv(H([e.fireChildActivationStart(t.route.parent),e.fireActivationStart(t.route),e.runCanActivateChild(t.path),e.runCanActivate(t.route)]))}),cv(function(e){return!0===e}))},e.prototype.fireActivationStart=function(e){return null!==e&&this.forwardEvent&&this.forwardEvent(new Pv(e)),Cu(!0)},e.prototype.fireChildActivationStart=function(e){return null!==e&&this.forwardEvent&&this.forwardEvent(new kv(e)),Cu(!0)},e.prototype.runCanActivate=function(e){var t=this,n=e.routeConfig?e.routeConfig.canActivate:null;return n&&0!==n.length?qv(H(n).pipe(F(function(n){var r=t.getToken(n,e);return Qv(r.canActivate?r.canActivate(e,t.future):r(e,t.future)).pipe(hv())}))):Cu(!0)},e.prototype.runCanActivateChild=function(e){var t=this,n=e[e.length-1];return qv(H(e.slice(0,e.length-1).reverse().map(function(e){return t.extractCanActivateChild(e)}).filter(function(e){return null!==e})).pipe(F(function(e){return qv(H(e.guards).pipe(F(function(r){var i=t.getToken(r,e.node);return Qv(i.canActivateChild?i.canActivateChild(n,t.future):i(n,t.future)).pipe(hv())})))})))},e.prototype.extractCanActivateChild=function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null},e.prototype.runCanDeactivate=function(e,t){var n=this,r=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return r&&0!==r.length?H(r).pipe(G(function(r){var i=n.getToken(r,t);return Qv(i.canDeactivate?i.canDeactivate(e,t,n.curr,n.future):i(e,t,n.curr,n.future)).pipe(hv())})).pipe(cv(function(e){return!0===e})):Cu(!0)},e.prototype.runResolve=function(e,t){return this.resolveNode(e._resolve,e).pipe(F(function(n){return e._resolvedData=n,e.data=Object(r.__assign)({},e.data,Mb(e,t).resolve),null}))},e.prototype.resolveNode=function(e,t){var n=this,r=Object.keys(e);if(0===r.length)return Cu({});if(1===r.length){var i=r[0];return this.getResolver(e[i],t).pipe(F(function(e){return(t={})[i]=e,t;var t}))}var o={};return H(r).pipe(G(function(r){return n.getResolver(e[r],t).pipe(F(function(e){return o[r]=e,e}))})).pipe(lv(),F(function(){return o}))},e.prototype.getResolver=function(e,t){var n=this.getToken(e,t);return Qv(n.resolve?n.resolve(t,this.future):n(t,this.future))},e.prototype.getToken=function(e,t){var n=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(n?n.module.injector:this.moduleInjector).get(e)},e}(),e_=function(){},t_=function(){function e(e,t,n,r,i){this.rootComponentType=e,this.config=t,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i}return e.prototype.recognize=function(){try{var e=i_(this.urlTree.root,[],[],this.config).segmentGroup,t=this.processSegmentGroup(this.config,e,Mv),n=new Nb([],Object.freeze({}),Object.freeze(Object(r.__assign)({},this.urlTree.queryParams)),this.urlTree.fragment,{},Mv,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Ib(n,t),o=new Db(this.url,i);return this.inheritParamsAndData(o._root),Cu(o)}catch(e){return new x(function(t){return t.error(e)})}},e.prototype.inheritParamsAndData=function(e){var t=this,n=e.value,r=Mb(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(function(e){return t.inheritParamsAndData(e)})},e.prototype.processSegmentGroup=function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)},e.prototype.processChildren=function(e,t){var n,r=this,i=$v(t,function(t,n){return r.processSegmentGroup(e,t,n)});return n={},i.forEach(function(e){var t=n[e.value.outlet];if(t){var r=t.url.map(function(e){return e.toString()}).join("/"),i=e.value.url.map(function(e){return e.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[e.value.outlet]=e.value}),i.sort(function(e,t){return e.value.outlet===Mv?-1:t.value.outlet===Mv?1:e.value.outlet.localeCompare(t.value.outlet)}),i},e.prototype.processSegment=function(e,t,n,i){try{for(var o=Object(r.__values)(e),s=o.next();!s.done;s=o.next()){var a=s.value;try{return this.processSegmentAgainstRoute(a,t,n,i)}catch(e){if(!(e instanceof e_))throw e}}}catch(e){u={error:e}}finally{try{s&&!s.done&&(l=o.return)&&l.call(o)}finally{if(u)throw u.error}}if(this.noLeftoversInUrl(t,n,i))return[];throw new e_;var u,l},e.prototype.noLeftoversInUrl=function(e,t,n){return 0===t.length&&!e.children[n]},e.prototype.processSegmentAgainstRoute=function(e,t,n,i){if(e.redirectTo)throw new e_;if((e.outlet||Mv)!==i)throw new e_;var o,s=[],a=[];if("**"===e.path){var u=n.length>0?Gv(n).parameters:{};o=new Nb(n,u,Object.freeze(Object(r.__assign)({},this.urlTree.queryParams)),this.urlTree.fragment,a_(e),i,e.component,e,n_(t),r_(t)+n.length,u_(e))}else{var l=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new e_;return{consumedSegments:[],lastChild:0,parameters:{}}}var i=(t.matcher||jv)(n,e,t);if(!i)throw new e_;var o={};Wv(i.posParams,function(e,t){o[t]=e.path});var s=i.consumed.length>0?Object(r.__assign)({},o,i.consumed[i.consumed.length-1].parameters):o;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:s}}(t,e,n);s=l.consumedSegments,a=n.slice(l.lastChild),o=new Nb(s,l.parameters,Object.freeze(Object(r.__assign)({},this.urlTree.queryParams)),this.urlTree.fragment,a_(e),i,e.component,e,n_(t),r_(t)+s.length,u_(e))}var c=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),d=i_(t,s,a,c),p=d.segmentGroup,h=d.slicedSegments;if(0===h.length&&p.hasChildren()){var f=this.processChildren(c,p);return[new Ib(o,f)]}if(0===c.length&&0===h.length)return[new Ib(o,[])];var m=this.processSegment(c,p,h,Mv);return[new Ib(o,m)]},e}();function n_(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function r_(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function i_(e,t,n,i){if(n.length>0&&function(e,t,n){return i.some(function(n){return o_(e,t,n)&&s_(n)!==Mv})}(e,n)){var o=new Kv(t,function(e,t,n,i){var o,s,a={};a[Mv]=i,i._sourceSegment=e,i._segmentIndexShift=t.length;try{for(var u=Object(r.__values)(n),l=u.next();!l.done;l=u.next()){var c=l.value;if(""===c.path&&s_(c)!==Mv){var d=new Kv([],{});d._sourceSegment=e,d._segmentIndexShift=t.length,a[s_(c)]=d}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}return a}(e,t,i,new Kv(n,e.children)));return o._sourceSegment=e,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return i.some(function(n){return o_(e,t,n)})}(e,n)){var s=new Kv(e.segments,function(e,t,n,i){var o,s,a={};try{for(var u=Object(r.__values)(n),l=u.next();!l.done;l=u.next()){var c=l.value;if(o_(e,t,c)&&!i[s_(c)]){var d=new Kv([],{});d._sourceSegment=e,d._segmentIndexShift=e.segments.length,a[s_(c)]=d}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}return Object(r.__assign)({},i,a)}(e,n,i,e.children));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}var a=new Kv(e.segments,e.children);return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:n}}function o_(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function s_(e){return e.outlet||Mv}function a_(e){return e.data||{}}function u_(e){return e.resolve||{}}var l_=function(){},c_=function(){function e(){}return e.prototype.shouldDetach=function(e){return!1},e.prototype.store=function(e,t){},e.prototype.shouldAttach=function(e){return!1},e.prototype.retrieve=function(e){return null},e.prototype.shouldReuseRoute=function(e,t){return e.routeConfig===t.routeConfig},e}(),d_=new de("ROUTES"),p_=function(){function e(e,t,n,r){this.loader=e,this.compiler=t,this.onLoadStartListener=n,this.onLoadEndListener=r}return e.prototype.load=function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(F(function(r){n.onLoadEndListener&&n.onLoadEndListener(t);var i=r.create(e);return new Lv(Hv(i.injector.get(d_)).map(Bv),i)}))},e.prototype.loadModuleFactory=function(e){var t=this;return"string"==typeof e?H(this.loader.load(e)):Qv(e()).pipe(G(function(e){return e instanceof Rt?Cu(e):H(t.compiler.compileModuleAsync(e))}))},e}(),h_=function(){},f_=function(){function e(){}return e.prototype.shouldProcessUrl=function(e){return!0},e.prototype.extract=function(e){return e},e.prototype.merge=function(e,t){return e},e}();function m_(e){throw e}function g_(e){return Cu(null)}var y_=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.rootComponentType=e,this.urlSerializer=t,this.rootContexts=n,this.location=r,this.config=a,this.navigations=new sp(null),this.navigationId=0,this.events=new ee,this.errorHandler=m_,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:g_,afterPreactivation:g_},this.urlHandlingStrategy=new f_,this.routeReuseStrategy=new c_,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.ngModule=i.get(Pt),this.resetConfig(a),this.currentUrlTree=new Yv(new Kv([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new p_(o,s,function(e){return u.triggerEvent(new Tv(e))},function(e){return u.triggerEvent(new Iv(e))}),this.routerState=Pb(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return e.prototype.resetRootComponentType=function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType},e.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},e.prototype.setUpLocationChangeListener=function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(t){var n=e.urlSerializer.parse(t.url),r="popstate"===t.type?"popstate":"hashchange",i=t.state&&t.state.navigationId?{navigationId:t.state.navigationId}:null;setTimeout(function(){e.scheduleNavigation(n,r,i,{replaceUrl:!0})},0)}))},Object.defineProperty(e.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),e.prototype.triggerEvent=function(e){this.events.next(e)},e.prototype.resetConfig=function(e){Vv(e),this.config=e.map(Bv),this.navigated=!1,this.lastSuccessfulId=-1},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},e.prototype.createUrlTree=function(e,t){void 0===t&&(t={});var n=t.relativeTo,i=t.queryParams,o=t.fragment,s=t.preserveQueryParams,a=t.queryParamsHandling,u=t.preserveFragment;Jt()&&s&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,c=u?this.currentUrlTree.fragment:o,d=null;if(a)switch(a){case"merge":d=Object(r.__assign)({},this.currentUrlTree.queryParams,i);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=i||null}else d=s?this.currentUrlTree.queryParams:i||null;return null!==d&&(d=this.removeEmptyProps(d)),function(e,t,n,i,o){if(0===n.length)return Bb(t.root,t.root,t,i,o);var s=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Ub(!0,0,e);var t=0,n=!1,i=e.reduce(function(e,i,o){if("object"==typeof i&&null!=i){if(i.outlets){var s={};return Wv(i.outlets,function(e,t){s[t]="string"==typeof e?e.split("/"):e}),Object(r.__spread)(e,[{outlets:s}])}if(i.segmentPath)return Object(r.__spread)(e,[i.segmentPath])}return"string"!=typeof i?Object(r.__spread)(e,[i]):0===o?(i.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):Object(r.__spread)(e,[i])},[]);return new Ub(n,t,i)}(n);if(s.toRoot())return Bb(t.root,new Kv([],{}),t,i,o);var a=function(e,n,r){if(e.isAbsolute)return new Hb(t.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new Hb(r.snapshot._urlSegment,!0,0);var i=zb(e.commands[0])?0:1;return function(t,n,o){for(var s=r.snapshot._urlSegment,a=r.snapshot._lastPathIndex+i,u=e.numberOfDoubleDots;u>a;){if(u-=a,!(s=s.parent))throw new Error("Invalid number of '../'");a=s.segments.length}return new Hb(s,!1,a-u)}()}(s,0,e),u=a.processChildren?qb(a.segmentGroup,a.index,s.commands):Wb(a.segmentGroup,a.index,s.commands);return Bb(a.segmentGroup,u,t,i,o)}(l,this.currentUrlTree,e,d,c)},e.prototype.navigateByUrl=function(e,t){void 0===t&&(t={skipLocationChange:!1});var n=e instanceof Yv?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)},e.prototype.navigate=function(e,t){return void 0===t&&(t={skipLocationChange:!1}),function(e){for(var t=0;tp{padding:20px}.OT_publisher .OT_archiving,.OT_publisher .OT_archiving-light-box,.OT_publisher .OT_archiving-status,.OT_publisher .OT_bar,.OT_publisher .OT_name,.OT_subscriber .OT_archiving,.OT_subscriber .OT_archiving-light-box,.OT_subscriber .OT_archiving-status,.OT_subscriber .OT_bar,.OT_subscriber .OT_name{-ms-box-sizing:border-box;box-sizing:border-box;top:0;left:0;right:0;display:block;height:34px;position:absolute}.OT_publisher .OT_bar,.OT_subscriber .OT_bar{background:rgba(0,0,0,.4)}.OT_publisher .OT_edge-bar-item,.OT_subscriber .OT_edge-bar-item{z-index:1;transition-property:top,bottom,opacity;transition-duration:.5s;transition-timing-function:ease-in}.OT_publisher .OT_name,.OT_subscriber .OT_name{background-color:transparent;color:#fff;font-size:15px;line-height:34px;font-weight:400;padding:0 4px 0 36px}.OT_publisher .OT_archiving-status,.OT_subscriber .OT_archiving-status{background:rgba(0,0,0,.4);top:auto;bottom:0;left:34px;padding:0 4px;color:rgba(255,255,255,.8);font-size:15px;line-height:34px;font-weight:400}.OT_micro .OT_archiving-status,.OT_micro:hover .OT_archiving-status,.OT_mini .OT_archiving-status,.OT_mini:hover .OT_archiving-status{display:none}.OT_publisher .OT_archiving-light-box,.OT_subscriber .OT_archiving-light-box{background:rgba(0,0,0,.4);top:auto;bottom:0;right:auto;width:34px;height:34px}.OT_archiving-light{width:7px;height:7px;border-radius:30px;position:absolute;top:14px;left:14px;background-color:#575757;box-shadow:0 0 5px 1px #575757}.OT_archiving-light.OT_active{background-color:#970d13;animation:1.3s ease-in infinite OT_pulse;-webkit-animation:1.3s ease-in OT_pulse;-moz-animation:1.3s ease-in infinite OT_pulse;-webkit-animation-iteration-count:infinite}@-webkit-keyframes OT_pulse{0%,100%,80%{box-shadow:0 0 0 0 #c70019}30%,50%{box-shadow:0 0 5px 1px #c70019}}.OT_bar.OT_mode-mini,.OT_bar.OT_mode-mini-auto,.OT_mini .OT_bar{bottom:0;height:auto}.OT_mini .OT_name.OT_mode-auto,.OT_mini .OT_name.OT_mode-off,.OT_mini .OT_name.OT_mode-on,.OT_mini:hover .OT_name.OT_mode-auto{display:none}.OT_publisher .OT_name,.OT_subscriber .OT_name{left:10px;right:37px;height:34px;padding-left:0}.OT_publisher .OT_mute,.OT_subscriber .OT_mute{border:none;cursor:pointer;display:block;position:absolute;text-align:center;text-indent:-9999em;background-color:transparent;background-repeat:no-repeat;right:0;top:0;border-left:1px solid rgba(255,255,255,.2);height:36px;width:37px}.OT_mini .OT_mute,.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold{top:50%;left:50%;right:auto;margin-top:-18px;margin-left:-18.5px;border-left:none}.OT_publisher .OT_mute{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII=);background-position:9px 5px}.OT_publisher .OT_mute.OT_active{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);background-position:9px 4px}.OT_subscriber .OT_mute{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);background-position:8px 7px}.OT_subscriber .OT_mute.OT_active{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);background-position:7px 7px}.OT_publisher .OT_edge-bar-item.OT_mode-auto,.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,.OT_publisher .OT_edge-bar-item.OT_mode-off,.OT_subscriber .OT_edge-bar-item.OT_mode-auto,.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto,.OT_subscriber .OT_edge-bar-item.OT_mode-off{top:-25px;opacity:0}.OT_publisher .OT_edge-bar-item.OT_mode-off,.OT_subscriber .OT_edge-bar-item.OT_mode-off{display:none}.OT_mini .OT_mute.OT_mode-auto,.OT_publisher .OT_mute.OT_mode-mini-auto,.OT_subscriber .OT_mute.OT_mode-mini-auto{top:50%}.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off{top:auto;bottom:-25px}.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,.OT_publisher .OT_edge-bar-item.OT_mode-on,.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,.OT_subscriber .OT_edge-bar-item.OT_mode-on,.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto{top:0;opacity:1}.OT_mini .OT_mute.OT_mode-on,.OT_mini:hover .OT_mute.OT_mode-auto,.OT_mute.OT_mode-mini,.OT_root:hover .OT_mute.OT_mode-mini-auto{top:50%}.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto{top:auto;bottom:0;opacity:1}.OT_widget-container{width:100%;height:100%;position:absolute;background-color:#000;overflow:hidden}.OT_root .OT_video-loading{position:absolute;z-index:1;width:100%;height:100%;display:none;background-color:rgba(0,0,0,.75)}.OT_root .OT_video-loading .OT_video-loading-spinner{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzMiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZSIgeDI9IjEiIHkxPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjMzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii42NiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJmIiB4Mj0iMSIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuNjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwIDEgMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;position:absolute;width:32px;height:32px;left:50%;top:50%;margin-left:-16px;margin-top:-16px;-webkit-animation:2s linear infinite OT_spin;animation:2s linear infinite OT_spin}@-webkit-keyframes OT_spin{100%{-webkit-transform:rotate(360deg)}}@keyframes OT_spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.OT_publisher.OT_loading .OT_video-loading,.OT_subscriber.OT_loading .OT_video-loading{display:block}.OT_video-centering{display:table;width:100%;height:100%}.OT_video-container{display:table-cell;vertical-align:middle}.OT_video-poster{position:absolute;z-index:1;width:100%;height:100%;display:none;opacity:.25;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);background-size:auto 76%}.OT_fit-mode-cover .OT_video-element{-o-object-fit:cover;object-fit:cover}@media only screen and (orientation:portrait){.OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element{-o-object-fit:contain!important;object-fit:contain!important}}.OT_fit-mode-contain .OT_video-element{-o-object-fit:contain;object-fit:contain}.OT_fit-mode-cover .OT_video-poster{background-position:center bottom}.OT_fit-mode-contain .OT_video-poster{background-position:center}.OT_audio-level-meter{position:absolute;width:25%;max-width:224px;min-width:21px;top:0;right:0;overflow:hidden}.OT_audio-level-meter:before{content:'';display:block;padding-top:100%}.OT_audio-level-meter__bar{position:absolute;width:192%;height:192%;top:-96%;right:-96%;border-radius:50%;background-color:rgba(0,0,0,.8)}.OT_audio-level-meter__audio-only-img{position:absolute;top:22%;right:15%;width:40%;opacity:.7;background:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) center no-repeat}.OT_audio-level-meter__audio-only-img:before{content:'';display:block;padding-top:100%}.OT_audio-level-meter__value{position:absolute;border-radius:50%;background-image:radial-gradient(circle,rgba(151,206,0,1) 0,rgba(151,206,0,0) 100%)}.OT_audio-level-meter.OT_mode-off{display:none}.OT_audio-level-meter.OT_mode-on,.OT_audio-only .OT_audio-level-meter.OT_mode-auto{display:block}.OT_audio-only.OT_publisher .OT_video-element,.OT_audio-only.OT_subscriber .OT_video-element{display:none}.OT_video-disabled-indicator{opacity:1;border:none;display:none;position:absolute;background-color:transparent;background-repeat:no-repeat;background-position:bottom right;pointer-events:none;top:0;left:0;bottom:3px;right:3px}.OT_video-disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ciAZvbQjQ+RDahpBBKd5ZZsqN758hmImk4KQHnpDd8UwSkCyJarx07d4+3BeKJmlMHyX4qaRxpBCmNFE4KENvHDpAutVERn1kCVBMfeRRgYvZnx62wZPdnZkw92VQA5GClQXYRBze2S+iJmpPVVoJLA9l9QKokjcWKTCT1R5rhLg70NuSsziT16diIKkuAjibrTpJNDkn/e17CahtAjlAWJAYkb29Sb1LE9Rs391kILk8mVkyuIpuZcLKUlEmKkra1WuSTNuesEPzwoEploSVAh9Oiz+BIyd9dOHhtx4OEpFpVg6gbNK3yXX1j48N6U5Dz5i/gc/FDrMY3sTLiSMEkXxGxzUEUAGnbxlPaksMlHUXWAlHS8URCPseSohZbCSLjSSU7ixLXdzhIWVKq4Y7t2a/2bN0qGeKly1fYsVmk6RgIDz4J0bonyUOcjeYqm/8hRoYbWkigV2NH9CHAS60EkUkkw47hSRs6FqT1LR5AVcsrueXlK1d5AO+RpmBrZZEiefByytPCanRGNLZY0uF52gNDYr9sCRB8MHY0SJu2OJWKS2WQV65e4y31DmkCImEi0hBfufRime0RIhpbKen0/Ny9OYNW2ghyYytABjNIaxNuKttAWk6HPLn0k0FevdZwFinPWFIuKZbUV16NVko6jbWSDoPO3pOf8K0jQWLSQ0S9bdpkYck+m7vfWpAiHfKgBsZiGSSt0FqcTeU8WETqAHE2CgcAVd3Gkm4MD3xXYeI6B4NMItvKbcUpQ9gP+KMWnSsW+TaYJtoo+avBWLoKoK0CCSDud+7eXWQGZAXqV3YoQjQCfixJ8+fzj9ta3JHhlUeJ8wJOY2ws6eRKpPS3oqTvHAESEz9ya0naXL5WH6pt3FqSOhTHkTcKEXc6k1POh4Q9YJu/03TT4a8PoGMFI4i2EqSbOZAYaBkpCyD92RkG6KCSbjI/H0HEISBnlOZPFdcEzI2GTO4KBZICGKyAKLTEmJOB2txf5MbgohBINCl4FTqmpJMB2W+HiRn1Q2l6lXyPmiEP6VVE2TfGoaMYrHyPdtAnyI0jEOn9RLWmNEhvBBE7SjpFQZaShtLK+1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);background-size:33px auto}.OT_video-disabled-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U5JXgX5G6nSvSq1R5LATR7aYGkwMG1RSwkWABH+4jUb3vT/uJ1Z0xpjraTBRltrxUQhksIRmgTJyy69+Pv99tv3qYX6FxgU+fU33352xGEHf5wisU7nNWJpZRMkAjZ6aIN1mwV7h29Jo2wCHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);background-size:33px auto}.OT_video-disabled-indicator.OT_active{display:block}.OT_audio-blocked-indicator{opacity:1;border:none;display:none;position:absolute;background-color:transparent;background-repeat:no-repeat;background-position:center;pointer-events:none;top:0;left:0;bottom:0;right:0}.OT_audio-blocked{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);background-size:90px auto}.OT_container-audio-blocked{cursor:pointer}.OT_container-audio-blocked .OT_mute,.OT_container-audio-blocked.OT_mini .OT_edge-bar-item{display:none}.OT_audio-blocked-indicator.OT_active{display:block}.OT_video-unsupported{opacity:1;border:none;display:none;position:absolute;background-color:transparent;background-repeat:no-repeat;background-position:center;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);background-size:58px auto;pointer-events:none;top:0;left:0;bottom:0;right:0;margin-top:-30px}.OT_video-unsupported-bar{display:none;position:absolute;width:192%;height:192%;top:-96%;left:-96%;border-radius:50%;background-color:rgba(0,0,0,.8)}.OT_video-unsupported-img{display:none;position:absolute;top:11%;left:15%;width:70%;opacity:.7;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);background-repeat:no-repeat;background-position:center;background-size:100% auto}.OT_video-unsupported-img:before{content:'';display:block;padding-top:93%}.OT_video-unsupported-text{display:flex;justify-content:center;align-items:center;text-align:center;height:100%;margin-top:40px}"]],data:{}});function H_(e){return Oo(0,[(e()(),di(0,0,null,null,3,"div",[["class","OT_root OT_publisher custom-class"]],null,null,null,null,null)),(e()(),di(1,0,null,null,2,"div",[["class","OT_widget-container"]],null,null,null,null,null)),(e()(),di(2,0,null,null,1,"app-ov-video",[],null,null,null,Xy,Ky)),$i(3,4243456,null,0,Yy,[],{subscriber:[0,"subscriber"]},null)],function(e,t){e(t,3,0,t.context.$implicit)},null)}function G_(e){return Oo(0,[(e()(),di(0,0,null,null,2,"div",[["class","bounds"],["id","layout"]],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,H_)),$i(2,802816,null,0,Ha,[vn,yn,zn],{ngForOf:[0,"ngForOf"]},null)],function(e,t){e(t,2,0,t.component.subscribers)},null)}var W_=ki("app-layout-best-fit",$y,function(e){return Oo(0,[(e()(),di(0,0,null,null,1,"app-layout-best-fit",[],null,[["window","beforeunload"],["window","resize"]],function(e,t,n){var r=!0;return"window:beforeunload"===t&&(r=!1!==zi(e,1).beforeunloadHandler()&&r),"window:resize"===t&&(r=!1!==zi(e,1).sizeChange(n)&&r),r},G_,U_)),$i(1,245760,null,0,$y,[Rb,on],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),q_=function(){};function Q_(e){return Error("A hint was already declared for 'align=\""+e+"\"'.")}var Z_=0,Y_=rd(function(e){this._elementRef=e},"primary"),K_=new de("MAT_FORM_FIELD_DEFAULT_OPTIONS"),X_=function(e){function t(t,n,r,i,o,s,a,u){var l=e.call(this,t)||this;return l._elementRef=t,l._changeDetectorRef=n,l._dir=i,l._defaultOptions=o,l._platform=s,l._ngZone=a,l._showAlwaysAnimate=!1,l._subscriptAnimationState="",l._hintLabel="",l._hintLabelId="mat-hint-"+Z_++,l._outlineGapWidth=0,l._outlineGapStart=0,l._initialGapCalculated=!1,l._labelOptions=r||{},l.floatLabel=l._labelOptions.float||"auto",l._animationsEnabled="NoopAnimations"!==u,l}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"appearance",{get:function(){return this._appearance||this._defaultOptions&&this._defaultOptions.appearance||"legacy"},set:function(e){this._appearance=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hideRequiredMarker",{get:function(){return this._hideRequiredMarker},set:function(e){this._hideRequiredMarker=Ea(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_shouldAlwaysFloat",{get:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_canLabelFloat",{get:function(){return"never"!==this.floatLabel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hintLabel",{get:function(){return this._hintLabel},set:function(e){this._hintLabel=e,this._processHints()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"floatLabel",{get:function(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel},set:function(e){e!==this._floatLabel&&(this._floatLabel=e||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),t.prototype.getConnectedOverlayOrigin=function(){return this._connectionContainerRef||this._elementRef},t.prototype.ngAfterContentInit=function(){var e=this;this._validateControlChild(),this._control.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-"+this._control.controlType),this._control.stateChanges.pipe(Ou(null)).subscribe(function(){e._validatePlaceholders(),e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()}),Y(this._control.ngControl&&this._control.ngControl.valueChanges||Eu,this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){return e._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Ou(null)).subscribe(function(){e._processHints(),e._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Ou(null)).subscribe(function(){e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()})},t.prototype.ngAfterContentChecked=function(){var e=this;this._validateControlChild(),this._initialGapCalculated||(this._ngZone?this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){return e.updateOutlineGap()})}):Promise.resolve().then(function(){return e.updateOutlineGap()}))},t.prototype.ngAfterViewInit=function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()},t.prototype._shouldForward=function(e){var t=this._control?this._control.ngControl:null;return t&&t[e]},t.prototype._hasPlaceholder=function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)},t.prototype._hasLabel=function(){return!!this._labelChild},t.prototype._shouldLabelFloat=function(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat)},t.prototype._hideControlPlaceholder=function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()},t.prototype._hasFloatingLabel=function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()},t.prototype._getDisplayedMessages=function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"},t.prototype._animateAndLockLabel=function(){var e=this;this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,Nu(this._label.nativeElement,"transitionend").pipe(Xu(1)).subscribe(function(){e._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())},t.prototype._validatePlaceholders=function(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")},t.prototype._processHints=function(){this._validateHints(),this._syncDescribedByIds()},t.prototype._validateHints=function(){var e,t,n=this;this._hintChildren&&this._hintChildren.forEach(function(r){if("start"===r.align){if(e||n.hintLabel)throw Q_("start");e=r}else if("end"===r.align){if(t)throw Q_("end");t=r}})},t.prototype._syncDescribedByIds=function(){if(this._control){var e=[];if("hint"===this._getDisplayedMessages()){var t=this._hintChildren?this._hintChildren.find(function(e){return"start"===e.align}):null,n=this._hintChildren?this._hintChildren.find(function(e){return"end"===e.align}):null;t?e.push(t.id):this._hintLabel&&e.push(this._hintLabelId),n&&e.push(n.id)}else this._errorChildren&&(e=this._errorChildren.map(function(e){return e.id}));this._control.setDescribedByIds(e)}},t.prototype._validateControlChild=function(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")},t.prototype.updateOutlineGap=function(){if("outline"===this.appearance&&this._label&&this._label.nativeElement.children.length){if(this._platform&&!this._platform.isBrowser)return void(this._initialGapCalculated=!0);if(!document.documentElement.contains(this._elementRef.nativeElement))return;for(var e=this._getStartEnd(this._connectionContainerRef.nativeElement.getBoundingClientRect()),t=this._getStartEnd(this._label.nativeElement.children[0].getBoundingClientRect()),n=0,r=0,i=this._label.nativeElement.children;r enter",animation:[{type:6,styles:{opacity:0,transform:"translateY(-100%)"},offset:null},{type:4,styles:null,timings:"300ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function ew(e){return Oo(0,[(e()(),di(0,0,null,null,1,"div",[["class","mat-form-field-prefix"]],null,null,null,null,null)),wo(null,0)],null,null)}function tw(e){return Oo(0,[(e()(),di(0,0,null,null,2,null,null,null,null,null,null,null)),wo(null,2),(e()(),So(2,null,["",""]))],null,function(e,t){e(t,2,0,t.component._control.placeholder)})}function nw(e){return Oo(0,[wo(null,3),(e()(),ci(0,null,null,0))],null,null)}function rw(e){return Oo(0,[(e()(),di(0,0,null,null,1,"span",[["aria-hidden","true"],["class","mat-placeholder-required mat-form-field-required-marker"]],null,null,null,null,null)),(e()(),So(-1,null,["\xa0*"]))],null,null)}function iw(e){return Oo(0,[(e()(),di(0,0,[[4,0],["label",1]],null,7,"label",[["class","mat-form-field-label"]],[[1,"for",0],[1,"aria-owns",0],[2,"mat-empty",null],[2,"mat-form-field-empty",null],[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null)),$i(1,16384,null,0,Ya,[],{ngSwitch:[0,"ngSwitch"]},null),(e()(),ci(16777216,null,null,1,null,tw)),$i(3,278528,null,0,Ka,[vn,yn,Ya],{ngSwitchCase:[0,"ngSwitchCase"]},null),(e()(),ci(16777216,null,null,1,null,nw)),$i(5,278528,null,0,Ka,[vn,yn,Ya],{ngSwitchCase:[0,"ngSwitchCase"]},null),(e()(),ci(16777216,null,null,1,null,rw)),$i(7,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,1,0,n._hasLabel()),e(t,3,0,!1),e(t,5,0,!0),e(t,7,0,!n.hideRequiredMarker&&n._control.required&&!n._control.disabled)},function(e,t){var n=t.component;e(t,0,0,n._control.id,n._control.id,n._control.empty&&!n._shouldAlwaysFloat,n._control.empty&&!n._shouldAlwaysFloat,"accent"==n.color,"warn"==n.color)})}function ow(e){return Oo(0,[(e()(),di(0,0,null,null,1,"div",[["class","mat-form-field-suffix"]],null,null,null,null,null)),wo(null,4)],null,null)}function sw(e){return Oo(0,[(e()(),di(0,0,[[1,0],["underline",1]],null,1,"div",[["class","mat-form-field-underline"]],null,null,null,null,null)),(e()(),di(1,0,null,null,0,"span",[["class","mat-form-field-ripple"]],[[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null))],null,function(e,t){var n=t.component;e(t,1,0,"accent"==n.color,"warn"==n.color)})}function aw(e){return Oo(0,[(e()(),di(0,0,null,null,8,null,null,null,null,null,null,null)),(e()(),di(1,0,null,null,3,"div",[["class","mat-form-field-outline"]],null,null,null,null,null)),(e()(),di(2,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(e()(),di(3,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(e()(),di(4,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null)),(e()(),di(5,0,null,null,3,"div",[["class","mat-form-field-outline mat-form-field-outline-thick"]],null,null,null,null,null)),(e()(),di(6,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(e()(),di(7,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(e()(),di(8,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null))],null,function(e,t){var n=t.component;e(t,2,0,n._outlineGapStart),e(t,3,0,n._outlineGapWidth),e(t,6,0,n._outlineGapStart),e(t,7,0,n._outlineGapWidth)})}function uw(e){return Oo(0,[(e()(),di(0,0,null,null,1,"div",[],[[24,"@transitionMessages",0]],null,null,null,null)),wo(null,5)],null,function(e,t){e(t,0,0,t.component._subscriptAnimationState)})}function lw(e){return Oo(0,[(e()(),di(0,0,null,null,1,"div",[["class","mat-hint"]],[[8,"id",0]],null,null,null,null)),(e()(),So(1,null,["",""]))],null,function(e,t){var n=t.component;e(t,0,0,n._hintLabelId),e(t,1,0,n.hintLabel)})}function cw(e){return Oo(0,[(e()(),di(0,0,null,null,5,"div",[["class","mat-form-field-hint-wrapper"]],[[24,"@transitionMessages",0]],null,null,null,null)),(e()(),ci(16777216,null,null,1,null,lw)),$i(2,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),wo(null,6),(e()(),di(4,0,null,null,0,"div",[["class","mat-form-field-hint-spacer"]],null,null,null,null,null)),wo(null,7)],function(e,t){e(t,2,0,t.component.hintLabel)},function(e,t){e(t,0,0,t.component._subscriptAnimationState)})}function dw(e){return Oo(2,[go(671088640,1,{underlineRef:0}),go(402653184,2,{_connectionContainerRef:0}),go(402653184,3,{_inputContainerRef:0}),go(671088640,4,{_label:0}),(e()(),di(4,0,null,null,20,"div",[["class","mat-form-field-wrapper"]],null,null,null,null,null)),(e()(),di(5,0,[[2,0],["connectionContainer",1]],null,9,"div",[["class","mat-form-field-flex"]],null,[[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"click"===t&&(r=!1!==(i._control.onContainerClick&&i._control.onContainerClick(n))&&r),r},null,null)),(e()(),ci(16777216,null,null,1,null,ew)),$i(7,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),di(8,0,[[3,0],["inputContainer",1]],null,4,"div",[["class","mat-form-field-infix"]],null,null,null,null,null)),wo(null,1),(e()(),di(10,0,null,null,2,"span",[["class","mat-form-field-label-wrapper"]],null,null,null,null,null)),(e()(),ci(16777216,null,null,1,null,iw)),$i(12,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),ci(16777216,null,null,1,null,ow)),$i(14,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),ci(16777216,null,null,1,null,sw)),$i(16,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),ci(16777216,null,null,1,null,aw)),$i(18,16384,null,0,Wa,[vn,yn],{ngIf:[0,"ngIf"]},null),(e()(),di(19,0,null,null,5,"div",[["class","mat-form-field-subscript-wrapper"]],null,null,null,null,null)),$i(20,16384,null,0,Ya,[],{ngSwitch:[0,"ngSwitch"]},null),(e()(),ci(16777216,null,null,1,null,uw)),$i(22,278528,null,0,Ka,[vn,yn,Ya],{ngSwitchCase:[0,"ngSwitchCase"]},null),(e()(),ci(16777216,null,null,1,null,cw)),$i(24,278528,null,0,Ka,[vn,yn,Ya],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(e,t){var n=t.component;e(t,7,0,n._prefixChildren.length),e(t,12,0,n._hasFloatingLabel()),e(t,14,0,n._suffixChildren.length),e(t,16,0,"outline"!=n.appearance),e(t,18,0,"outline"==n.appearance),e(t,20,0,n._getDisplayedMessages()),e(t,22,0,"error"),e(t,24,0,"hint")},null)}var pw=!!du()&&{passive:!0},hw=function(){function e(e,t){this._platform=e,this._ngZone=t,this._monitoredElements=new Map}return e.prototype.monitor=function(e){if(!this._platform.isBrowser)return Eu;var t=this._monitoredElements.get(e);if(t)return t.subject.asObservable();var n=new ee,r=function(t){"cdk-text-field-autofill-start"===t.animationName?(e.classList.add("cdk-text-field-autofilled"),n.next({target:t.target,isAutofilled:!0})):"cdk-text-field-autofill-end"===t.animationName&&(e.classList.remove("cdk-text-field-autofilled"),n.next({target:t.target,isAutofilled:!1}))};return this._ngZone.runOutsideAngular(function(){e.addEventListener("animationstart",r,pw),e.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(e,{subject:n,unlisten:function(){e.removeEventListener("animationstart",r,pw)}}),n.asObservable()},e.prototype.stopMonitoring=function(e){var t=this._monitoredElements.get(e);t&&(t.unlisten(),t.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))},e.prototype.ngOnDestroy=function(){var e=this;this._monitoredElements.forEach(function(t,n){return e.stopMonitoring(n)})},e.ngInjectableDef=ce({factory:function(){return new e(Xe(cu),Xe(Vt))},token:e,providedIn:"root"}),e}(),fw=function(){},mw=["button","checkbox","file","hidden","image","radio","range","reset","submit"],gw=0,yw=function(e){function t(t,n,r,i,o,s,a,u,l){var c=e.call(this,s,i,o,r)||this;return c._elementRef=t,c._platform=n,c.ngControl=r,c._autofillMonitor=u,c._uid="mat-input-"+gw++,c._isServer=!1,c.focused=!1,c.stateChanges=new ee,c.controlType="mat-input",c.autofilled=!1,c._disabled=!1,c._required=!1,c._type="text",c._readonly=!1,c._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(e){return hu().has(e)}),c._inputValueAccessor=a||c._elementRef.nativeElement,c._previousNativeValue=c.value,c.id=c.id,n.IOS&&l.runOutsideAngular(function(){t.nativeElement.addEventListener("keyup",function(e){var t=e.target;t.value||t.selectionStart||t.selectionEnd||(t.setSelectionRange(1,1),t.setSelectionRange(0,0))})}),c._isServer=!c._platform.isBrowser,c}return Object(r.__extends)(t,e),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=Ea(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(e){this._required=Ea(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e||"text",this._validateType(),!this._isTextarea()&&hu().has(this._type)&&(this._elementRef.nativeElement.type=this._type)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._inputValueAccessor.value},set:function(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readonly",{get:function(){return this._readonly},set:function(e){this._readonly=Ea(e)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var e=this;this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(function(t){e.autofilled=t.isAutofilled,e.stateChanges.next()})},t.prototype.ngOnChanges=function(){this.stateChanges.next()},t.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)},t.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue()},t.prototype.focus=function(){this._elementRef.nativeElement.focus()},t.prototype._focusChanged=function(e){e===this.focused||this.readonly||(this.focused=e,this.stateChanges.next())},t.prototype._onInput=function(){},t.prototype._dirtyCheckNativeValue=function(){var e=this.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())},t.prototype._validateType=function(){if(mw.indexOf(this._type)>-1)throw Error('Input type "'+this._type+"\" isn't supported by matInput.")},t.prototype._isNeverEmpty=function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1},t.prototype._isBadInput=function(){var e=this._elementRef.nativeElement.validity;return e&&e.badInput},t.prototype._isTextarea=function(){return"textarea"===this._elementRef.nativeElement.nodeName.toLowerCase()},Object.defineProperty(t.prototype,"empty",{get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!0,configurable:!0}),t.prototype.setDescribedByIds=function(e){this._ariaDescribedby=e.join(" ")},t.prototype.onContainerClick=function(){this.focus()},t}(function(e){return function(e){function t(){for(var t=[],n=0;n0){var r=e.slice(0,t),i=e.slice(t+1).trim();n.set(r,i)}}),n},e.prototype.append=function(e,t){var n=this.getAll(e);null===n?this.set(e,t):n.push(t)},e.prototype.delete=function(e){var t=e.toLowerCase();this._normalizedNames.delete(t),this._headers.delete(t)},e.prototype.forEach=function(e){var t=this;this._headers.forEach(function(n,r){return e(n,t._normalizedNames.get(r),t._headers)})},e.prototype.get=function(e){var t=this.getAll(e);return null===t?null:t.length>0?t[0]:null},e.prototype.has=function(e){return this._headers.has(e.toLowerCase())},e.prototype.keys=function(){return Array.from(this._normalizedNames.values())},e.prototype.set=function(e,t){Array.isArray(t)?t.length&&this._headers.set(e.toLowerCase(),[t.join(",")]):this._headers.set(e.toLowerCase(),[t]),this.mayBeSetNormalizedName(e)},e.prototype.values=function(){return Array.from(this._headers.values())},e.prototype.toJSON=function(){var e=this,t={};return this._headers.forEach(function(n,i){var o=[];n.forEach(function(e){return o.push.apply(o,Object(r.__spread)(e.split(",")))}),t[e._normalizedNames.get(i)]=o}),t},e.prototype.getAll=function(e){return this.has(e)&&this._headers.get(e.toLowerCase())||null},e.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},e.prototype.mayBeSetNormalizedName=function(e){var t=e.toLowerCase();this._normalizedNames.has(t)||this._normalizedNames.set(t,e)},e}(),Pw=function(){function e(e){void 0===e&&(e={});var t=e.body,n=e.status,r=e.headers,i=e.statusText,o=e.type,s=e.url;this.body=null!=t?t:null,this.status=null!=n?n:null,this.headers=null!=r?r:null,this.statusText=null!=i?i:null,this.type=null!=o?o:null,this.url=null!=s?s:null}return e.prototype.merge=function(t){return new e({body:t&&null!=t.body?t.body:this.body,status:t&&null!=t.status?t.status:this.status,headers:t&&null!=t.headers?t.headers:this.headers,statusText:t&&null!=t.statusText?t.statusText:this.statusText,type:t&&null!=t.type?t.type:this.type,url:t&&null!=t.url?t.url:this.url})},e}(),Rw=function(e){function t(){return e.call(this,{status:200,statusText:"Ok",type:Tw.Default,headers:new Aw})||this}return Object(r.__extends)(t,e),t}(Pw),Mw=function(){};function Nw(e){if("string"!=typeof e)return e;switch(e.toUpperCase()){case"GET":return Ow.Get;case"POST":return Ow.Post;case"PUT":return Ow.Put;case"DELETE":return Ow.Delete;case"OPTIONS":return Ow.Options;case"HEAD":return Ow.Head;case"PATCH":return Ow.Patch}throw new Error('Invalid request method. The method "'+e+'" is not supported.')}var Dw=function(e){return e>=200&&e<300},jw=function(){function e(){}return e.prototype.encodeKey=function(e){return Lw(e)},e.prototype.encodeValue=function(e){return Lw(e)},e}();function Lw(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Vw=function(){function e(e,t){void 0===e&&(e=""),void 0===t&&(t=new jw),this.rawParams=e,this.queryEncoder=t,this.paramsMap=function(e){void 0===e&&(e="");var t=new Map;return e.length>0&&e.split("&").forEach(function(e){var n=e.indexOf("="),i=Object(r.__read)(-1==n?[e,""]:[e.slice(0,n),e.slice(n+1)],2),o=i[0],s=i[1],a=t.get(o)||[];a.push(s),t.set(o,a)}),t}(e)}return e.prototype.clone=function(){var t=new e("",this.queryEncoder);return t.appendAll(this),t},e.prototype.has=function(e){return this.paramsMap.has(e)},e.prototype.get=function(e){var t=this.paramsMap.get(e);return Array.isArray(t)?t[0]:null},e.prototype.getAll=function(e){return this.paramsMap.get(e)||[]},e.prototype.set=function(e,t){if(void 0!==t&&null!==t){var n=this.paramsMap.get(e)||[];n.length=0,n.push(t),this.paramsMap.set(e,n)}else this.delete(e)},e.prototype.setAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){var r=t.paramsMap.get(n)||[];r.length=0,r.push(e[0]),t.paramsMap.set(n,r)})},e.prototype.append=function(e,t){if(void 0!==t&&null!==t){var n=this.paramsMap.get(e)||[];n.push(t),this.paramsMap.set(e,n)}},e.prototype.appendAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){for(var r=t.paramsMap.get(n)||[],i=0;i=200&&n.status<=299,n.statusText=t.statusText,n.headers=t.headers,n.type=t.type,n.url=t.url,n}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},t}(Fw),Bw=/^\)\]\}',?\n/,Uw=function(){function e(e,t,n){var r=this;this.request=e,this.response=new x(function(i){var o=t.build();o.open(Ow[e.method].toUpperCase(),e.url),null!=e.withCredentials&&(o.withCredentials=e.withCredentials);var s=function(){var t=1223===o.status?204:o.status,r=null;204!==t&&"string"==typeof(r=void 0===o.response?o.responseText:o.response)&&(r=r.replace(Bw,"")),0===t&&(t=r?200:0);var s,a=Aw.fromResponseHeaderString(o.getAllResponseHeaders()),u=("responseURL"in(s=o)?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):null)||e.url,l=new Pw({body:r,status:t,headers:a,statusText:o.statusText||"OK",url:u});null!=n&&(l=n.merge(l));var c=new zw(l);if(c.ok=Dw(t),c.ok)return i.next(c),void i.complete();i.error(c)},a=function(e){var t=new Pw({body:e,type:Tw.Error,status:o.status,statusText:o.statusText});null!=n&&(t=n.merge(t)),i.error(new zw(t))};if(r.setDetectedContentType(e,o),null==e.headers&&(e.headers=new Aw),e.headers.has("Accept")||e.headers.append("Accept","application/json, text/plain, */*"),e.headers.forEach(function(e,t){return o.setRequestHeader(t,e.join(","))}),null!=e.responseType&&null!=o.responseType)switch(e.responseType){case kw.ArrayBuffer:o.responseType="arraybuffer";break;case kw.Json:o.responseType="json";break;case kw.Text:o.responseType="text";break;case kw.Blob:o.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return o.addEventListener("load",s),o.addEventListener("error",a),o.send(r.request.getBody()),function(){o.removeEventListener("load",s),o.removeEventListener("error",a),o.abort()}})}return e.prototype.setDetectedContentType=function(e,t){if(null==e.headers||null==e.headers.get("Content-Type"))switch(e.contentType){case Iw.NONE:break;case Iw.JSON:t.setRequestHeader("content-type","application/json");break;case Iw.FORM:t.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case Iw.TEXT:t.setRequestHeader("content-type","text/plain");break;case Iw.BLOB:var n=e.blob();n.type&&t.setRequestHeader("content-type",n.type)}},e}(),Hw=function(){function e(e,t){void 0===e&&(e="XSRF-TOKEN"),void 0===t&&(t="X-XSRF-TOKEN"),this._cookieName=e,this._headerName=t}return e.prototype.configureRequest=function(e){var t=Wl().getCookie(this._cookieName);t&&e.headers.set(this._headerName,t)},e}(),Gw=function(){function e(e,t,n){this._browserXHR=e,this._baseResponseOptions=t,this._xsrfStrategy=n}return e.prototype.createConnection=function(e){return this._xsrfStrategy.configureRequest(e),new Uw(e,this._browserXHR,this._baseResponseOptions)},e}(),Ww=function(){function e(e){void 0===e&&(e={});var t=e.method,n=e.headers,r=e.body,i=e.url,o=e.search,s=e.params,a=e.withCredentials,u=e.responseType;this.method=null!=t?Nw(t):null,this.headers=null!=n?n:null,this.body=null!=r?r:null,this.url=null!=i?i:null,this.params=this._mergeSearchParams(s||o),this.withCredentials=null!=a?a:null,this.responseType=null!=u?u:null}return Object.defineProperty(e.prototype,"search",{get:function(){return this.params},set:function(e){this.params=e},enumerable:!0,configurable:!0}),e.prototype.merge=function(t){return new e({method:t&&null!=t.method?t.method:this.method,headers:t&&null!=t.headers?t.headers:new Aw(this.headers),body:t&&null!=t.body?t.body:this.body,url:t&&null!=t.url?t.url:this.url,params:t&&this._mergeSearchParams(t.params||t.search),withCredentials:t&&null!=t.withCredentials?t.withCredentials:this.withCredentials,responseType:t&&null!=t.responseType?t.responseType:this.responseType})},e.prototype._mergeSearchParams=function(e){return e?e instanceof Vw?e.clone():"string"==typeof e?new Vw(e):this._parseParams(e):this.params},e.prototype._parseParams=function(e){var t=this;void 0===e&&(e={});var n=new Vw;return Object.keys(e).forEach(function(r){var i=e[r];Array.isArray(i)?i.forEach(function(e){return t._appendParam(r,e,n)}):t._appendParam(r,i,n)}),n},e.prototype._appendParam=function(e,t,n){"string"!=typeof t&&(t=JSON.stringify(t)),n.append(e,t)},e}(),qw=function(e){function t(){return e.call(this,{method:Ow.Get,headers:new Aw})||this}return Object(r.__extends)(t,e),t}(Ww),Qw=function(e){function t(t){var n=e.call(this)||this,r=t.url;n.url=t.url;var i,o=t.params||t.search;if(o&&(i="object"!=typeof o||o instanceof Vw?o.toString():function(e){var t=new Vw;return Object.keys(e).forEach(function(n){var r=e[n];r&&Array.isArray(r)?r.forEach(function(e){return t.append(n,e.toString())}):t.append(n,r.toString())}),t}(o).toString()).length>0){var s="?";-1!=n.url.indexOf("?")&&(s="&"==n.url[n.url.length-1]?"":"&"),n.url=r+s+i}return n._body=t.body,n.method=Nw(t.method),n.headers=new Aw(t.headers),n.contentType=n.detectContentType(),n.withCredentials=t.withCredentials,n.responseType=t.responseType,n}return Object(r.__extends)(t,e),t.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return Iw.JSON;case"application/x-www-form-urlencoded":return Iw.FORM;case"multipart/form-data":return Iw.FORM_DATA;case"text/plain":case"text/html":return Iw.TEXT;case"application/octet-stream":return this._body instanceof Jw?Iw.ARRAY_BUFFER:Iw.BLOB;default:return this.detectContentTypeFromBody()}},t.prototype.detectContentTypeFromBody=function(){return null==this._body?Iw.NONE:this._body instanceof Vw?Iw.FORM:this._body instanceof Kw?Iw.FORM_DATA:this._body instanceof Xw?Iw.BLOB:this._body instanceof Jw?Iw.ARRAY_BUFFER:this._body&&"object"==typeof this._body?Iw.JSON:Iw.TEXT},t.prototype.getBody=function(){switch(this.contentType){case Iw.JSON:case Iw.FORM:return this.text();case Iw.FORM_DATA:return this._body;case Iw.TEXT:return this.text();case Iw.BLOB:return this.blob();case Iw.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},t}(Fw),Zw=function(){},Yw="object"==typeof window?window:Zw,Kw=Yw.FormData||Zw,Xw=Yw.Blob||Zw,Jw=Yw.ArrayBuffer||Zw;function $w(e,t){return e.createConnection(t).response}function eE(e,t,n,r){return e.merge(new Ww(t?{method:t.method||n,url:t.url||r,search:t.search,params:t.params,headers:t.headers,body:t.body,withCredentials:t.withCredentials,responseType:t.responseType}:{method:n,url:r}))}var tE=function(){function e(e,t){this._backend=e,this._defaultOptions=t}return e.prototype.request=function(e,t){var n;if("string"==typeof e)n=$w(this._backend,new Qw(eE(this._defaultOptions,t,Ow.Get,e)));else{if(!(e instanceof Qw))throw new Error("First argument must be a url string or Request instance.");n=$w(this._backend,e)}return n},e.prototype.get=function(e,t){return this.request(new Qw(eE(this._defaultOptions,t,Ow.Get,e)))},e.prototype.post=function(e,t,n){return this.request(new Qw(eE(this._defaultOptions.merge(new Ww({body:t})),n,Ow.Post,e)))},e.prototype.put=function(e,t,n){return this.request(new Qw(eE(this._defaultOptions.merge(new Ww({body:t})),n,Ow.Put,e)))},e.prototype.delete=function(e,t){return this.request(new Qw(eE(this._defaultOptions,t,Ow.Delete,e)))},e.prototype.patch=function(e,t,n){return this.request(new Qw(eE(this._defaultOptions.merge(new Ww({body:t})),n,Ow.Patch,e)))},e.prototype.head=function(e,t){return this.request(new Qw(eE(this._defaultOptions,t,Ow.Head,e)))},e.prototype.options=function(e,t){return this.request(new Qw(eE(this._defaultOptions,t,Ow.Options,e)))},e}();function nE(){return new Hw}function rE(e,t){return new tE(e,t)}var iE=function(){},oE=function(){},sE=function(){},aE=function(){},uE=function(){},lE=function(){},cE=function(){return function(e,t){su(t)&&!e&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}}(),dE=function(e,t,n){return new Ms(pa,[ha],function(e){return function(e){for(var t={},n=[],r=!1,i=0;i",this._properties=t&&t.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return D.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return P},enumerable:!0,configurable:!0}),t.__load_patch=function(o,i){if(O.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var a="Zone:"+o;n(a),O[o]=i(e,t,S),r(a,a)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{D=D.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state!==g||e.type!==x){var r=e.state!=_;r&&e._transitionTo(_,m),e.runCount++;var o=P;P=e,D={parent:D,zone:this};try{e.type==E&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==g&&e.state!==w&&(e.type==x||e.data&&e.data.isPeriodic?r&&e._transitionTo(m,_):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(g,_,g))),D=D.parent,P=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(k,g);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(w,k,g),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(m,k),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new u(T,e,t,n,r,null))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new u(E,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new u(x,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");e._transitionTo(b,m,_);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,b),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),u=function(){function t(n,r,o,i,a,c){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=c,this.callback=o;var u=this;this.invoke=n===x&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,u,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),j++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==j&&d(),j--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(g,k)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==g&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),s=z("setTimeout"),f=z("Promise"),l=z("then"),p=[],h=!1;function v(t){0===j&&0===p.length&&(o||e[f]&&(o=e[f].resolve(0)),o?o[l](d):e[s](d,0)),t&&p.push(t)}function d(){if(!h){for(h=!0;p.length;){var e=p;p=[];for(var t=0;t=0;n--)"function"==typeof e[n]&&(e[n]=p(e[n],t+"_"+n));return e}function b(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var w="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,T=!("nw"in g)&&void 0!==g.process&&"[object process]"==={}.toString.call(g.process),E=!T&&!w&&!(!d||!y.HTMLElement),x=void 0!==g.process&&"[object process]"==={}.toString.call(g.process)&&!w&&!(!d||!y.HTMLElement),O={},S=function(e){if(e=e||g.event){var t=O[e.type];t||(t=O[e.type]=v("ON_PROPERTY"+e.type));var n=(this||e.target||g)[t],r=n&&n.apply(this,arguments);return void 0==r||r||e.preventDefault(),r}};function D(n,r,o){var i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){delete i.writable,delete i.value;var a=i.get,c=i.set,u=r.substr(2),s=O[u];s||(s=O[u]=v("ON_PROPERTY"+u)),i.set=function(e){var t=this;t||n!==g||(t=g),t&&(t[s]&&t.removeEventListener(u,S),c&&c.apply(t,m),"function"==typeof e?(t[s]=e,t.addEventListener(u,S,!1)):t[s]=null)},i.get=function(){var e=this;if(e||n!==g||(e=g),!e)return null;var t=e[s];if(t)return t;if(a){var o=a&&a.call(this);if(o)return i.set.call(this,o),"function"==typeof e[k]&&e.removeAttribute(r),o}return null},t(n,r,i)}}function P(e,t,n){if(t)for(var r=0;r1?new c(t,n):new c(t),l=e(f,"onmessage");return l&&!1===l.configurable?(u=r(f),s=f,[i,a,"send","close"].forEach(function(e){u[e]=function(){var t=o.call(arguments);if(e===i||e===a){var n=t.length>0?t[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);f[r]=u[r]}}return f[e].apply(f,t)}})):u=f,P(u,["close","error","message","open"],s),u};var u=n.WebSocket;for(var s in c)u[s]=c[s]}(0,u)}}var le=v("unbound");Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=P,n.patchMethod=z,n.bindArguments=_}),Zone.__load_patch("timers",function(e){U(e,"set","clear","Timeout"),U(e,"set","clear","Interval"),U(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){U(e,"request","cancel","AnimationFrame"),U(e,"mozRequest","mozCancel","AnimationFrame"),U(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r=0&&"function"==typeof n[r.cbIdx]?h(r.name,n[r.cbIdx],r,i,null):e.apply(t,n)}})}()}),Zone.__load_patch("XHR",function(e,t){!function(t){var s=XMLHttpRequest.prototype,f=s[c],l=s[u];if(!f){var p=e.XMLHttpRequestEventTarget;if(p){var v=p.prototype;f=v[c],l=v[u]}}var d="readystatechange",y="scheduled";function g(e){XMLHttpRequest[i]=!1;var t=e.data,r=t.target,a=r[o];f||(f=r[c],l=r[u]),a&&l.call(r,d,a);var s=r[o]=function(){r.readyState===r.DONE&&!t.aborted&&XMLHttpRequest[i]&&e.state===y&&e.invoke()};return f.call(r,d,s),r[n]||(r[n]=e),b.apply(r,t.args),XMLHttpRequest[i]=!0,e}function k(){}function m(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}var _=z(s,"open",function(){return function(e,t){return e[r]=0==t[2],e[a]=t[1],_.apply(e,t)}}),b=z(s,"send",function(){return function(e,t){return e[r]?b.apply(e,t):h("XMLHttpRequest.send",k,{target:e,url:e[a],isPeriodic:!1,delay:null,args:t,aborted:!1},g,m)}}),w=z(s,"abort",function(){return function(e){var t=e[n];if(t&&"string"==typeof t.type){if(null==t.cancelFn||t.data&&t.data.aborted)return;t.zone.cancelTask(t)}}})}();var n=v("xhrTask"),r=v("xhrSync"),o=v("xhrListener"),i=v("xhrScheduled"),a=v("xhrURL")}),Zone.__load_patch("geolocation",function(t){t.navigator&&t.navigator.geolocation&&function(t,n){for(var r=t.constructor.name,o=function(o){var i=n[o],a=t[i];if(a){if(!b(e(t,i)))return"continue";t[i]=function(e){var t=function(){return e.apply(this,_(arguments,r+"."+i))};return F(t,e),t}(a)}},i=0;i0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},"9gX7":function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},"9rMk":function(e,t,n){var r=n("XKFU");r(r.S,"Reflect",{has:function(e,t){return t in e}})},Afnz:function(e,t,n){"use strict";var r=n("LQAc"),o=n("XKFU"),i=n("KroJ"),a=n("Mukb"),c=n("hPIQ"),u=n("QaDb"),s=n("fyDq"),f=n("OP3Y"),l=n("K0xU")("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,v,d,y,g){u(n,t,v);var k,m,_,b=function(e){if(!p&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",T="values"==d,E=!1,x=e.prototype,O=x[l]||x["@@iterator"]||d&&x[d],S=O||b(d),D=d?T?b("entries"):S:void 0,P="Array"==t&&x.entries||O;if(P&&(_=f(P.call(new e)))!==Object.prototype&&_.next&&(s(_,w,!0),r||"function"==typeof _[l]||a(_,l,h)),T&&O&&"values"!==O.name&&(E=!0,S=function(){return O.call(this)}),r&&!g||!p&&!E&&x[l]||a(x,l,S),c[t]=S,c[w]=h,d)if(k={values:T?S:b("values"),keys:y?S:b("keys"),entries:D},g)for(m in k)m in x||i(x,m,k[m]);else o(o.P+o.F*(p||E),t,k);return k}},BqfV:function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},CkkT:function(e,t,n){var r=n("m0Pp"),o=n("Ymqv"),i=n("S/j/"),a=n("ne8i"),c=n("zRwo");e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,f=4==e,l=6==e,p=5==e||l,h=t||c;return function(t,c,v){for(var d,y,g=i(t),k=o(g),m=r(c,v,3),_=a(k.length),b=0,w=n?h(t,_):u?h(t,0):void 0;_>b;b++)if((p||b in k)&&(y=m(d=k[b],b,g),e))if(n)w[b]=y;else if(y)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:w.push(d)}else if(f)return!1;return l?-1:s||f?f:w}}},DVgA:function(e,t,n){var r=n("zhAb"),o=n("4R4u");e.exports=Object.keys||function(e){return r(e,o)}},EK0E:function(e,t,n){"use strict";var r,o=n("CkkT")(0),i=n("KroJ"),a=n("Z6vF"),c=n("czNK"),u=n("ZD67"),s=n("0/R4"),f=n("eeVq"),l=n("s5qY"),p=a.getWeak,h=Object.isExtensible,v=u.ufstore,d={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(s(e)){var t=p(e);return!0===t?v(l(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(l(this,"WeakMap"),e,t)}},k=e.exports=n("4LiD")("WeakMap",y,g,u,!0,!0);f(function(){return 7!=(new k).set((Object.freeze||Object)(d),7).get(d)})&&(c((r=u.getConstructor(y,"WeakMap")).prototype,g),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=k.prototype,n=t[e];i(t,e,function(t,o){if(s(t)&&!h(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},EWmC:function(e,t,n){var r=n("LZWt");e.exports=Array.isArray||function(e){return"Array"==r(e)}},EemH:function(e,t,n){var r=n("UqcF"),o=n("RjD/"),i=n("aCFj"),a=n("apmT"),c=n("aagx"),u=n("xpql"),s=Object.getOwnPropertyDescriptor;t.f=n("nh4g")?s:function(e,t){if(e=i(e),t=a(t,!0),u)try{return s(e,t)}catch(e){}if(c(e,t))return o(!r.f.call(e,t),e[t])}},FJW5:function(e,t,n){var r=n("hswa"),o=n("y3w9"),i=n("DVgA");e.exports=n("nh4g")?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},FZcq:function(e,t,n){n("49D4"),n("zq+C"),n("45Tv"),n("uAtd"),n("BqfV"),n("fN/3"),n("iW+S"),n("7Dlh"),n("Opxb"),e.exports=n("g3g5").Reflect},H6hf:function(e,t,n){var r=n("y3w9");e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},I5cv:function(e,t,n){var r=n("XKFU"),o=n("Kuth"),i=n("2OiF"),a=n("y3w9"),c=n("0/R4"),u=n("eeVq"),s=n("8MEG"),f=(n("dyZX").Reflect||{}).construct,l=u(function(){function e(){}return!(f(function(){},[],e)instanceof e)}),p=!u(function(){f(function(){})});r(r.S+r.F*(l||p),"Reflect",{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!l)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var u=n.prototype,h=o(c(u)?u:Object.prototype),v=Function.apply.call(e,h,t);return c(v)?v:h}})},"I8a+":function(e,t,n){var r=n("LZWt"),o=n("K0xU")("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},IlFx:function(e,t,n){var r=n("XKFU"),o=n("y3w9"),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return o(e),!i||i(e)}})},Iw71:function(e,t,n){var r=n("0/R4"),o=n("dyZX").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"J+6e":function(e,t,n){var r=n("I8a+"),o=n("K0xU")("iterator"),i=n("hPIQ");e.exports=n("g3g5").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},JiEa:function(e,t){t.f=Object.getOwnPropertySymbols},K0xU:function(e,t,n){var r=n("VTer")("wks"),o=n("ylqs"),i=n("dyZX").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},KroJ:function(e,t,n){var r=n("dyZX"),o=n("Mukb"),i=n("aagx"),a=n("ylqs")("src"),c=Function.toString,u=(""+c).split("toString");n("g3g5").inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||c.call(this)})},Kuth:function(e,t,n){var r=n("y3w9"),o=n("FJW5"),i=n("4R4u"),a=n("YTvA")("IE_PROTO"),c=function(){},u=function(){var e,t=n("Iw71")("iframe"),r=i.length;for(t.style.display="none",n("+rLv").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" element - if (!options.insertInto) options.insertInto = "head"; - - // By default, add