├── .gitignore ├── LICENSE ├── README.md ├── app.json ├── package.json ├── server ├── config.js ├── oauth.js ├── server.js └── token.js ├── start.js ├── thumbnail.png └── www ├── css └── main.css ├── extensions ├── Viewing.Extension.Markup3D.min.js ├── Viewing.Extension.Transform.min.js └── _Viewing.Extension.ControlSelector.min.js ├── images ├── favicon.ico └── indexpage.png ├── index.html └── js ├── index.js └── oauth.js /.gitignore: -------------------------------------------------------------------------------- 1 | credentials.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Autodesk, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Viewer - NodeJS - Tutorial 2 | 3 | NOTE: This Tutorial has been move into maintance mode. We have released a new Tutorial material that can be found here: 4 | https://learnforge.autodesk.io/#/ 5 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "viewer-nodejs-tutorial", 3 | "description": "This sample show a simple integration of the Forge Viewer", 4 | "repository": "https://github.com/Autodesk-Forge/viewer-nodejs-tutorial", 5 | "logo": "https://avatars0.githubusercontent.com/u/8017462?v=3&s=200", 6 | "keywords": [ 7 | "express", 8 | "framework", 9 | "autodesk", 10 | "forge", 11 | "template", 12 | "Viewer" 13 | ], 14 | "env": { 15 | "FORGE_CLIENT_ID": { 16 | "description": "Forge Client ID" 17 | }, 18 | "FORGE_CLIENT_SECRET": { 19 | "description": "Forge Client Secret" 20 | } 21 | }, 22 | "website": "https://developer.autodesk.com/", 23 | "success_url": "/" 24 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "viewer-nodejs-tutorial", 3 | "version": "1.0.0", 4 | "description": "Getting Started with Viewer and NodeJS", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "NODE_ENV=production node start.js", 8 | "dev": "node start.js", 9 | "nodemon": "nodemon start.js --ignore www/" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/Autodesk-Forge/viewer-nodejs-tutorial.git" 14 | }, 15 | "dependencies": { 16 | "cookie-parser": "^1.4.3", 17 | "express": "^4.13.4", 18 | "bootstrap": "*", 19 | "express-session": "^1.13.0", 20 | "font-awesome": "^4.7.0", 21 | "forge-apis": "^0.4.1", 22 | "jquery": "*", 23 | "moment": "*", 24 | "oauth": "^0.9.14", 25 | "request": "^2.72.0", 26 | "serve-favicon": "^2.3.0" 27 | 28 | }, 29 | "author": "Jaime Rosales", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/Autodesk-Forge/viewer-nodejs-tutorial/issues" 33 | }, 34 | "homepage": "https://github.com/Autodesk-Forge/viewer-nodejs-tutorial#readme" 35 | } 36 | -------------------------------------------------------------------------------- /server/config.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Forge Partner Development 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | 'use strict'; // http://www.w3schools.com/js/js_strict.asp 20 | 21 | module.exports = { 22 | 23 | // Autodesk Forge configuration 24 | 25 | // this this callback URL when creating your client ID and secret 26 | callbackURL: process.env.FORGE_CALLBACK_URL || 'http://localhost:3000/api/forge/callback/oauth', 27 | 28 | // set environment variables or hard-code here 29 | credentials: { 30 | client_id: process.env.FORGE_CLIENT_ID || '', 31 | client_secret: process.env.FORGE_CLIENT_SECRET || '' 32 | }, 33 | 34 | // Required scopes for your application on server-side 35 | scopeInternal: ['data:read','data:write','data:create','data:search'], 36 | // Required scope of the token sent to the client 37 | scopePublic: ['viewables:read'] 38 | }; -------------------------------------------------------------------------------- /server/oauth.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Jaime Rosales 2016 - Forge Developer Partner Services 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////////////////// 18 | 19 | ///////////////////////////////////////////////////////////////////////////////// 20 | // 21 | // Obtaining our Token 22 | // 23 | ///////////////////////////////////////////////////////////////////////////////// 24 | 'use strict'; // http://www.w3schools.com/js/js_strict.asp 25 | // token handling in session 26 | var token = require('./token'); 27 | 28 | // web framework 29 | var express = require('express'); 30 | var router = express.Router(); 31 | 32 | // Forge NPM 33 | var forgeSDK = require('forge-apis'); 34 | 35 | // Forge config information, such as client ID and secret 36 | var config = require('./config'); 37 | 38 | // wait for Autodesk callback (oAuth callback) 39 | router.get('/user/token', function (req, res) { 40 | 41 | try { 42 | var client_id = config.credentials.client_id; 43 | var client_secret = config.credentials.client_secret; 44 | var scopes = config.scopePublic; 45 | 46 | var req = new forgeSDK.AuthClientTwoLegged(client_id, client_secret, scopes); 47 | req.authenticate() 48 | .then(function (credentials) { 49 | 50 | console.log('Token: ' + credentials.access_token); 51 | res.json({ access_token: credentials.access_token, expires_in: credentials.expires_in }); 52 | 53 | }) 54 | .catch(function (error) { 55 | res.status(500).end(error.developerMessage); 56 | }); 57 | } catch (err) { 58 | res.status(500).end(err); 59 | } 60 | }); 61 | 62 | module.exports = router; -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Forge Partner Development 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 'use strict'; 19 | 20 | var express = require('express'); 21 | var cookieParser = require('cookie-parser'); 22 | var session = require('express-session'); 23 | var app = express(); 24 | 25 | // this session will be used to save the oAuth token 26 | app.use(cookieParser()); 27 | app.set('trust proxy', 1) // trust first proxy - HTTPS on Heroku 28 | app.use(session({ 29 | secret: 'autodeskforge', 30 | cookie: { 31 | httpOnly: true, 32 | secure: (process.env.NODE_ENV === 'production'), 33 | maxAge: 1000 * 60 * 60 // 1 hours to expire the session and avoid memory leak 34 | }, 35 | resave: false, 36 | saveUninitialized: true 37 | })); 38 | 39 | // prepare server routing 40 | app.use('/', express.static(__dirname + '/../www')); // redirect static calls 41 | app.use('/js', express.static(__dirname + '/../node_modules/bootstrap/dist/js')); // redirect static calls 42 | app.use('/js', express.static(__dirname + '/../node_modules/moment/min')); // redirect static calls 43 | app.use('/js', express.static(__dirname + '/../node_modules/jquery/dist')); // redirect static calls 44 | app.use('/css', express.static(__dirname + '/../node_modules/bootstrap/dist/css')); // redirect static calls 45 | app.use('/css', express.static(__dirname + '/../node_modules/font-awesome/css')) // redirect static calls 46 | app.use('/fonts', express.static(__dirname + '/../node_modules/font-awesome/fonts')) // redirect static calls 47 | app.use('/fonts', express.static(__dirname + '/../node_modules/bootstrap/dist/fonts')); // redirect static calls 48 | app.set('port', process.env.PORT || 3000); // main port 49 | 50 | // prepare our API endpoint routing 51 | var oauth = require('./oauth'); 52 | app.use('/', oauth); // redirect oauth API calls 53 | 54 | module.exports = app; -------------------------------------------------------------------------------- /server/token.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Forge Partner Development 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | 'use strict'; // http://www.w3schools.com/js/js_strict.asp 20 | 21 | function Token(session) { 22 | this._session = session; 23 | } 24 | 25 | Token.prototype.getOAuth = function () { 26 | return this._session.oAuth; 27 | }; 28 | 29 | Token.prototype.setOAuth = function (oAuth) { 30 | this._session.oAuth = oAuth; 31 | }; 32 | 33 | Token.prototype.getCredentials = function () { 34 | return this._session.credentials; 35 | }; 36 | 37 | Token.prototype.setCredentials = function (credentials) { 38 | this._session.credentials = credentials; 39 | }; 40 | 41 | module.exports = Token; -------------------------------------------------------------------------------- /start.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Forge Partner Development 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | 'use strict'; 20 | 21 | var app = require('./server/server'); 22 | 23 | // start server 24 | var server = app.listen(app.get('port'), function () { 25 | if (process.env.FORGE_CLIENT_ID == null || process.env.FORGE_CLIENT_SECRET == null) 26 | console.log('*****************\nWARNING: Client ID & Client Secret not defined as environment variables.\n*****************'); 27 | 28 | console.log('Starting at ' + (new Date()).toString()); 29 | console.log('Server listening on port ' + server.address().port); 30 | }); -------------------------------------------------------------------------------- /thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk-Forge/viewer-nodejs-tutorial/fea5b19518ad73822ae7f983a167fdef6e38d53f/thumbnail.png -------------------------------------------------------------------------------- /www/css/main.css: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | Author's custom styles 3 | ========================================================================== */ 4 | 5 | body { 6 | padding-top: 50px; 7 | padding-bottom: 20px; 8 | margin: 0; 9 | } 10 | 11 | #viewerDiv { 12 | height: 680px; 13 | width: 860px; 14 | margin-top: 50px; 15 | overflow: hidden; 16 | position: relative; 17 | } 18 | 19 | footer { 20 | padding-top: 50px; 21 | } 22 | 23 | section { 24 | margin-top: 20px; 25 | margin-bottom: 20px; 26 | } 27 | 28 | .container { 29 | padding-left: 10px; 30 | } 31 | 32 | h4 { 33 | color: white; 34 | } 35 | 36 | 37 | /*.myButton {*/ 38 | /*background-color: white;*/ 39 | /*color: #4CAF50;*/ 40 | /*border: 2px solid #4CAF50;*/ 41 | /*border-radius: 8px;*/ 42 | /*display:inline-block;*/ 43 | /*cursor:pointer;*/ 44 | /*font-family:Verdana;*/ 45 | /*font-size:17px;*/ 46 | /*padding:16px 50px;*/ 47 | /*text-decoration:none;*/ 48 | /*margin-top: 1em;*/ 49 | /*-webkit-transition-duration: 0.4s; */ 50 | /*transition-duration: 0.4s;*/ 51 | /*}*/ 52 | 53 | /*.myButton:hover {*/ 54 | /*background-color: #4CAF50; */ 55 | /*color: white;*/ 56 | /*}*/ 57 | 58 | /*.myButton:active {*/ 59 | /*position:relative;*/ 60 | /*top:1px;*/ 61 | /*}*/ 62 | 63 | -------------------------------------------------------------------------------- /www/extensions/Viewing.Extension.Transform.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["Viewing.Extension.Transform"]=e():t["Viewing.Extension.Transform"]=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(14),o=r(i),a=n(11),s=r(a),c=n(12),u=r(c),l=n(17),h=r(l),f=n(16),p=r(f),d=n(213),v=r(d),y=n(212),m=r(y),E=n(104),g=r(E),w=n(102),x=r(w),T=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,e);var r=(0,h.default)(this,(e.__proto__||(0,o.default)(e)).call(this,t,n));return r.translateTool=new v.default(t),r._viewer.toolController.registerTool(r.translateTool),r.rotateTool=new m.default(t),r._viewer.toolController.registerTool(r.rotateTool),r}return(0,p.default)(e,t),(0,u.default)(e,[{key:"load",value:function(){var t=this;if(this._txControl=x.default.createButton("toolbar-translate","fa fa-arrows-alt","Translate Tool",function(){var e=t.translateTool.getName(),n=t.rotateTool.getName();t.translateTool.active?(t._viewer.toolController.deactivateTool(e),t._txControl.container.classList.remove("active"),t._comboCtrl.container.classList.remove("active")):(t._viewer.toolController.activateTool(e),t._txControl.container.classList.add("active"),t._viewer.toolController.deactivateTool(n),t._rxControl.container.classList.remove("active"),t._comboCtrl.container.classList.add("active"))}),this._rxControl=x.default.createButton("toolbar-rotate","fa fa-refresh","Rotate Tool",function(){var e=t.translateTool.getName(),n=t.rotateTool.getName();t.rotateTool.active?(t._viewer.toolController.deactivateTool(n),t._rxControl.container.classList.remove("active"),t._comboCtrl.container.classList.remove("active")):(t._viewer.toolController.activateTool(n),t._rxControl.container.classList.add("active"),t._viewer.toolController.deactivateTool(e),t._txControl.container.classList.remove("active"),t._comboCtrl.container.classList.add("active"))}),this.parentControl=this._options.parentControl,!this.parentControl){var e=this._viewer.getToolbar(!0);this.parentControl=new Autodesk.Viewing.UI.ControlGroup("transform"),e.addControl(this.parentControl)}this._comboCtrl=new Autodesk.Viewing.UI.ComboButton("transform-combo"),this._comboCtrl.setToolTip("Transform Tools"),this._comboCtrl.icon.style.fontSize="24px",this._comboCtrl.icon.style.transform="rotateY(180Deg)",this._comboCtrl.icon.className="glyphicon glyphicon-wrench",this._comboCtrl.addControl(this._txControl),this._comboCtrl.addControl(this._rxControl);var n=this._comboCtrl.onClick;return this._comboCtrl.onClick=function(e){if(t._comboCtrl.container.classList.contains("active")){t._txControl.container.classList.remove("active"),t._rxControl.container.classList.remove("active"),t._comboCtrl.container.classList.remove("active");var r=t.translateTool.getName(),i=t.rotateTool.getName();t._viewer.toolController.deactivateTool(r),t._viewer.toolController.deactivateTool(i)}else n()},this.parentControl.addControl(this._comboCtrl),console.log("Viewing.Extension.Transform loaded"),!0}},{key:"unload",value:function(){this.parentControl.removeControl(this._comboCtrl),this._viewer.toolController.deactivateTool(this.translateTool.getName()),this._viewer.toolController.deactivateTool(this.rotateTool.getName()),console.log("Viewing.Extension.Transform unloaded")}}],[{key:"ExtensionId",get:function(){return"Viewing.Extension.Transform"}}]),e}(g.default);Autodesk.Viewing.theExtensionManager.registerExtension(T.ExtensionId,T)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(34)("wks"),i=n(23),o=n(2).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},function(t,e,n){var r=n(7),i=n(46),o=n(36),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(2),i=n(1),o=n(18),a=n(10),s="prototype",c=function(t,e,n){var u,l,h,f=t&c.F,p=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,m=t&c.W,E=p?i:i[e]||(i[e]={}),g=E[s],w=p?r:d?r[e]:(r[e]||{})[s];p&&(n=e);for(u in n)l=!f&&w&&void 0!==w[u],l&&u in E||(h=l?w[u]:n[u],E[u]=p&&"function"!=typeof w[u]?n[u]:y&&l?o(h,r):m&&w[u]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(h):v&&"function"==typeof h?o(Function.call,h):h,v&&((E.virtual||(E.virtual={}))[u]=h,t&c.R&&g&&!g[u]&&a(g,u,h)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){t.exports=!n(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(49),i=n(32);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),i=n(20);t.exports=n(6)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(80),o=r(i);e.default=function(){function t(t,e){for(var n=0;n0?r:n)(t)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(7),i=n(63),o=n(31),a=n(29)("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n(35)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),u=t.F;r--;)delete u[c][o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(2),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var r=n(13),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(83),o=r(i),a=n(82),s=r(a),c="function"==typeof s.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===c(o.default)?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":"undefined"==typeof t?"undefined":c(t)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(2),i=n(1),o=n(25),a=n(40),s=n(4).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(3)},function(t,e,n){var r=n(30),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(101),o=r(i);o.default.Composer=i.EventsEmitterComposer,e.default=o.default},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(78)(!0);n(50)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(28),i=n(20),o=n(8),a=n(36),s=n(9),c=n(46),u=Object.getOwnPropertyDescriptor;e.f=n(6)?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){t.exports=!n(6)&&!n(15)(function(){return 7!=Object.defineProperty(n(35)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(9),i=n(8),o=n(62)(!1),a=n(29)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){t.exports=n(2).document&&document.documentElement},function(t,e,n){var r=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var r=n(25),i=n(5),o=n(52),a=n(10),s=n(9),c=n(21),u=n(76),l=n(24),h=n(51),f=n(3)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",m=function(){return this};t.exports=function(t,e,n,E,g,w,x){u(n,e,E);var T,R,M,b=function(t){if(!p&&t in z)return z[t];switch(t){case v:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",H=g==y,P=!1,z=t.prototype,k=z[f]||z[d]||g&&z[g],C=k||b(g),G=g?H?b("entries"):C:void 0,A="Array"==e?z.entries||k:k;if(A&&(M=h(A.call(new t)),M!==Object.prototype&&(l(M,_,!0),r||s(M,f)||a(M,f,m))),H&&k&&k.name!==y&&(P=!0,C=function(){return k.call(this)}),r&&!x||!p&&!P&&z[f]||a(z,f,C),c[e]=C,c[_]=m,g)if(T={values:H?C:b(y),keys:w?C:b(v),entries:G},x)for(R in T)R in z||o(z,R,T[R]);else i(i.P+i.F*(p||P),e,T);return T}},function(t,e,n){var r=n(9),i=n(27),o=n(29)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){t.exports=n(10)},function(t,e,n){var r=n(47),i=n(31).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){n(79);for(var r=n(2),i=n(10),o=n(21),a=n(3)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=s[c],l=r[u],h=l&&l.prototype;h&&!h[a]&&i(h,a,u),o[u]=o.Array}},,,function(t,e,n){t.exports={default:n(61),__esModule:!0}},function(t,e){},function(t,e,n){t.exports={default:n(107),__esModule:!0}},function(t,e,n){var r=n(5),i=n(1),o=n(15);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){n(66);var r=n(1).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(8),i=n(41),o=n(64);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(4),i=n(7),o=n(19);t.exports=n(6)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(30),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(67),i=n(3)("iterator"),o=n(21);t.exports=n(1).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(5);r(r.S,"Object",{create:n(33)})},function(t,e,n){var r=n(22),i=n(3)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r,i,o,a=n(18),s=n(110),c=n(48),u=n(35),l=n(2),h=l.process,f=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,v=0,y={},m="onreadystatechange",E=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},g=function(t){E.call(t.data)};f&&p||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},p=function(t){delete y[t]},"process"==n(22)(h)?r=function(t){h.nextTick(a(E,t,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=g,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",g,!1)):r=m in u("script")?function(t){c.appendChild(u("script"))[m]=function(){c.removeChild(this),E.call(t)}}:function(t){setTimeout(a(E,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,n){var r=n(21),i=n(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(7);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(3)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(59),o=r(i);e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,n){function r(i,a){try{var s=e[i](a),c=s.value}catch(t){return void n(t)}return s.done?void t(c):o.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)})}return r("next")})}}},function(t,e,n){t.exports=n(118)},function(t,e,n){t.exports={default:n(106),__esModule:!0}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(33),i=n(20),o=n(24),a={};n(10)(a,n(3)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(30),i=n(32);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c),o<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(75),i=n(77),o=n(21),a=n(8);t.exports=n(50)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){t.exports={default:n(84),__esModule:!0}},function(t,e,n){t.exports={default:n(86),__esModule:!0}},function(t,e,n){t.exports={default:n(87),__esModule:!0}},function(t,e,n){t.exports={default:n(88),__esModule:!0}},function(t,e,n){n(95);var r=n(1).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){n(96),t.exports=n(1).Object.getPrototypeOf},function(t,e,n){n(97),t.exports=n(1).Object.setPrototypeOf},function(t,e,n){n(98),n(58),n(99),n(100),t.exports=n(1).Symbol},function(t,e,n){n(44),n(54),t.exports=n(40).f("iterator")},function(t,e,n){var r=n(19),i=n(43),o=n(28);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(22);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(19),i=n(8);t.exports=function(t,e){for(var n,o=i(t),a=r(o),s=a.length,c=0;s>c;)if(o[n=a[c++]]===e)return n}},function(t,e,n){var r=n(23)("meta"),i=n(13),o=n(9),a=n(4).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(15)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},f=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},p=function(t){return u&&d.NEED&&c(t)&&!o(t,r)&&l(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:f,onFreeze:p}},function(t,e,n){var r=n(8),i=n(53).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},function(t,e,n){var r=n(13),i=n(7),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(18)(Function.call,n(45).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(5);r(r.S+r.F*!n(6),"Object",{defineProperty:n(4).f})},function(t,e,n){var r=n(27),i=n(51);n(60)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(5);r(r.S,"Object",{setPrototypeOf:n(94).set})},function(t,e,n){"use strict";var r=n(2),i=n(9),o=n(6),a=n(5),s=n(52),c=n(92).KEY,u=n(15),l=n(34),h=n(24),f=n(23),p=n(3),d=n(40),v=n(39),y=n(91),m=n(89),E=n(90),g=n(7),w=n(8),x=n(36),T=n(20),R=n(33),M=n(93),b=n(45),_=n(4),H=n(19),P=b.f,z=_.f,k=M.f,C=r.Symbol,G=r.JSON,A=G&&G.stringify,I="prototype",j=p("_hidden"),O=p("toPrimitive"),S={}.propertyIsEnumerable,V=l("symbol-registry"),L=l("symbols"),Y=l("op-symbols"),F=Object[I],X="function"==typeof C,N=r.QObject,Z=!N||!N[I]||!N[I].findChild,D=o&&u(function(){return 7!=R(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(F,e);r&&delete F[e],z(t,e,n),r&&t!==F&&z(F,e,r)}:z,B=function(t){var e=L[t]=R(C[I]);return e._k=t,e},U=X&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},W=function(t,e,n){return t===F&&W(Y,e,n),g(t),e=x(e,!0),g(n),i(L,e)?(n.enumerable?(i(t,j)&&t[j][e]&&(t[j][e]=!1),n=R(n,{enumerable:T(0,!1)})):(i(t,j)||z(t,j,T(1,{})),t[j][e]=!0),D(t,e,n)):z(t,e,n)},Q=function(t,e){g(t);for(var n,r=m(e=w(e)),i=0,o=r.length;o>i;)W(t,n=r[i++],e[n]);return t},q=function(t,e){return void 0===e?R(t):Q(R(t),e)},K=function(t){var e=S.call(this,t=x(t,!0));return!(this===F&&i(L,t)&&!i(Y,t))&&(!(e||!i(this,t)||!i(L,t)||i(this,j)&&this[j][t])||e)},J=function(t,e){if(t=w(t),e=x(e,!0),t!==F||!i(L,e)||i(Y,e)){var n=P(t,e);return!n||!i(L,e)||i(t,j)&&t[j][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=k(w(t)),r=[],o=0;n.length>o;)i(L,e=n[o++])||e==j||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===F,r=k(n?Y:w(t)),o=[],a=0;r.length>a;)!i(L,e=r[a++])||n&&!i(F,e)||o.push(L[e]);return o};X||(C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===F&&e.call(Y,n),i(this,j)&&i(this[j],t)&&(this[j][t]=!1),D(this,t,T(1,n))};return o&&Z&&D(F,t,{configurable:!0,set:e}),B(t)},s(C[I],"toString",function(){return this._k}),b.f=J,_.f=W,n(53).f=M.f=$,n(28).f=K,n(43).f=tt,o&&!n(25)&&s(F,"propertyIsEnumerable",K,!0),d.f=function(t){return B(p(t))}),a(a.G+a.W+a.F*!X,{Symbol:C});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var et=H(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!X,"Symbol",{for:function(t){return i(V,t+="")?V[t]:V[t]=C(t)},keyFor:function(t){if(U(t))return y(V,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){Z=!0},useSimple:function(){Z=!1}}),a(a.S+a.F*!X,"Object",{create:q,defineProperty:W,defineProperties:Q,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:tt}),G&&a(a.S+a.F*(!X||u(function(){var t=C();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!U(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&E(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!U(e))return e}),r[1]=e,A.apply(G,r)}}}),C[I][O]||n(10)(C[I],O,C[I].valueOf),h(C,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(t,e,n){n(39)("asyncIterator")},function(t,e,n){n(39)("observable")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.EventsEmitterComposer=void 0;var i=n(14),o=r(i),a=n(17),s=r(a),c=n(16),u=r(c),l=n(11),h=r(l),f=n(12),p=r(f),d=function(){function t(){(0,h.default)(this,t),this._events={}}return(0,p.default)(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n._events[t]=n._events[t]||[],n._events[t].push(e)}),this}},{key:"off",value:function(t,e){var n=this;return void 0==t?void(this._events={}):(t.split(" ").forEach(function(t){t in n._events!=!1&&(e?n._events[t].splice(n._events[t].indexOf(e),1):n._events[t]=[])}),this)}},{key:"emit",value:function(t){if(void 0!==this._events[t])for(var e=this._events[t].slice(),n=0;n0&&void 0!==arguments[0]?arguments[0]:"xxxxxxxxxxxx",n=(new Date).getTime(),t=e.replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==t?e:7&e|8).toString(16)});return t}}]),t}();e.default=d;e.EventsEmitterComposer=function(t){return function(t){function e(t,n,r,i,a){(0,h.default)(this,e);var c=(0,s.default)(this,(e.__proto__||(0,o.default)(e)).call(this,t,n,r,i,a));return c._events={},c}return(0,u.default)(e,t),(0,p.default)(e,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n._events[t]=n._events[t]||[],n._events[t].push(e)}),this}},{key:"off",value:function(t,e){var n=this;return void 0==t?void(this._events={}):(t.split(" ").forEach(function(t){t in n._events!=!1&&(e?n._events[t].splice(n._events[t].indexOf(e),1):n._events[t]=[])}),this)}},{key:"emit",value:function(t){if(void 0!==this._events[t])for(var e=this._events[t].slice(),n=0;n0&&void 0!==arguments[0]?arguments[0]:"xxxxxxxxxxxx",n=(new Date).getTime(),t=e.replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==t?e:7&e|8).toString(16)});return t}}]),e}(t)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(120),o=r(i);e.default=o.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(14),o=r(i),a=n(11),s=r(a),c=n(12),u=r(c),l=n(17),h=r(l),f=n(16),p=r(f),d=n(42),v=r(d),y=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,e);var r=(0,h.default)(this,(e.__proto__||(0,o.default)(e)).call(this,t,n));return r._viewer=t,r._options=n,r._events={},r}return(0,p.default)(e,t),(0,u.default)(e,[{key:"load",value:function(){return!0}},{key:"unload",value:function(){return!0}}],[{key:"guid",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"xxxxxxxxxx",n=(new Date).getTime(),t=e.replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==t?e:7&e|8).toString(16)});return t}},{key:"ExtensionId",get:function(){return"Viewing.Extension.Base"}}]),e}(v.default.Composer(Autodesk.Viewing.Extension));e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(103),o=r(i);e.default=o.default},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=d.length;e;){for(p=d,d=[];++y1)for(var n=1;ng;g++)if(y=e?E(a(d=t[g])[0],d[1]):E(t[g]),y===u||y===l)return y}else for(v=m.call(t);!(d=v.next()).done;)if(y=i(v,E,d.value,e),y===u||y===l)return y};e.BREAK=u,e.RETURN=l},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(2),i=n(68).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(22)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(o){var l=!0,h=document.createTextNode("");new o(u).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(u)}}else n=function(){i.call(r,u)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(19),i=n(43),o=n(28),a=n(27),s=n(49),c=Object.assign;t.exports=!c||n(15)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=i.f,h=o.f;c>u;)for(var f,p=s(arguments[u++]),d=l?r(p).concat(l(p)):r(p),v=d.length,y=0;v>y;)h.call(p,f=d[y++])&&(n[f]=p[f]);return n}:c},function(t,e,n){var r=n(10);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){"use strict";var r=n(2),i=n(1),o=n(4),a=n(6),s=n(3)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(7),i=n(38),o=n(3)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(5);r(r.S+r.F,"Object",{assign:n(112)})},function(t,e,n){"use strict";var r,i,o,a=n(25),s=n(2),c=n(18),u=n(67),l=n(5),h=n(13),f=n(38),p=n(108),d=n(109),v=n(115),y=n(68).set,m=n(111)(),E="Promise",g=s.TypeError,w=s.process,x=s[E],w=s.process,T="process"==u(w),R=function(){},M=!!function(){try{var t=x.resolve(1),e=(t.constructor={})[n(3)("species")]=function(t){t(R,R)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(R)instanceof e}catch(t){}}(),b=function(t,e){return t===e||t===x&&e===o},_=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e; 2 | },H=function(t){return b(x,t)?new P(t):new i(t)},P=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw g("Bad Promise constructor");e=t,n=r}),this.resolve=f(e),this.reject=f(n)},z=function(t){try{t()}catch(t){return{error:t}}},k=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,c=e.reject,u=e.domain;try{a?(i||(2==t._h&&A(t),t._h=1),a===!0?n=r:(u&&u.enter(),n=a(r),u&&u.exit()),n===e.promise?c(g("Promise-chain cycle")):(o=_(n))?o.call(n,s,c):s(n)):c(r)}catch(t){c(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){y.call(s,function(){var e,n,r,i=t._v;if(G(t)&&(e=z(function(){T?w.emit("unhandledRejection",i,t):(n=s.onunhandledrejection)?n({promise:t,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=T||G(t)?2:1),t._a=void 0,e)throw e.error})},G=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!G(e.promise))return!1;return!0},A=function(t){y.call(s,function(){var e;T?w.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},I=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),k(e,!0))},j=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw g("Promise can't be resolved itself");(e=_(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,c(j,r,1),c(I,r,1))}catch(t){I.call(r,t)}}):(n._v=t,n._s=1,k(n,!1))}catch(t){I.call({_w:n,_d:!1},t)}}};M||(x=function(t){p(this,x,E,"_h"),f(t),r.call(this);try{t(c(j,this,1),c(I,this,1))}catch(t){I.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(113)(x.prototype,{then:function(t,e){var n=H(v(this,x));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&k(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),P=function(){var t=new r;this.promise=t,this.resolve=c(j,t,1),this.reject=c(I,t,1)}),l(l.G+l.W+l.F*!M,{Promise:x}),n(24)(x,E),n(114)(E),o=n(1)[E],l(l.S+l.F*!M,E,{reject:function(t){var e=H(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(a||!M),E,{resolve:function(t){if(t instanceof x&&b(t.constructor,this))return t;var e=H(this),n=e.resolve;return n(t),e.promise}}),l(l.S+l.F*!(M&&n(71)(function(t){x.all(t).catch(R)})),E,{all:function(t){var e=this,n=H(e),r=n.resolve,i=n.reject,o=z(function(){var n=[],o=0,a=1;d(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=H(e),r=n.reject,i=z(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e,n){(function(e){var r="object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this,i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(119),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}}).call(e,function(){return this}())},function(t,e,n){(function(e,n){!function(e){"use strict";function r(t,e,n,r){var i=e&&e.prototype instanceof o?e:o,a=Object.create(i.prototype),s=new d(r||[]);return a._invoke=l(t,n,s),a}function i(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function o(){}function a(){}function s(){}function c(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){function e(n,r,o,a){var s=i(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&g.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},a)}a(s.arg)}function r(t,n){function r(){return new Promise(function(r,i){e(t,n,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof n&&n.domain&&(e=n.domain.bind(e));var o;this._invoke=r}function l(t,e,n){var r=b;return function(o,a){if(r===H)throw new Error("Generator is already running");if(r===P){if("throw"===o)throw a;return y()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=h(s,n);if(c){if(c===z)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===b)throw r=P,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=H;var u=i(t,e,n);if("normal"===u.type){if(r=n.done?P:_,u.arg===z)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=P,n.method="throw",n.arg=u.arg)}}}function h(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,h(t,e),"throw"===e.method))return z;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return z}var r=i(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,z;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=m),e.delegate=null,z):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,z)}function f(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function v(t){if(t){var e=t[x];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),z}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;p(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:v(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),z}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),n(105))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(74),o=r(i),a=n(37),s=r(a),c=n(73),u=r(c),l=n(72),h=r(l),f=n(59),p=r(f),d=n(122),v=r(d),y=n(11),m=r(y),E=n(12),g=r(E),w=function(){function t(){(0,m.default)(this,t)}return(0,g.default)(t,null,[{key:"guid",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"xxxxxxxxxxxx",n=(new Date).getTime(),t=e.replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==t?e:7&e|8).toString(16)});return t}},{key:"getDefaultViewablePath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["3d","2d"],n=t.getRootItem(),r=[].concat((0,v.default)(e)),i=[];return r.forEach(function(t){i=[].concat((0,v.default)(i),(0,v.default)(Autodesk.Viewing.Document.getSubItemsWithProperties(n,{type:"geometry",role:t},!0)))}),i.length?t.getViewablePath(i[0]):null}},{key:"createButton",value:function(t,e,n,r){var i=new Autodesk.Viewing.UI.Button(t);return i.icon.style.fontSize="24px",i.icon.className=e,i.setToolTip(n),i.onClick=r,i}},{key:"createControlGroup",value:function(t,e){var n=t.getToolbar(!0);if(n){var r=new Autodesk.Viewing.UI.ControlGroup(e);return n.addControl(r),r}}},{key:"getLeafNodes",value:function(t,e){return new p.default(function(n,r){try{var i=t.getData().instanceTree;e=e||i.getRootId();for(var o=Array.isArray(e)?e:[e],a=[],s=function t(e){var n=0;i.enumNodeChildren(e,function(e){t(e),++n}),0==n&&a.push(e)},c=0;c2&&void 0!==arguments[2]?arguments[2]:null;return new p.default(function(i,o){try{if(r){var a=r.map(function(r){return t.getProperty(e,n,r,"Not Available")});p.default.all(a).then(function(t){i(t)})}else e.getProperties(n,function(t){return t.properties?i(t.properties):o("No Properties")})}catch(t){return console.log(t),o(t)}})}},{key:"getProperty",value:function(t,e,n,r){return new p.default(function(i,o){try{t.getProperties(e,function(t){if(t.properties){if(t.properties.forEach(function(t){"function"==typeof n?n(t.displayName)&&i(t):n===t.displayName&&i(t)}),r)return i({displayValue:r,displayName:n});o(new Error("Not Found"))}else o(new Error("Error getting properties"))})}catch(t){return o(t)}})}},{key:"getPropertyList",value:function(e,n){var r=this;return new p.default(function(){var i=(0,h.default)(u.default.mark(function i(o,a){var s,c,l;return u.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,s=n.map(function(n){return t.getProperties(e,n)}),r.next=4,p.default.all(s);case 4:return c=r.sent,l=[],c.forEach(function(t){t.forEach(function(t){l.indexOf(t.displayName)<0&&l.push(t.displayName)})}),r.abrupt("return",o(l.sort()));case 10:return r.prev=10,r.t0=r.catch(0),r.abrupt("return",a(r.t0));case 13:case"end":return r.stop()}},i,r,[[0,10]])}));return function(t,e){return i.apply(this,arguments)}}())}},{key:"getBulkPropertiesAsync",value:function(t,e,n){return new p.default(function(r,i){t.getBulkProperties(e,n,function(t){r(t)},function(t){i(t)})})}},{key:"mapComponentsByProp",value:function(e,n,r,i){var a=this;return new p.default(function(){var i=(0,h.default)(u.default.mark(function i(s,c){var l,h,f;return u.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,t.getBulkPropertiesAsync(e,r,[n]);case 3:return l=i.sent,h=l.map(function(t){return(0,o.default)({},t.properties[0],{dbId:t.dbId})}),f={},h.forEach(function(t){var e=t.displayValue;"string"==typeof e&&(e=e.split(":")[0]),f[e]||(f[e]=[]),f[e].push(t.dbId)}),i.abrupt("return",s(f));case 10:return i.prev=10,i.t0=i.catch(0),i.abrupt("return",c(i.t0));case 13:case"end":return i.stop()}},i,a,[[0,10]])}));return function(t,e){return i.apply(this,arguments)}}())}},{key:"runTaskOnDataTree",value:function(t,e){var n=[],r=function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r.children&&r.children.forEach(function(e){t(e,r)});var o=e(r,i);n.push(o)};return r(t),p.default.all(n)}},{key:"drawBox",value:function(t,e,n){function r(e,n){for(var r=[],i=0;i3&&void 0!==arguments[3]?arguments[3]:null,o=i;o||(o=new THREE.LineBasicMaterial({color:16776960,linewidth:2}),t.impl.matman().addMaterial("ADN-Material-Line",o,!0));var a=r([{x:e.x,y:e.y,z:e.z},{x:n.x,y:e.y,z:e.z},{x:n.x,y:e.y,z:e.z},{x:n.x,y:e.y,z:n.z},{x:n.x,y:e.y,z:n.z},{x:e.x,y:e.y,z:n.z},{x:e.x,y:e.y,z:n.z},{x:e.x,y:e.y,z:e.z},{x:e.x,y:n.y,z:n.z},{x:n.x,y:n.y,z:n.z},{x:n.x,y:n.y,z:n.z},{x:n.x,y:n.y,z:e.z},{x:n.x,y:n.y,z:e.z},{x:e.x,y:n.y,z:e.z},{x:e.x,y:n.y,z:e.z},{x:e.x,y:n.y,z:n.z},{x:e.x,y:e.y,z:e.z},{x:e.x,y:n.y,z:e.z},{x:n.x,y:e.y,z:e.z},{x:n.x,y:n.y,z:e.z},{x:n.x,y:e.y,z:n.z},{x:n.x,y:n.y,z:n.z},{x:e.x,y:e.y,z:n.z},{x:e.x,y:n.y,z:n.z}],o);return t.impl.sceneUpdated(!0),a}},{key:"setMaterial",value:function(){function e(t,e,r){return n.apply(this,arguments)}var n=(0,h.default)(u.default.mark(function e(n,r,i){var o,a;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getFragIds(n,r);case 2:o=e.sent,a=n.getFragmentList(),o.forEach(function(t){a.setMaterial(t,i)});case 5:case"end":return e.stop()}},e,this)}));return e}()},{key:"buildModelTree",value:function(t){function e(t){r.enumNodeChildren(t.dbId,function(i){var o=null;n?o=n(i):(t.children=t.children||[],o={dbId:i,name:r.getNodeName(i)},t.children.push(o)),e(o)})}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.getData().instanceTree,i=r.getRootId(),o={dbId:i,name:r.getNodeName(i)};return e(o),o}},{key:"executeTaskOnModelTree",value:function(t,e){function n(o){i.enumNodeChildren(o,function(i){r.push(e(t,i)),n(i)})}var r=[],i=t.getData().instanceTree,o=i.getRootId();return n(o),r}},{key:"isolateFull",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new p.default(function(){var o=(0,h.default)(u.default.mark(function o(a,s){var c,l,h,f;return u.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=r||e.model,e.isolate(i),c=Array.isArray(i)?i:[i],n.next=6,t.getLeafNodes(r,c);case 6:return l=n.sent,n.next=9,t.getLeafNodes(r);case 9:return h=n.sent,f=h.map(function(t){return new p.default(function(n){var r=!l.length||l.indexOf(t)>-1;e.impl.visibilityManager.setNodeOff(t,!r),n()})}),n.abrupt("return",p.default.all(f));case 14:return n.prev=14,n.t0=n.catch(0),n.abrupt("return",s(n.t0));case 17:case"end":return n.stop()}},o,n,[[0,14]])}));return function(t,e){return o.apply(this,arguments)}}())}},{key:"mobile",get:function(){return{getUserAgent:function(){return navigator.userAgent},isAndroid:function(){return this.getUserAgent().match(/Android/i)},isBlackBerry:function(){return this.getUserAgent().match(/BlackBerry/i)},isIOS:function(){return this.getUserAgent().match(/iPhone|iPad|iPod/i)},isOpera:function(){return this.getUserAgent().match(/Opera Mini/i)},isWindows:function(){return this.isWindowsDesktop()||this.isWindowsMobile()},isWindowsMobile:function(){return this.getUserAgent().match(/IEMobile/i)},isWindowsDesktop:function(){return this.getUserAgent().match(/WPDesktop/i)},isAny:function(){return this.isAndroid()||this.isBlackBerry()||this.isIOS()||this.isWindowsMobile()}}}}]),t}();e.default=w},function(t,e,n){t.exports={default:n(123),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(121),o=r(i);e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1?arguments[1]:void 0,y=void 0!==v,m=0,E=l(f);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==E||p==Array&&s(E))for(e=c(f.length),n=new p(e);e>m;m++)u(n,m,y?v(f[m],m):f[m]);else for(h=E.call(f),n=new p;!(i=h.next()).done;m++)u(n,m,y?a(h,v,[i.value,m],!0):i.value);return n.length=m,n}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports={default:n(161),__esModule:!0}},,,,function(t,e,n){n(164),t.exports=n(1).Math.sign},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},,function(t,e,n){var r=n(5);r(r.S,"Math",{sign:n(162)})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(57),o=r(i);!function(){var t=function(t){THREE.MeshBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.side=THREE.FrontSide,this.transparent=!0,this.setValues(t),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(t){t?(this.color.setRGB(1,230/255,3/255),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};t.prototype=(0,o.default)(THREE.MeshBasicMaterial.prototype);var e=function(t){THREE.LineBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.transparent=!0,this.linewidth=3,this.setValues(t),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(t){t?(this.color.setRGB(1,230/255,3/255),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};e.prototype=(0,o.default)(THREE.LineBasicMaterial.prototype),void 0===THREE.PolyhedronGeometry&&(THREE.PolyhedronGeometry=function(t,e,n,r){function i(t){var e=t.normalize().clone();e.index=l.vertices.push(e)-1;var n=s(t)/2/Math.PI+.5,r=c(t)/Math.PI+.5;return e.uv=new THREE.Vector2(n,1-r),e}function o(t,e,n){var r=new THREE.Face3(t.index,e.index,n.index,[t.clone(),e.clone(),n.clone()]);l.faces.push(r),g.copy(t).add(e).add(n).divideScalar(3);var i=s(g);l.faceVertexUvs[0].push([u(t.uv,t,i),u(e.uv,e,i),u(n.uv,n,i)])}function a(t,e){for(var n=Math.pow(2,e),r=(Math.pow(4,e),i(l.vertices[t.a])),a=i(l.vertices[t.b]),s=i(l.vertices[t.c]),c=[],u=0;u<=n;u++){c[u]=[];for(var h=i(r.clone().lerp(s,u/n)),f=i(a.clone().lerp(s,u/n)),p=n-u,d=0;d<=p;d++)0==d&&u==n?c[u][d]=h:c[u][d]=i(h.clone().lerp(f,d/p))}for(var u=0;u.9&&b<.1&&(x<.2&&(w[0].x+=1),T<.2&&(w[1].x+=1),R<.2&&(w[2].x+=1))}for(var h=0,f=this.vertices.length;hMath.abs(e.z)&&(this.activePlane=this.planes.XZ)),"Y"==t&&(this.activePlane=this.planes.XY,Math.abs(e.x)>Math.abs(e.z)&&(this.activePlane=this.planes.YZ)),"Z"==t&&(this.activePlane=this.planes.XZ,Math.abs(e.x)>Math.abs(e.y)&&(this.activePlane=this.planes.YZ)),"XYZ"==t&&(this.activePlane=this.planes.XYZE),"XY"==t&&(this.activePlane=this.planes.XY),"YZ"==t&&(this.activePlane=this.planes.YZ),"XZ"==t&&(this.activePlane=this.planes.XZ),this.hide(),this.show()},this.init()},THREE.TransformGizmoTranslate.prototype=(0,o.default)(THREE.TransformGizmo.prototype),THREE.TransformGizmoRotate=function(){THREE.TransformGizmo.call(this),this.setHandlePickerGizmos=function(){this.handleGizmos={RX:[[new THREE.Line(n(1,"x",.5),new e({color:16711680}))]],RY:[[new THREE.Line(n(1,"y",.5),new e({color:65280}))]],RZ:[[new THREE.Line(n(1,"z",.5),new e({color:255}))]],RE:[[new THREE.Line(n(1.25,"z",1),new e({color:65535}))]],RXYZE:[[new THREE.Line(n(1,"z",1),new e({color:16711935}))]]},this.pickerGizmos={RX:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,4,12,Math.PI),new t({color:16711680,opacity:.25})),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],RY:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,4,12,Math.PI),new t({color:65280,opacity:.25})),[0,0,0],[Math.PI/2,0,0]]],RZ:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,4,12,Math.PI),new t({color:255,opacity:.25})),[0,0,0],[0,0,-Math.PI/2]]],RE:[[new THREE.Mesh(new THREE.TorusGeometry(1.25,.12,2,24),new t({color:65535,opacity:.25}))]],RXYZE:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,2,24),new t({color:16711935,opacity:.25}))]]}},this.setActivePlane=function(t){"RE"==t&&(this.activePlane=this.planes.XYZE),"RX"==t&&(this.activePlane=this.planes.YZ),"RY"==t&&(this.activePlane=this.planes.XZ),"RZ"==t&&(this.activePlane=this.planes.XY), 3 | this.hide(),this.show()},this.update=function(t,e){THREE.TransformGizmo.prototype.update.apply(this,arguments);var n=new THREE.Matrix4,r=new THREE.Euler(0,0,1),i=new THREE.Quaternion,o=new THREE.Vector3(1,0,0),a=new THREE.Vector3(0,1,0),s=new THREE.Vector3(0,0,1),c=new THREE.Quaternion,u=new THREE.Quaternion,l=new THREE.Quaternion,h=e.clone();r.copy(this.planes.XY.rotation),i.setFromEuler(r),n.makeRotationFromQuaternion(i).getInverse(n),h.applyMatrix4(n),this.traverse(function(t){i.setFromEuler(r),"RX"==t.name&&(c.setFromAxisAngle(o,Math.atan2(-h.y,h.z)),i.multiplyQuaternions(i,c),t.quaternion.copy(i)),"RY"==t.name&&(u.setFromAxisAngle(a,Math.atan2(h.x,h.z)),i.multiplyQuaternions(i,u),t.quaternion.copy(i)),"RZ"==t.name&&(l.setFromAxisAngle(s,Math.atan2(h.y,h.x)),i.multiplyQuaternions(i,l),t.quaternion.copy(i))})},this.init()},THREE.TransformGizmoRotate.prototype=(0,o.default)(THREE.TransformGizmo.prototype),THREE.TransformGizmoTranslateRotate=function(){THREE.TransformGizmo.call(this);var e=this;this.setHandlePickerGizmos=function(){var e=r(0,.05,.2,12,1,!1),n=new THREE.Geometry;n.vertices.push(new THREE.Vector3(0,0,-.1),new THREE.Vector3(0,0,.1),new THREE.Vector3(-.1,0,0),new THREE.Vector3(.1,0,0));var i=.15;this.handleGizmos={Z:[[new THREE.Mesh(e,new t({color:16777215})),[0,0,.25],[Math.PI/2,0,0]],[new THREE.Mesh(new THREE.CylinderGeometry(.015,.015,.6,4,1,!1),new t({color:16777215})),[0,0,.5],[Math.PI/2,0,0]]],RX:[[new THREE.Mesh(new THREE.TorusGeometry(1,.015,12,60,2*i*Math.PI),new t({color:16711680})),[0,0,0],[i*Math.PI,-Math.PI/2,0]],[new THREE.Mesh(new THREE.CylinderGeometry(.05,.05,.015,60,1,!1),new t({color:16711680})),[0,0,1],[Math.PI/2,0,0]]],RY:[[new THREE.Mesh(new THREE.TorusGeometry(1,.015,12,60,2*i*Math.PI),new t({color:255})),[0,0,0],[Math.PI/2,0,(.5-i)*Math.PI]],[new THREE.Mesh(new THREE.CylinderGeometry(.05,.05,.01,60,1,!1),new t({color:255})),[0,0,1]]]},this.pickerGizmos={Z:[[new THREE.Mesh(new THREE.CylinderGeometry(.12,.12,.65,4,1,!1),new t({color:255,opacity:.25})),[0,0,.5],[Math.PI/2,0,0]]],RX:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,4,12,2*i*Math.PI),new t({color:16711680,opacity:.25})),[0,0,0],[i*Math.PI,-Math.PI/2,0]]],RY:[[new THREE.Mesh(new THREE.TorusGeometry(1,.12,4,12,2*i*Math.PI),new t({color:255,opacity:.25})),[0,0,0],[Math.PI/2,0,(.5-i)*Math.PI]]]},this.subPickerGizmos={Z:[[new THREE.Mesh(new THREE.CylinderGeometry(.12,.12,.65,4,1,!1),new t({color:255,opacity:.25})),[0,0,.5],[Math.PI/2,0,0]]]},this.highlightGizmos={Z:[],RX:[[new THREE.Mesh(new THREE.TorusGeometry(1,.02,12,60,2*Math.PI),new t({color:16711680,opacity:1})),[0,0,0],[0,-Math.PI/2,-Math.PI/2],!1]],RY:[[new THREE.Mesh(new THREE.TorusGeometry(1,.02,12,60,2*Math.PI),new t({color:255,opacity:1})),[0,0,0],[Math.PI/2,0,0],!1]]},this.hemiPickerGizmos={XYZ:[[new THREE.Mesh(new THREE.SphereGeometry(1.2,8,8,0,Math.PI),new t({color:255})),null,null,!1]]}},this.setActivePlane=function(t,e){if("translate"==this.activeMode){var n=new THREE.Matrix4;e.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"==t&&(this.activePlane=this.planes.XY,Math.abs(e.y)>Math.abs(e.z)&&(this.activePlane=this.planes.XZ)),"Y"==t&&(this.activePlane=this.planes.XY,Math.abs(e.x)>Math.abs(e.z)&&(this.activePlane=this.planes.YZ)),"Z"==t&&(this.activePlane=this.planes.XZ,Math.abs(e.x)>Math.abs(e.y)&&(this.activePlane=this.planes.YZ))}else"rotate"==this.activeMode&&("RX"==t&&(this.activePlane=this.planes.YZ),"RY"==t&&(this.activePlane=this.planes.XZ),"RZ"==t&&(this.activePlane=this.planes.XY));this.hide(),this.show()},this.update=function(t,e){if("translate"==this.activeMode)THREE.TransformGizmo.prototype.update.apply(this,arguments);else if("rotate"==this.activeMode){THREE.TransformGizmo.prototype.update.apply(this,arguments);var n=new THREE.Matrix4,r=new THREE.Euler(0,0,1),i=new THREE.Quaternion,o=new THREE.Vector3(1,0,0),a=new THREE.Vector3(0,1,0),s=new THREE.Vector3(0,0,1),c=new THREE.Quaternion,u=new THREE.Quaternion,l=new THREE.Quaternion,h=e.clone();r.copy(this.planes.XY.rotation),i.setFromEuler(r),n.makeRotationFromQuaternion(i).getInverse(n),h.applyMatrix4(n),this.traverse(function(t){i.setFromEuler(r),"RX"==t.name&&(c.setFromAxisAngle(o,Math.atan2(-h.y,h.z)),i.multiplyQuaternions(i,c),t.quaternion.copy(i)),"RY"==t.name&&(u.setFromAxisAngle(a,Math.atan2(h.x,h.z)),i.multiplyQuaternions(i,u),t.quaternion.copy(i)),"RZ"==t.name&&(l.setFromAxisAngle(s,Math.atan2(h.y,h.x)),i.multiplyQuaternions(i,l),t.quaternion.copy(i))})}},this.show=function(){this.traverse(function(t){(null==e.parent||e.parent.useAllPickers||t.parent!=e.handles)&&(t.visible=!0),t.material&&(t.material.opacity=t.material.oldOpacity),t.parent!=e.pickers&&t.parent!=e.hemiPicker&&t.parent!=e.subPickers||(t.visible=!1),t.parent!=e.planes&&t.parent!=e.highlights||(t.visible=!1)}),this.activePlane.visible=!1},this.highlight=function(t){this.traverse(function(n){n.material&&n.material.highlight&&(n.name==t?(n.parent!=e.highlights&&n.parent!=e.handles||(n.visible=!0),n.material.highlight(!0)):(n.material.highlight(!1),n.material.opacity=.1))})},this.init()},THREE.TransformGizmoTranslateRotate.prototype=(0,o.default)(THREE.TransformGizmo.prototype),THREE.TransformGizmoScale=function(){THREE.TransformGizmo.call(this),this.setHandlePickerGizmos=function(){var n=r(.125,.125,.125),o=i("X"),a=i("Y"),s=i("Z");this.handleGizmos={X:[[new THREE.Mesh(n,new t({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new THREE.Line(o,new e({color:16711680}))]],Y:[[new THREE.Mesh(n,new t({color:65280})),[0,.5,0]],[new THREE.Line(a,new e({color:65280}))]],Z:[[new THREE.Mesh(n,new t({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new THREE.Line(s,new e({color:255}))]],XYZ:[[new THREE.Mesh(new THREE.BoxGeometry(.125,.125,.125),new t({color:16777215,opacity:.25}))]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.CylinderGeometry(.2,0,1,4,1,!1),new t({color:16711680,opacity:.25})),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.CylinderGeometry(.2,0,1,4,1,!1),new t({color:65280,opacity:.25})),[0,.6,0]]],Z:[[new THREE.Mesh(new THREE.CylinderGeometry(.2,0,1,4,1,!1),new t({color:255,opacity:.25})),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new THREE.Mesh(new THREE.BoxGeometry(.4,.4,.4),new t({color:16777215,opacity:.25}))]]}},this.setActivePlane=function(t,e){var n=new THREE.Matrix4;e.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"==t&&(this.activePlane=this.planes.XY,Math.abs(e.y)>Math.abs(e.z)&&(this.activePlane=this.planes.XZ)),"Y"==t&&(this.activePlane=this.planes.XY,Math.abs(e.x)>Math.abs(e.z)&&(this.activePlane=this.planes.YZ)),"Z"==t&&(this.activePlane=this.planes.XZ,Math.abs(e.x)>Math.abs(e.y)&&(this.activePlane=this.planes.YZ)),"XYZ"==t&&(this.activePlane=this.planes.XYZE),this.hide(),this.show()},this.init()},THREE.TransformGizmoScale.prototype=(0,o.default)(THREE.TransformGizmo.prototype),THREE.TransformControls=function(t,e,n){function r(n,r){var i=e.getBoundingClientRect(),o=(n.clientX-i.left)/i.width*2-1,a=2*-((n.clientY-i.top)/i.height)+1;t.isPerspective?(g.set(o,a,.5),g.unproject(t),E.set(t.position,g.sub(t.position).normalize())):(g.set(o,a,-1),g.unproject(t),w.set(0,0,-1),E.set(g,w.transformDirection(t.matrixWorld)));var s=E.intersectObjects(r,!0);return!!s[0]&&s[0]}switch(THREE.Object3D.call(this),e=void 0!==e?e:document,this.gizmo={},n){case"translate":this.gizmo[n]=new THREE.TransformGizmoTranslate;break;case"rotate":this.gizmo[n]=new THREE.TransformGizmoRotate;break;case"transrotate":this.gizmo[n]=new THREE.TransformGizmoTranslateRotate;break;case"scale":this.gizmo[n]=new THREE.TransformGizmoScale}if(this.add(this.gizmo[n]),this.gizmo[n].hide(),this.object=void 0,this.snap=null,this.snapDelta=0,this.space="world",this.size=1,this.axis=null,this.useAllPickers=!0,this.unitX=new THREE.Vector3(1,0,0),this.unitY=new THREE.Vector3(0,1,0),this.unitZ=new THREE.Vector3(0,0,1),this.normal=new THREE.Vector3(0,0,1),"transrotate"===n){var i=new THREE.Geometry;i.vertices.push(new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1));var o=new THREE.LineBasicMaterial({color:0,linewidth:2,depthTest:!1});this.startLine=new THREE.Line(i,o);var i=new THREE.Geometry,o=new THREE.LineBasicMaterial({color:16770563,linewidth:2,depthTest:!1});i.vertices.push(new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)),this.endLine=new THREE.Line(i,o);var i=new THREE.Geometry,o=new THREE.LineDashedMaterial({color:0,linewidth:1,depthTest:!1});i.vertices.push(new THREE.Vector3(0,-1,0),new THREE.Vector3(0,1,0)),this.centerLine=new THREE.Line(i,o);var a=THREE.ImageUtils.loadTexture(Autodesk.Viewing.Private.getResourceUrl("res/textures/centerMarker_X.png"));a.magFilter=a.minFilter=THREE.NearestFilter;var i=new THREE.CircleGeometry(.1,32),o=new THREE.MeshBasicMaterial({opacity:1,side:THREE.DoubleSide,transparent:!0,map:a});this.centerMark=new THREE.Mesh(i,o),this.centerMark.rotation.set(Math.PI/2,0,0),this.ticks={};var a=THREE.ImageUtils.loadTexture(Autodesk.Viewing.Private.getResourceUrl("res/textures/cardinalPoint.png"));a.magFilter=a.minFilter=THREE.NearestFilter;var o=new THREE.MeshBasicMaterial({depthTest:!1,opacity:1,transparent:!0,side:THREE.DoubleSide,map:a}),s=.12,c=.25,u=1.15;this.ticks.RX=new THREE.Object3D;var i=new THREE.PlaneBufferGeometry(s,c),l=new THREE.Mesh(i,o);l.position.set(0,0,-u-c/2),l.rotation.set(Math.PI/2,Math.PI/2,0),this.ticks.RX.add(l),l=l.clone(),l.position.set(0,u+c/2,0),l.rotation.set(0,Math.PI/2,0),this.ticks.RX.add(l),l=l.clone(),l.position.set(0,0,u+c/2),l.rotation.set(0,Math.PI/2,Math.PI/2),this.ticks.RX.add(l),l=l.clone(),l.position.set(0,-u-c/2,0),l.rotation.set(0,Math.PI/2,0),this.ticks.RX.add(l),this.ticks.RY=new THREE.Object3D,l=l.clone(),l.position.set(0,0,-u-c/2),l.rotation.set(Math.PI/2,0,0),this.ticks.RY.add(l),l=l.clone(),l.position.set(-u-c/2,0,0),l.rotation.set(Math.PI/2,0,Math.PI/2),this.ticks.RY.add(l),l=l.clone(),l.position.set(0,0,u+c/2),l.rotation.set(Math.PI/2,0,0),this.ticks.RY.add(l),l=l.clone(),l.position.set(u+c/2,0,0),l.rotation.set(Math.PI/2,0,Math.PI/2),this.ticks.RY.add(l)}var h=this,f=!1,p=n,d={type:"change"},v={type:"mouseDown"},y={type:"mouseUp",mode:p},m={type:"objectChange"},E=new THREE.Raycaster,g=new THREE.Vector3,w=new THREE.Vector3,x=new THREE.Vector3,T=new THREE.Vector3,R=new THREE.Vector3,M=new THREE.Vector3,b=1,_=new THREE.Matrix4,H=new THREE.Vector3,P=new THREE.Matrix4,z=new THREE.Vector3,k=new THREE.Quaternion,C=new THREE.Vector3,G=new THREE.Vector3,A=new THREE.Vector3,I=new THREE.Quaternion,j=new THREE.Quaternion,O=new THREE.Quaternion,S=new THREE.Quaternion,V=new THREE.Quaternion,L=new THREE.Vector3,Y=new THREE.Vector3,F=new THREE.Matrix4,X=new THREE.Matrix4,N=new THREE.Vector3,Z=new THREE.Vector3,D=new THREE.Euler,B=new THREE.Matrix4,U=new THREE.Vector3;new THREE.Euler;this.attach=function(t){h.object=t,this.gizmo[p].show(),h.update(),h.updateUnitVectors()},this.detach=function(t){h.object=void 0,this.axis=null,this.gizmo[p].hide()},this.setMode=function(t){p=t?t:p,"scale"==p&&(h.space="local"),this.gizmo[p].show(),this.update(),h.dispatchEvent(d)},this.getPicker=function(){return h.gizmo[p].hemiPicker.children},this.setPosition=function(t){this.object.position.copy(t),this.update()},this.setNormal=function(t){k.setFromUnitVectors(this.normal,t),this.unitX.applyQuaternion(k),this.unitY.applyQuaternion(k),this.unitZ.applyQuaternion(k),this.normal.copy(t),this.object&&this.object.quaternion.multiply(k),this.update()},this.setSnap=function(t,e){h.snap=t,h.snapDelta=e},this.setSize=function(t){h.size=t,this.update(),h.dispatchEvent(d)},this.setSpace=function(t){h.space=t,this.update(),h.dispatchEvent(d)},this.update=function(n){if(void 0!==h.object){h.object.updateMatrixWorld(),Z.setFromMatrixPosition(h.object.matrixWorld),D.setFromRotationMatrix(P.extractRotation(h.object.matrixWorld)),t.updateMatrixWorld(),U.setFromMatrixPosition(t.matrixWorld),this.position.copy(Z),this.quaternion.setFromEuler(D),this.normal.set(0,0,1),this.normal.applyEuler(D);var r=Z.distanceTo(U),i=t.isPerspective?2*Math.tan(t.fov*Math.PI/360)*r:r,o=e.getBoundingClientRect();b=100*i/o.height,this.scale.set(b,b,b),n&&this.gizmo[p].highlight(h.axis)}},this.updateUnitVectors=function(){this.unitX.set(1,0,0),this.unitY.set(0,1,0),this.unitZ.set(0,0,1),this.unitX.applyEuler(D),this.unitY.applyEuler(D),this.unitZ.applyEuler(D)},this.showRotationGizmos=function(t){for(var e=this.gizmo[p].handles.children,n=0;n ";e(t.container).append(l);var f=e("#"+c);return f.css({top:"70px",left:"0px",position:"absolute"}),f[0].appendChild(i.container),c}function s(){f.toggleVisible()}function a(){var e=(new Date).getTime(),t="xxxx-xxxx-xxxx-xxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:7&n|8).toString(16)});return t}function u(){var t=n.Lockr.get(n.storageKey);e(".adsk-control-group").each(function(){e(this).hasClass("adsk-hidden")||"viewing-extension-ControlSelector-controlgroup"===this.id||e(this).find(">.adsk-button").each(function(){if(t.controls[this.id]){var n=t.controls[this.id].enabled;e(this).css({display:n?"block":"none"})}})})}Autodesk.Viewing.Extension.call(this,t,n);var c=this,l=null,f=null;c.load=function(){var e=a();if(f=new p(t.container,a(),e),l=o(e),n.Lockr){var r=n.Lockr.get(n.storageKey);r||(r={controls:{}},n.Lockr.set(n.storageKey,r)),u()}return console.log("Viewing.Extension.ControlSelector loaded"),!0},c.unload=function(){return f&&f.setVisible(!1),e("#"+l).remove(),console.log("Viewing.Extension.ControlSelector unloaded"),!0};var p=function(r,i,o){function s(){e(".adsk-control-group").each(function(){e(this).hasClass("adsk-hidden")||"viewing-extension-ControlSelector-controlgroup"===this.id||e(this).find(">.adsk-button").each(function(){c(this)})})}function u(){e("#"+i+"-item-list > li").each(function(t,n){e(n).remove()})}function c(t){var r=a(),o=e(t),s=o.find(">.adsk-control-tooltip").text().split("(")[0],u=['
  • ',s,"
  • "].join("\n");e("#"+i+"-item-list").append(u),"none"!==o.css("display")&&e("#"+r).addClass("enabled"),e("#"+r).click(function(r){r.preventDefault();var i=e(this),s=i.hasClass("enabled");if(s=!s,o.css({display:s?"block":"none"}),s?i.addClass("enabled"):i.removeClass("enabled"),n.Lockr){var a=n.Lockr.get(n.storageKey);a.controls[t.id]||(a.controls[t.id]={}),a.controls[t.id].enabled=s,n.Lockr.set(n.storageKey,a)}return!1})}var l=this;Autodesk.Viewing.UI.DockingPanel.call(this,r,i,"Select Visible Controls",{shadow:!0});var f=t.container.clientWidth,p=t.container.clientHeight;e(l.container).css({top:"5px",left:"70px",width:Math.min(75*f/100,250)+"px",height:Math.min(75*p/100,400)+"px",resize:"auto"});var d=['
    ','
      ',"
    ","
    "];e(l.container).append(d.join("\n"));var h=!1;l.toggleVisible=function(){h=!h,l.setVisible(h)},l.setVisible=function(t){h=t,Autodesk.Viewing.UI.DockingPanel.prototype.setVisible.call(this,t);var n=e("#"+o);t?(s(),n.addClass("active"),n.removeClass("inactive")):(u(),n.addClass("inactive"),n.removeClass("active"))};var g=!1;l.onTitleDoubleClick=function(t){g=!g,g?e(l.container).css({height:"34px","min-height":"34px"}):e(l.container).css({height:"80%"})}};p.prototype=(0,i.default)(Autodesk.Viewing.UI.DockingPanel.prototype),p.prototype.constructor=p;var d=["div.ui-settings-panel-content{","height: calc(100% - 40px);","overflow-y: scroll;","}","ul.ui-settings-item-list{","padding: 0;","margin:5px","}","li.ui-settings-item{","color: #FFFFFF;","background-color: #3F4244;","list-style-type: none;","margin-bottom: 5px;","border-radius:4px","}","li.ui-settings-item:hover{","cursor: pointer;","color: #FFFFFF;","background-color: #5BC0DE;","}","li.ui-settings-item.enabled {","color: #000000;","background-color: #00CC00;","}"].join("\n");e('").appendTo("head")},Viewing.Extension.ControlSelector.prototype=(0,i.default)(Autodesk.Viewing.Extension.prototype),Viewing.Extension.ControlSelector.prototype.constructor=Viewing.Extension.ControlSelector,Autodesk.Viewing.theExtensionManager.registerExtension("_Viewing.Extension.ControlSelector",Viewing.Extension.ControlSelector)}).call(t,n(26))},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},,function(e,t,n){var r=n(7),i=n(46),o=n(36),s=Object.defineProperty;t.f=n(6)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2),i=n(1),o=n(18),s=n(10),a="prototype",u=function(e,t,n){var c,l,f,p=e&u.F,d=e&u.G,h=e&u.S,g=e&u.P,v=e&u.B,m=e&u.W,y=d?i:i[t]||(i[t]={}),x=y[a],b=d?r:h?r[t]:(r[t]||{})[a];d&&(n=t);for(c in n)l=!p&&b&&void 0!==b[c],l&&c in y||(f=l?b[c]:n[c],y[c]=d&&"function"!=typeof b[c]?n[c]:v&&l?o(f,r):m&&b[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[a]=e[a],t}(f):g&&"function"==typeof f?o(Function.call,f):f,g&&((y.virtual||(y.virtual={}))[c]=f,e&u.R&&x&&!x[c]&&s(x,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){e.exports=!n(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(49),i=n(32);e.exports=function(e){return r(i(e))}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(4),i=n(20);e.exports=n(6)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},,,function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},,function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},,,function(e,t,n){var r=n(38);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(47),i=n(31);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},,function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},,,function(e,t,n){var r,i;!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){function s(e){var t=!!e&&"length"in e&&e.length,n=ce.type(e);return"function"!==n&&!ce.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function a(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(xe.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return re.call(t,e)>-1!==n})}function u(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return ce.each(e.match(Ee)||[],function(e,n){t[n]=!0}),t}function l(){Z.removeEventListener("DOMContentLoaded",l),n.removeEventListener("load",l),ce.ready()}function f(){this.expando=ce.expando+f.uid++}function p(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(qe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Le.test(n)?ce.parseJSON(n):n)}catch(e){}Ae.set(e,t,n)}else n=void 0;return n}function d(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=a(),c=n&&n[3]||(ce.cssNumber[t]?"":"px"),l=(ce.cssNumber[t]||"px"!==c&&+u)&&He.exec(ce.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do o=o||".5",l/=o,ce.style(e,t,l+c);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function h(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ce.nodeName(e,t)?ce.merge([e],n):n}function g(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=ce.contains(o.ownerDocument,o),s=h(f.appendChild(o),"script"),c&&g(s),n)for(l=0;o=s[l++];)Ie.test(o.type||"")&&n.push(o);return f}function m(){return!0}function y(){return!1}function x(){try{return Z.activeElement}catch(e){}}function b(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)b(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=y;else if(!i)return e;return 1===o&&(s=i,i=function(e){return ce().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function w(e,t){return ce.nodeName(e,"table")&&ce.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function C(e){var t=Ge.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function k(e,t){var n,r,i,o,s,a,u,c;if(1===t.nodeType){if(De.hasData(e)&&(o=De.access(e),s=De.set(t,o),c=o.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof d&&!ae.checkClone&&Ue.test(d))return e.each(function(i){var o=e.eq(i);g&&(t[0]=d.call(this,i,o.html())),S(o,t,n,r)});if(f&&(i=v(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=ce.map(h(i,"script"),T),a=s.length;l")).appendTo(t.documentElement),t=Ke[0].contentDocument,t.write(),t.close(),n=N(e,t),Ke.detach()),Qe[e]=n),n}function A(e,t,n){var r,i,o,s,a=e.style;return n=n||et(e),s=n?n.getPropertyValue(t)||n[t]:void 0,""!==s&&void 0!==s||ce.contains(e.ownerDocument,e)||(s=ce.style(e,t)),n&&!ae.pixelMarginRight()&&Ze.test(s)&&Je.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o),void 0!==s?s+"":s}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function q(e){if(e in at)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=st.length;n--;)if(e=st[n]+t,e in at)return e}function O(e,t,n){var r=He.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function H(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=ce.css(e,n+Fe[o],!0,i)),r?("content"===n&&(s-=ce.css(e,"padding"+Fe[o],!0,i)),"margin"!==n&&(s-=ce.css(e,"border"+Fe[o]+"Width",!0,i))):(s+=ce.css(e,"padding"+Fe[o],!0,i),"padding"!==n&&(s+=ce.css(e,"border"+Fe[o]+"Width",!0,i)));return s}function F(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=et(e),s="border-box"===ce.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=A(e,t,o),(i<0||null==i)&&(i=e.style[t]),Ze.test(i))return i;r=s&&(ae.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+H(e,t,n||(s?"border":"content"),r,o)+"px"}function P(e,t){for(var n,r,i,o=[],s=0,a=e.length;s=0&&n=0},isPlainObject:function(e){var t;if("object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;if(e.constructor&&!se.call(e,"constructor")&&!se.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||se.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ce.trim(e),e&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(fe,"ms-").replace(pe,de)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(s(e))for(n=e.length;rT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||U)-(~e.sourceIndex||U);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(s[c]=f))}}else x=v(x===s?x.splice(h,x.length):x),o?o(null,s,x,u):J.apply(s,x)})}function y(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],s=o||T.relative[" "],a=o?1:0,u=d(function(e){return e===t},s,!0),c=d(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var i=!o&&(r||n!==N)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,i}];a1&&h(l),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,c){var l,f,p,d=0,h="0",g=r&&[],m=[],y=N,x=r||o&&T.find.TAG("*",c),b=_+=null==y?1:Math.random()||.1,w=x.length;for(c&&(N=s===q||s||c);h!==w&&null!=(l=x[h]);h++){if(o&&l){for(f=0,s||l.ownerDocument===q||(L(l),a=!H);p=e[f++];)if(p(l,s||q,a)){u.push(l);break}c&&(_=b)}i&&((l=!p&&l)&&d--,r&&g.push(l))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,s,a);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=K.call(u));m=v(m)}J.apply(u,m),c&&!r&&m.length>0&&d+n.length>1&&t.uniqueSort(u)}return c&&(_=b,N=y),g};return i?r(s):s}var b,w,T,C,k,E,S,j,N,D,A,L,q,O,H,F,P,M,R,I="sizzle"+1*new Date,W=e.document,_=0,B=0,$=n(),V=n(),z=n(),X=function(e,t){return e===t&&(A=!0),0},U=1<<31,G={}.hasOwnProperty,Y=[],K=Y.pop,Q=Y.push,J=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),pe=new RegExp("^"+re+"$"),de={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{J.apply(Y=Z.call(W.childNodes),W.childNodes),Y[W.childNodes.length].nodeType}catch(e){J={apply:Y.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,O=q.documentElement,H=!k(q),(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(q.getElementsByClassName),w.getById=i(function(e){return O.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],F=[],(w.qsa=ve.test(q.querySelectorAll))&&(i(function(e){O.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+I+"-]").length||F.push("~="), 2 | e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=ve.test(M=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&i(function(e){w.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),P.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(O.compareDocumentPosition),R=t||ve.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&R(W,e)?-1:t===q||t.ownerDocument===W&&R(W,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===W?-1:u[r]===W?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&L(e),n=n.replace(le,"='$1']"),w.matchesSelector&&H&&!z[n+" "]&&(!P||!P.test(n))&&(!F||!F.test(n)))try{var r=M.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&G.call(T.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:w.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(X),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,p,d,h,g=o!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&y){for(p=v,f=p[I]||(p[I]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],d=c[0]===_&&c[1],x=d&&c[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){l[e]=[_,d,x];break}}else if(y&&(p=t,f=p[I]||(p[I]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],d=c[0]===_&&c[1],x=d),x===!1)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((a?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(y&&(f=p[I]||(p[I]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),l[e]=[_,x]),p!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(ae,"$1"));return i[I]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&w.getById&&9===t.nodeType&&H&&T.relative[o[1].type]){if(t=(T.find.ID(s.matches[0].replace(be,we),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(s=o[i],!T.relative[a=s.type]);)if((u=T.find[a])&&(r=u(s.matches[0].replace(be,we),ye.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return J.apply(n,r),n;break}}return(c||S(e,f))(r,t,!H,n,!t||ye.test(e)&&l(t.parentNode)||t),n},w.sortStable=I.split("").sort(X).join("")===I,w.detectDuplicates=!!A,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);ce.find=he,ce.expr=he.selectors,ce.expr[":"]=ce.expr.pseudos,ce.uniqueSort=ce.unique=he.uniqueSort,ce.text=he.getText,ce.isXMLDoc=he.isXML,ce.contains=he.contains;var ge=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},ve=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},me=ce.expr.match.needsContext,ye=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,xe=/^.[^:#\[\.,]*$/;ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t1?ce.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&me.test(e)?ce(e):e||[],!1).length}});var be,we=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Te=ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||be,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:we.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),ye.test(r[1])&&ce.isPlainObject(t))for(r in t)ce.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=Z.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ce.isFunction(e)?void 0!==n.ready?n.ready(e):e(ce):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ce.makeArray(e,this))};Te.prototype=ce.fn,be=ce(Z);var Ce=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(ce(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ge(e,"parentNode")},parentsUntil:function(e,t,n){return ge(e,"parentNode",n)},next:function(e){return u(e,"nextSibling")},prev:function(e){return u(e,"previousSibling")},nextAll:function(e){return ge(e,"nextSibling")},prevAll:function(e){return ge(e,"previousSibling")},nextUntil:function(e,t,n){return ge(e,"nextSibling",n)},prevUntil:function(e,t,n){return ge(e,"previousSibling",n)},siblings:function(e){return ve((e.parentNode||{}).firstChild,e)},children:function(e){return ve(e.firstChild)},contents:function(e){return e.contentDocument||ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,r){var i=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ce.filter(r,i)),this.length>1&&(ke[e]||ce.uniqueSort(i),Ce.test(e)&&i.reverse()),this.pushStack(i)}});var Ee=/\S+/g;ce.Callbacks=function(e){e="string"==typeof e?c(e):ce.extend({},e);var t,n,r,i,o=[],s=[],a=-1,u=function(){for(i=e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?ce.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,o){var s=ce.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,r):r}},i={};return r.pipe=r.then,ce.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ee.call(arguments),s=o.length,a=1!==s||e&&ce.isFunction(e.promise)?s:0,u=1===a?e:ce.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);i0||(Se.resolveWith(Z,[ce]),ce.fn.triggerHandler&&(ce(Z).triggerHandler("ready"),ce(Z).off("ready"))))}}),ce.ready.promise=function(e){return Se||(Se=ce.Deferred(),"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(ce.ready):(Z.addEventListener("DOMContentLoaded",l),n.addEventListener("load",l))),Se.promise(e)},ce.ready.promise();var je=function(e,t,n,r,i,o,s){var a=0,u=e.length,c=null==n;if("object"===ce.type(n)){i=!0;for(a in n)je(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,ce.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(ce(e),n)})),t))for(;a-1&&void 0!==n&&Ae.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=De.get(e,t),n&&(!r||ce.isArray(n)?r=De.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t),s=function(){ce.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return De.get(e,n)||De.access(e,n,{empty:ce.Callbacks("once memory").add(function(){De.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};We.optgroup=We.option,We.tbody=We.tfoot=We.colgroup=We.caption=We.thead,We.th=We.td;var _e=/<|&#?\w+;/;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ae.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ae.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Be=/^key/,$e=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ve=/^([^.]*)(?:\.(.+)|)/;ce.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,p,d,h,g,v=De.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(t){return"undefined"!=typeof ce&&ce.event.triggered!==t.type?ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ee)||[""],c=t.length;c--;)a=Ve.exec(t[c])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},l=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(d,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),ce.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,p,d,h,g,v=De.hasData(e)&&De.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Ee)||[""],c=t.length;c--;)if(a=Ve.exec(t[c])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){for(f=ce.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)l=p[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(e,l));s&&!p.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[c],n,r,!0);ce.isEmptyObject(u)&&De.remove(e,"handle events")}},dispatch:function(e){e=ce.event.fix(e);var t,n,r,i,o,s=[],a=ee.call(arguments),u=(De.get(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=ce.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:ce.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a]*)\/>/gi,Xe=/\s*$/g;ce.extend({htmlPrefilter:function(e){return e.replace(ze,"<$1>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=ce.contains(e.ownerDocument,e);if(!(ae.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(s=h(a),o=h(e),r=0,i=o.length;r0&&g(s,!u&&h(e,"script")),a},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if(Ne(n)){if(t=n[De.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[De.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),ce.fn.extend({domManip:S,detach:function(e){return j(this,e,!0)},remove:function(e){return j(this,e)},text:function(e){return je(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return je(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Xe.test(e)&&!We[(Re.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n1)},show:function(){return P(this,!0)},hide:function(){return P(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Pe(this)?ce(this).show():ce(this).hide()})}}),ce.Tween=M,M.prototype={constructor:M,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,n=M.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ce.cssProps[e.prop]]&&!ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=M.prototype.init,ce.fx.step={};var ut,ct,lt=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;ce.Animation=ce.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,He.exec(t),n),n}]},tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.match(Ee);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(t=t.toLowerCase(),i=ce.attrHooks[t]||(ce.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ce.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ae.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Ee);if(o&&1===e.nodeType)for(;n=o[i++];)r=ce.propFix[n]||n,ce.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),pt={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||ce.find.attr;dt[t]=function(e,t,r){var i,o;return r||(o=dt[t],dt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,dt[t]=o),i}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;ce.fn.extend({prop:function(e,t){return je(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ae.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this});var vt=/[\t\r\n\f]/g;ce.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,V(this)))});if("string"==typeof e&&e)for(t=e.match(Ee)||[];n=this[u++];)if(i=V(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=ce.trim(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(ce.isFunction(e))return this.each(function(t){ce(this).removeClass(e.call(this,t,V(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ee)||[];n=this[u++];)if(i=V(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=ce.trim(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ce.isFunction(e)?this.each(function(n){ce(this).toggleClass(e.call(this,n,V(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ce(this),o=e.match(Ee)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=V(this),t&&De.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":De.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+V(n)+" ").replace(vt," ").indexOf(t)>-1)return!0;return!1}});var mt=/\r/g,yt=/[\x20\t\r\n\f]+/g;ce.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ce.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ce(this).val()):e,null==i?i="":"number"==typeof i?i+="":ce.isArray(i)&&(i=ce.map(i,function(e){return null==e?"":e+""})),t=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ce.valHooks[i.type]||ce.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(mt,""):null==n?"":n)}}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:ce.trim(ce.text(e)).replace(yt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,u=i<0?a:o?i:0;u-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(ce.isArray(t))return e.checked=ce.inArray(ce(e).val(),t)>-1}},ae.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt=/^(?:focusinfocus|focusoutblur)$/;ce.extend(ce.event,{trigger:function(e,t,r,i){var o,s,a,u,c,l,f,p=[r||Z],d=se.call(e,"type")?e.type:e,h=se.call(e,"namespace")?e.namespace.split("."):[];if(s=a=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!xt.test(d+ce.event.triggered)&&(d.indexOf(".")>-1&&(h=d.split("."),d=h.shift(),h.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:ce.makeArray(t,[e]),f=ce.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!i&&!f.noBubble&&!ce.isWindow(r)){for(u=f.delegateType||d,xt.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||Z)&&p.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=p[o++])&&!e.isPropagationStopped();)e.type=o>1?u:f.bindType||d,l=(De.get(s,"events")||{})[e.type]&&De.get(s,"handle"),l&&l.apply(s,t),l=c&&s[c],l&&l.apply&&Ne(s)&&(e.result=l.apply(s,t),e.result===!1&&e.preventDefault());return e.type=d,i||e.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),t)!==!1||!Ne(r)||c&&ce.isFunction(r[d])&&!ce.isWindow(r)&&(a=r[c],a&&(r[c]=null),ce.event.triggered=d,r[d](),ce.event.triggered=void 0,a&&(r[c]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}}),ce.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ae.focusin="onfocusin"in n,ae.focusin||ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ce.event.simulate(t,e.target,ce.event.fix(e))};ce.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=De.access(r,t);i||r.addEventListener(e,n,!0),De.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=De.access(r,t)-1;i?De.access(r,t,i):(r.removeEventListener(e,n,!0),De.remove(r,t))}}});var bt=n.location,wt=ce.now(),Tt=/\?/;ce.parseJSON=function(e){return JSON.parse(e+"")},ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+e),t};var Ct=/#.*$/,kt=/([?&])_=[^&]*/,Et=/^(.*?):[ \t]*([^\r\n]*)$/gm,St=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,jt=/^(?:GET|HEAD)$/,Nt=/^\/\//,Dt={},At={},Lt="*/".concat("*"),qt=Z.createElement("a");qt.href=bt.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:St.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Lt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,ce.ajaxSettings),t):U(ce.ajaxSettings,e)},ajaxPrefilter:z(Dt),ajaxTransport:z(At),ajax:function(e,t){function r(e,t,r,a){var c,f,y,x,w,C=t;2!==b&&(b=2,u&&n.clearTimeout(u),i=void 0,s=a||"",T.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(x=G(p,T,r)),x=Y(p,x,T,c),c?(p.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(ce.lastModified[o]=w),w=T.getResponseHeader("etag"),w&&(ce.etag[o]=w)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=x.state,f=x.data,y=x.error,c=!y)):(y=C,!e&&C||(C="error",e<0&&(e=0))),T.status=e,T.statusText=(t||C)+"",c?g.resolveWith(d,[f,C,T]):g.rejectWith(d,[T,C,y]),T.statusCode(m),m=void 0,l&&h.trigger(c?"ajaxSuccess":"ajaxError",[T,p,c?f:y]),v.fireWith(d,[T,C]),l&&(h.trigger("ajaxComplete",[T,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,s,a,u,c,l,f,p=ce.ajaxSetup({},t),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),v=ce.Callbacks("once memory"),m=p.statusCode||{},y={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=Et.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)m[t]=[m[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),r(0,t),this}};if(g.promise(T).complete=v.add,T.success=T.done,T.error=T.fail,p.url=((e||p.url||bt.href)+"").replace(Ct,"").replace(Nt,bt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(Ee)||[""],null==p.crossDomain){c=Z.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=qt.protocol+"//"+qt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),X(Dt,p,t,T),2===b)return T;l=ce.event&&p.global,l&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!jt.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Tt.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=kt.test(o)?o.replace(kt,"$1_="+wt++):o+(Tt.test(o)?"&":"?")+"_="+wt++)),p.ifModified&&(ce.lastModified[o]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[o]),ce.etag[o]&&T.setRequestHeader("If-None-Match",ce.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Lt+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)T.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,T,p)===!1||2===b))return T.abort();w="abort";for(f in{success:1,error:1,complete:1})T[f](p[f]);if(i=X(At,p,t,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,p]),2===b)return T;p.async&&p.timeout>0&&(u=n.setTimeout(function(){T.abort("timeout")},p.timeout));try{b=1,i.send(y,r)}catch(e){if(!(b<2))throw e;r(-1,e)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,t){ce[t]=function(e,n,r,i){return ce.isFunction(n)&&(i=i||r,r=n,n=void 0),ce.ajax(ce.extend({url:e,type:t,dataType:i,data:n,success:r},ce.isPlainObject(e)&&e))}}),ce._evalUrl=function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},ce.fn.extend({wrapAll:function(e){var t;return ce.isFunction(e)?this.each(function(t){ce(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ce.isFunction(e)?this.each(function(t){ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}}),ce.expr.filters.hidden=function(e){return!ce.expr.filters.visible(e)},ce.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Ot=/%20/g,Ht=/\[\]$/,Ft=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;ce.param=function(e,t){var n,r=[],i=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(Ot,"+")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Mt.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Me.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Ft,"\r\n")}}):{name:t.name,value:n.replace(Ft,"\r\n")}}).get()}}),ce.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},It=ce.ajaxSettings.xhr();ae.cors=!!It&&"withCredentials"in It,ae.ajax=It=!!It,ce.ajaxTransport(function(e){var t,r;if(ae.cors||It&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Rt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ce(" 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 59 | 60 |
    61 | 62 |
    63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
    75 | 76 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /www/js/index.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Jaime Rosales 2016 - Forge Developer Partner Services 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////////////////// 18 | //dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cmVhY3QtbGF5b3V0LXNhbXBsZS12aWV3ZXIzN2lleGRiZG5xY2Franplc2JocWNlcTVhc2htNzh2My9VcmJhbkhvdXNlLTIwMTUucnZ0 19 | 20 | var viewer; 21 | var options = { 22 | env: 'AutodeskProduction', 23 | getAccessToken: getForgeToken 24 | } 25 | 26 | var documentId = 'urn:YOUR-URN'; 27 | 28 | Autodesk.Viewing.Initializer(options, function onInitialized() { 29 | Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure); 30 | }); 31 | 32 | /** 33 | * Autodesk.Viewing.Document.load() success callback. 34 | * Proceeds with model initialization. 35 | */ 36 | function onDocumentLoadSuccess(doc) { 37 | 38 | // A document contains references to 3D and 2D viewables. 39 | var viewable = Autodesk.Viewing.Document.getSubItemsWithProperties(doc.getRootItem(), { 40 | 'type': 'geometry', 41 | 'role': '3d' 42 | }, true); 43 | if (viewable.length === 0) { 44 | console.error('Document contains no viewables.'); 45 | return; 46 | } 47 | 48 | // Choose any of the available viewable 49 | var initialViewable = viewable[0]; // You can check for other available views in your model, 50 | var svfUrl = doc.getViewablePath(initialViewable); 51 | var modelOptions = { 52 | sharedPropertyDbPath: doc.getPropertyDbPath() 53 | }; 54 | 55 | var viewerDiv = document.getElementById('viewerDiv'); 56 | 57 | ///////////////USE ONLY ONE OPTION AT A TIME///////////////////////// 58 | 59 | /////////////////////// Headless Viewer ///////////////////////////// 60 | // viewer = new Autodesk.Viewing.Viewer3D(viewerDiv); 61 | ////////////////////////////////////////////////////////////////////// 62 | 63 | //////////////////Viewer with Autodesk Toolbar/////////////////////// 64 | viewer = new Autodesk.Viewing.Private.GuiViewer3D(viewerDiv); 65 | ////////////////////////////////////////////////////////////////////// 66 | 67 | viewer.start(svfUrl, modelOptions, onLoadModelSuccess, onLoadModelError); 68 | } 69 | 70 | 71 | /** 72 | * Autodesk.Viewing.Document.load() failure callback. 73 | */ 74 | function onDocumentLoadFailure(viewerErrorCode) { 75 | console.error('onDocumentLoadFailure() - errorCode:' + viewerErrorCode); 76 | } 77 | 78 | /** 79 | * viewer.loadModel() success callback. 80 | * Invoked after the model's SVF has been initially loaded. 81 | * It may trigger before any geometry has been downloaded and displayed on-screen. 82 | */ 83 | function onLoadModelSuccess(model) { 84 | console.log('onLoadModelSuccess()!'); 85 | console.log('Validate model loaded: ' + (viewer.model === model)); 86 | console.log(model); 87 | } 88 | 89 | /** 90 | * viewer.loadModel() failure callback. 91 | * Invoked when there's an error fetching the SVF file. 92 | */ 93 | function onLoadModelError(viewerErrorCode) { 94 | console.error('onLoadModelError() - errorCode:' + viewerErrorCode); 95 | } 96 | 97 | 98 | ///////////////////////////////////////////////////////////////////////////////// 99 | // 100 | // Load Viewer Background Color Extension 101 | // 102 | ///////////////////////////////////////////////////////////////////////////////// 103 | 104 | function changeBackground (){ 105 | viewer.setBackgroundColor(0, 59, 111, 255,255, 255); 106 | } 107 | 108 | ///////////////////////////////////////////////////////////////////////////////// 109 | // 110 | // Unload Viewer Background Color Extension 111 | // 112 | ///////////////////////////////////////////////////////////////////////////////// 113 | 114 | function resetBackground (){ 115 | viewer.setBackgroundColor(169,169,169, 255,255, 255); 116 | } 117 | 118 | ///////////////////////////////////////////////////////////////////////////////// 119 | // 120 | // Load Viewer Markup3D Extension 121 | // 122 | ///////////////////////////////////////////////////////////////////////////////// 123 | // 3D Markup extension to display values of the selected objects in the model. 124 | 125 | function loadMarkup3D (){ 126 | viewer.loadExtension('Viewing.Extension.Markup3D'); 127 | } 128 | 129 | ///////////////////////////////////////////////////////////////////////////////// 130 | // 131 | // Load Viewer Transform Extension 132 | // 133 | ///////////////////////////////////////////////////////////////////////////////// 134 | // Transformation is allowed with this extension to move object selected in the XYZ 135 | // position or rotation in XYZ as well. 136 | 137 | function loadTransform (){ 138 | viewer.loadExtension('Viewing.Extension.Transform'); 139 | } 140 | 141 | ///////////////////////////////////////////////////////////////////////////////// 142 | // 143 | // Load Viewer Control Selector Extension 144 | // 145 | ///////////////////////////////////////////////////////////////////////////////// 146 | // This extension allows you to remove certain extensions from the original toolbar 147 | // provided to you. 148 | 149 | function loadControlSelector(){ 150 | viewer.loadExtension('_Viewing.Extension.ControlSelector'); 151 | } 152 | 153 | -------------------------------------------------------------------------------- /www/js/oauth.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Forge Partner Development 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | function getForgeToken(callback) { 20 | jQuery.ajax({ 21 | url: '/user/token', 22 | success: function (res) { 23 | console.log('res de token client', res); 24 | callback(res.access_token, res.expires_in) 25 | } 26 | }); 27 | 28 | } --------------------------------------------------------------------------------