@manycore/custom-sdk 1.13.4-beta.0 → 1.13.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -0
- package/index.js +7 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -63,7 +63,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
|
|
|
63
63
|
Version 1.9.0
|
|
64
64
|
https://localforage.github.io/localForage
|
|
65
65
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
66
|
-
*/A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function L(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function O(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):L(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){O(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){L(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(985)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1993),A=r(676),a=r(2),s=r(1052);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1994),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1083),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(1040)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1084)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(237)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(2001)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1059)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(2003)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(237),i=r(418),o=r(183),A=r(205)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(415),i=r(687),o=r(1021)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1085)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(524),o=r(2012),A=r(708),a=r(709),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(2010)),o=r(525),A=n(r(2011)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1086),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(525),a=r(1086),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(524),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(2014),i=r(418),o=r(2018),A=r(511)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(2015)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2016),i=r(2017),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(240)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1087),a=r(1091),s=r(240),u=r(504),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(522),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1089),A=r(706),a=r(689),s=r(694),u=r(284),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(351),i=r(4),o=r(236),A=r(1085),a=r(699),s=r(11),u=r(240),c=r(1092),l=r(1093);r(2025);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(2027),i=r(2032)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1094),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2030),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(7),o=r(98),A=r(5),a=r(235),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1094),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1105);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2036);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2037);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1105),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(331);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2039);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1100);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(711);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1101);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1102);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(710);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1103);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1104);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(331),o=r(711);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2041);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2042);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1106);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1107);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2043);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(712),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(712),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1107),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2045);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1109);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1110);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2046);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(884),_Collector=__webpack_require__(422),_IdleWorker=__webpack_require__(1108),_PerfLog=__webpack_require__(1109),_TimeLog=__webpack_require__(1110),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2049))&&A.__esModule?A:{default:A},s=r(1111),u=r(1112),c=r(2050);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2052);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(678));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2051)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2054),s=r(2055),u=r(2059),c=r(2061);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(592)),o=h(r(208)),A=r(1113),a=r(1001),s=r(2),u=h(r(125)),c=r(714),l=r(713),g=r(1114),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2056)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2057),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2058)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(887)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2060);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2062);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2064);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2069);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1113),a=p(r(5)),s=p(r(125)),u=r(2065),c=r(1115),l=r(714),g=r(713),f=r(1114),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(396)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(850),A=r(465),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1115),u=r(714),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return yv})),r.d(t,"IntersectedService",(function(){return Xv})),r.d(t,"CustomModelService",(function(){return am})),r.d(t,"FittingHintService",(function(){return pm})),r.d(t,"FittingModelService",(function(){return Sm})),r.d(t,"ECameraMode",(function(){return bm})),r.d(t,"ECameraMoveDirection",(function(){return _m})),r.d(t,"ModelCameraService",(function(){return Fm})),r.d(t,"ModelHintService",(function(){return Vm})),r.d(t,"ModelService",(function(){return nQ})),r.d(t,"ESelectedType",(function(){return lQ})),r.d(t,"ESetSelectType",(function(){return gQ})),r.d(t,"ModelViewerSelectionService",(function(){return pQ})),r.d(t,"ModelViewerSelectionV2Service",(function(){return bQ})),r.d(t,"ModelViewerService",(function(){return FQ})),r.d(t,"PlankPathService",(function(){return nb})),r.d(t,"ModelValidateService",(function(){return gb})),r.d(t,"SceneService",(function(){return Eb})),r.d(t,"Application",(function(){return p_})),r.d(t,"EIntersectedCreatedType",(function(){return l})),r.d(t,"EIntersectedType",(function(){return c})),r.d(t,"EFittingType",(function(){return u})),r.d(t,"ELanguage",(function(){return pe})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Ee})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return Be})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return ve})),r.d(t,"EPointType",(function(){return b})),r.d(t,"ELineType",(function(){return _})),r.d(t,"EDesignMode",(function(){return Ie})),r.d(t,"ETriggerType",(function(){return ye})),r.d(t,"EModelType",(function(){return Ce})),r.d(t,"KEYBOARD_KEY",(function(){return be})),r.d(t,"EIntersectModelType",(function(){return p})),r.d(t,"EProductDirection",(function(){return d})),r.d(t,"EPlankPathType",(function(){return me})),r.d(t,"EElementType",(function(){return Qe})),r.d(t,"EToolType",(function(){return cg}));r(730),r(1338);var n,i,o,A=r(1),a=r.n(A),s=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT"}(n||(n={})),function(e){e.TRUE="true",e.FALSE="false"}(i||(i={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(o||(o={}));var u,c,l,g,f,h,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D,R="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),M=new Array(36);function x(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(u||(u={})),function(e){e.SHELL="1",e.FACE="2"}(c||(c={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(l||(l={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(g||(g={})),function(e){e.Space="spaceDivision"}(f||(f={})),function(e){e[e.CAD=7]="CAD",e[e.JPG=2]="JPG",e[e.PDF=3]="PDF"}(h||(h={})),function(e){e[e.PLANK=0]="PLANK",e[e.HARDWARE=1]="HARDWARE",e[e.PRODUCT=2]="PRODUCT"}(p||(p={})),function(e){e[e.XY=0]="XY",e[e.YZ=1]="YZ",e[e.XZ=2]="XZ"}(d||(d={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(I||(I={})),function(e){e.MINIAPP_APPEND="$$miniappAppend"}(y||(y={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(C||(C={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(E||(E={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(B||(B={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(v||(v={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(m||(m={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(Q||(Q={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(b||(b={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(_||(_={})),function(e){e.Wardrobe="Wardrobe",e.WardrobeCopy="WardrobeCopy",e.Cabinet="Cabinet",e.CabinetCopy="CabinetCopy",e.DoorWindow="DoorWindow",e.DoorWindowCopy="DoorWindowCopy",e.CustomGroup="CustomGroup"}(S||(S={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(w||(w={})),function(e){e.Design="Design",e.Audit="Audit",e.Production="Production"}(D||(D={}));var P,F,L,O,k=[[w.Cabinet,0],[w.Wardrobe,1],[w.DoorWindow,2],[w.CabinetCopy,4],[w.WardrobeCopy,5],[w.DoorWindowCopy,6]],N=[[D.Design,0],[D.Audit,1],[D.Production,2]],G=new Map(k),U=(new Map(N),new Map(k.map((function(e){return e.reverse()}))),new Map(N.map((function(e){return e.reverse()}))),[[w.Cabinet,S.Cabinet],[w.Wardrobe,S.Wardrobe],[w.DoorWindow,S.DoorWindow],[w.CabinetCopy,S.CabinetCopy],[w.WardrobeCopy,S.WardrobeCopy],[w.DoorWindowCopy,S.DoorWindowCopy]]),j=new Map(U);new Map(U.map((function(e){return e.reverse()})));!function(e){e.waiting="waiting",e.assigned="assigned",e.running="running",e.finished="finished",e.abnormal="abnormal",e.failed="failed"}(P||(P={})),function(e){e.BODY="BODY",e.BACK="BACK",e.DOOR="DOOR"}(F||(F={})),function(e){e.LineSeg="LineSeg",e.Arc="Arc"}(L||(L={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY"}(O||(O={}));
|
|
66
|
+
*/A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function L(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function O(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):L(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){O(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){L(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(985)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1993),A=r(676),a=r(2),s=r(1052);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1994),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1083),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(1040)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1084)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(237)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(2001)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1059)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(2003)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(237),i=r(418),o=r(183),A=r(205)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(415),i=r(687),o=r(1021)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1085)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(524),o=r(2012),A=r(708),a=r(709),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(2010)),o=r(525),A=n(r(2011)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1086),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(525),a=r(1086),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(524),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(2014),i=r(418),o=r(2018),A=r(511)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(2015)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2016),i=r(2017),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(240)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1087),a=r(1091),s=r(240),u=r(504),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(522),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1089),A=r(706),a=r(689),s=r(694),u=r(284),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(351),i=r(4),o=r(236),A=r(1085),a=r(699),s=r(11),u=r(240),c=r(1092),l=r(1093);r(2025);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(2027),i=r(2032)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1094),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2030),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(7),o=r(98),A=r(5),a=r(235),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1094),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1105);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2036);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2037);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1105),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(331);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2039);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1100);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(711);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1101);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1102);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(710);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1103);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1104);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(331),o=r(711);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(6)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2041);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2042);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1106);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1107);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2043);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(712),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(712),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1107),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2045);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1109);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1110);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2046);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(884),_Collector=__webpack_require__(422),_IdleWorker=__webpack_require__(1108),_PerfLog=__webpack_require__(1109),_TimeLog=__webpack_require__(1110),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(6)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2049))&&A.__esModule?A:{default:A},s=r(1111),u=r(1112),c=r(2050);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2052);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(678));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2051)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2054),s=r(2055),u=r(2059),c=r(2061);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(592)),o=h(r(208)),A=r(1113),a=r(1001),s=r(2),u=h(r(125)),c=r(714),l=r(713),g=r(1114),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2056)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2057),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2058)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(887)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2060);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2062);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2064);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2069);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1113),a=p(r(5)),s=p(r(125)),u=r(2065),c=r(1115),l=r(714),g=r(713),f=r(1114),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(396)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(850),A=r(465),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1115),u=r(714),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return Ev})),r.d(t,"IntersectedService",(function(){return $v})),r.d(t,"CustomModelService",(function(){return um})),r.d(t,"FittingHintService",(function(){return Im})),r.d(t,"FittingModelService",(function(){return Dm})),r.d(t,"ECameraMode",(function(){return Sm})),r.d(t,"ECameraMoveDirection",(function(){return wm})),r.d(t,"ModelCameraService",(function(){return Om})),r.d(t,"ModelHintService",(function(){return Hm})),r.d(t,"ModelService",(function(){return oQ})),r.d(t,"ESelectedType",(function(){return fQ})),r.d(t,"ESetSelectType",(function(){return hQ})),r.d(t,"ModelViewerSelectionService",(function(){return IQ})),r.d(t,"ModelViewerSelectionV2Service",(function(){return SQ})),r.d(t,"ModelViewerService",(function(){return OQ})),r.d(t,"PlankPathService",(function(){return ob})),r.d(t,"ModelValidateService",(function(){return hb})),r.d(t,"SceneService",(function(){return vb})),r.d(t,"Application",(function(){return I_})),r.d(t,"EIntersectedCreatedType",(function(){return g})),r.d(t,"EIntersectedType",(function(){return l})),r.d(t,"EFittingType",(function(){return c})),r.d(t,"ELanguage",(function(){return de})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Be})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return ve})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return me})),r.d(t,"EPointType",(function(){return _})),r.d(t,"ELineType",(function(){return S})),r.d(t,"EDesignMode",(function(){return ye})),r.d(t,"ETriggerType",(function(){return Ce})),r.d(t,"EModelType",(function(){return Ee})),r.d(t,"KEYBOARD_KEY",(function(){return _e})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return Qe})),r.d(t,"EElementType",(function(){return be})),r.d(t,"EToolType",(function(){return lg}));r(730),r(1338);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT"}(n||(n={})),function(e){e.TRUE="true",e.FALSE="false"}(i||(i={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(o||(o={})),function(e){e.Intersect="intersect",e.Validity="validity",e.Rule="rule"}(A||(A={}));var c,l,g,f,h,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D,R,M="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),x=new Array(36);function P(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(c||(c={})),function(e){e.SHELL="1",e.FACE="2"}(l||(l={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(g||(g={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(f||(f={})),function(e){e.Space="spaceDivision"}(h||(h={})),function(e){e[e.CAD=7]="CAD",e[e.JPG=2]="JPG",e[e.PDF=3]="PDF"}(p||(p={})),function(e){e[e.PLANK=0]="PLANK",e[e.HARDWARE=1]="HARDWARE",e[e.PRODUCT=2]="PRODUCT"}(d||(d={})),function(e){e[e.XY=0]="XY",e[e.YZ=1]="YZ",e[e.XZ=2]="XZ"}(I||(I={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(y||(y={})),function(e){e.MINIAPP_APPEND="$$miniappAppend"}(C||(C={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(E||(E={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(B||(B={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(v||(v={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(m||(m={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Q||(Q={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(b||(b={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(_||(_={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(S||(S={})),function(e){e.Wardrobe="Wardrobe",e.WardrobeCopy="WardrobeCopy",e.Cabinet="Cabinet",e.CabinetCopy="CabinetCopy",e.DoorWindow="DoorWindow",e.DoorWindowCopy="DoorWindowCopy",e.CustomGroup="CustomGroup"}(w||(w={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(D||(D={})),function(e){e.Design="Design",e.Audit="Audit",e.Production="Production"}(R||(R={}));var F,L,O,k,N=[[D.Cabinet,0],[D.Wardrobe,1],[D.DoorWindow,2],[D.CabinetCopy,4],[D.WardrobeCopy,5],[D.DoorWindowCopy,6]],G=[[R.Design,0],[R.Audit,1],[R.Production,2]],U=new Map(N),j=(new Map(G),new Map(N.map((function(e){return e.reverse()}))),new Map(G.map((function(e){return e.reverse()}))),[[D.Cabinet,w.Cabinet],[D.Wardrobe,w.Wardrobe],[D.DoorWindow,w.DoorWindow],[D.CabinetCopy,w.CabinetCopy],[D.WardrobeCopy,w.WardrobeCopy],[D.DoorWindowCopy,w.DoorWindowCopy]]),V=new Map(j);new Map(j.map((function(e){return e.reverse()})));!function(e){e.waiting="waiting",e.assigned="assigned",e.running="running",e.finished="finished",e.abnormal="abnormal",e.failed="failed"}(F||(F={})),function(e){e.BODY="BODY",e.BACK="BACK",e.DOOR="DOOR"}(L||(L={})),function(e){e.LineSeg="LineSeg",e.Arc="Arc"}(O||(O={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY"}(k||(k={}));
|
|
67
67
|
/*! *****************************************************************************
|
|
68
68
|
Copyright (c) Microsoft Corporation.
|
|
69
69
|
|
|
@@ -78,12 +78,12 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
78
78
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
79
79
|
PERFORMANCE OF THIS SOFTWARE.
|
|
80
80
|
***************************************************************************** */
|
|
81
|
-
var V=function(){return(V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Y(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function H(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function K(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function q(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(K(arguments[t]));return e}var J=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===Q.boolean)return Boolean(parseFloat(e));if(t===Q.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===Q.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:C.BZ_STORE,attr:x(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:C.BZ_STORE,attr:x(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var W,z=function(){function e(){this.data={name:"",displayName:"",type:m.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:C.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:C.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function X(e){var t=new z;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(W||(W={}));var Z,$,ee,te,re,ne,ie=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===I.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)M[t]="-";else if(14===t)M[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,M[t]=R[19===t?3&r|8:r]}return M.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:C.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:C.ATTRIBUTE,attr:E.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===I.PARAM_ASSEMBLY||i===I.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set rotation!")}this.__trackUpdateField({type:C.ATTRIBUTE,attr:E.ROTATION},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===I.PARAM_ASSEMBLY||i===I.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set position!")}this.__trackUpdateField({type:C.ATTRIBUTE,attr:E.POSITION},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=G.get(e);if(this._origin===W.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:C.ATTRIBUTE,attr:E.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==W.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&oe(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:B.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&oe(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:B.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=x(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=x(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=K(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=K(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new ie(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],X(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new J,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),q(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,q(i)),r.push.apply(r,q(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==W.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType&&j.get(this.toolType),r=this.modelType;return r===v.ASSEMBLY||r===v.TEMPLATE_ASSEMBLY?{id:e,type:S.CustomGroup}:t?{id:e,type:t}:void 0},e}();function oe(e,t,r){var n=r?"accessory":"child";if([I.PARAM_ASSEMBLY,I.TEMPLATE_ASSEMBLY,I.PARAM_FURNITURE,I.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===I.TEMPLATE_ASSEMBLY||t.type===I.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===W.SENSE||t._origin===W.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Z||(Z={})),function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}($||($={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(ee||(ee={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(te||(te={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(re||(re={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(ne||(ne={}));var Ae,ae,se,ue,ce,le;new Map([[ne.AUDIT_PASS,"pass"],[ne.AUDIT_REJECT,"reject"],[ne.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(Ae||(Ae={})),function(e){e[e.AUDIT=0]="AUDIT"}(ae||(ae={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke"}(se||(se={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(ue||(ue={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(ce||(ce={})),function(e){e.API_CALL="API_CALL"}(le||(le={}));var ge,fe,he,pe,de=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.collectSyncApiData=function(e,t,r){return function(n){var i={apiName:e.name,status:!0,args:r};try{var o=performance.now(),A=e.apply(t,r),a=performance.now();return i.return=A,i.duration=Math.floor(a-o),A}catch(e){throw i.status=!1,i.errMsg=e,e}finally{n(i)}}},e.collectAsyncApiData=function(e,t,r){return function(n){return Y(void 0,void 0,void 0,(function(){var i,o,A,a,s;return H(this,(function(u){switch(u.label){case 0:i={apiName:e.name,status:!0,args:r},u.label=1;case 1:return u.trys.push([1,3,4,5]),o=performance.now(),[4,e.apply(t,r)];case 2:return A=u.sent(),a=performance.now(),i.return=A,i.duration=Math.floor(a-o),[2,A];case 3:throw s=u.sent(),i.status=!1,i.errMsg=s,s;case 4:return n(i),[7];case 5:return[2]}}))}))}},e.observeAsyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(V(V({},r),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Y(this,void 0,void 0,(function(){var r;return H(this,(function(n){switch(n.label){case 0:return r=this,[4,e.collectAsyncApiData(o,r,t)(A)];case 1:return[2,n.sent()]}}))}))},i}},e.observeSyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(V(V({},r),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,i=e.collectSyncApiData(o,n,t)(A);return i},i}},e.observeSyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.collectSyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(V(V({},r),t))}))}}},e.observeAsyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Y(this,void 0,void 0,(function(){return H(this,(function(o){return[2,e.collectAsyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(V(V({},r),t))}))]}))}))}}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(ge||(ge={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(fe||(fe={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(he||(he={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(pe||(pe={}));var Ie,ye,Ce,Ee="$$geometry_color",Be="$$geometry_opacity",ve=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(Ie||(Ie={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(ye||(ye={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(Ce||(Ce={}));var me,Qe,be=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(me||(me={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(Qe||(Qe={}));var _e=r(68),Se=r.n(_e),we=r(98),De=r.n(we),Re=r(44),Me=r.n(Re),xe=r(288),Pe=r.n(xe),Te=r(5),Fe=r.n(Te),Le=r(47);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=je(e);if(t){var i=je(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ue(this,r)}}function Ue(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function je(e){return(je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(r,e);var t=Ge(r);function r(){return ke(this,r),t.apply(this,arguments)}return r}(Le.CoreCustom),Ye=r(360),He=r(99),Ke=r.n(He),qe=r(1117);function Je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function We(e,t,r){return(We="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$e(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$e(e);if(t){var i=$e(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ze(this,r)}}function Ze(e,t){return!t||"object"!==et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tt,rt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":et(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},nt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":et(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},it=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}(o,e);var t,r,n,i=Xe(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new Ye.CDoc,e.versionStore=new qe.VersionStore,e.setCustom(new Ve),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return We($e(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),We($e(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext),this}}])&&Je(t.prototype,r),n&&Je(t,n),o}(Ke.a);rt([Object(He.property)(),nt("design:type","function"==typeof(tt=void 0!==Ve&&Ve)?tt:Object)],it.prototype,"custom",void 0);var ot=r(107),At=r.n(ot);function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function st(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gt(e);if(t){var i=gt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lt(this,r)}}function lt(e,t){return!t||"object"!==ft(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gt(e){return(gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ft(e){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ht=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ft(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},pt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ft(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},dt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ut(e,t)}(o,e);var t,r,n,i=ct(o);function o(){var e;return at(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&st(t.prototype,r),n&&st(t,n),o}(At.a);function It(e){return(It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ct(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Et(e,t){return(Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mt(e);if(t){var i=mt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vt(this,r)}}function vt(e,t){return!t||"object"!==It(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ht([Object(He.property)(),pt("design:type",Boolean)],dt.prototype,"isAppendHardware",void 0);var Qt,bt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Et(e,t)}(o,e);var t,r,n,i=Bt(o);function o(){return yt(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return dt}}])&&Ct(t.prototype,r),n&&Ct(t,n),o}(Le.CoreParamModelAssembly),_t=r(97),St=new _t.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(Qt||(Qt={}));var wt=r(34),Dt=r(2),Rt=r(526),Mt=Object(Rt.createKElementBaseClass)(),xt=wt.advanced.reportObserved,Pt=wt.advanced.reportChanged;function Tt(e){return function(e){if(Array.isArray(e))return Ft(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ft(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ft(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ot(e,t){return(Ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Gt(e);if(t){var i=Gt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Nt(this,r)}}function Nt(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Mt.onGet=function(e){xt(e)},Mt.addSetHook((function(e){Pt(e)}));var jt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ut(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Vt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ut(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Yt(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return St.emit(Qt.FITTING_MODEL_CHANGE),i}}var Ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ot(e,t)}(o,e);var t,r,n,i=kt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Tt(e),Tt(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(Dt.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Tt(this.grooveFittings),Tt(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&Lt(t.prototype,r),n&&Lt(t,n),o}(Mt);jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"fittings",void 0),jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"intersects",void 0),jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"grooveFittings",void 0),jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"plankFaceHintModels",void 0),jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"fittingHintModels",void 0),jt([wt.observable,Vt("design:type",Array)],Ht.prototype,"plankOutlineHintModels",void 0),jt([Yt,Vt("design:type",Function),Vt("design:paramtypes",[Array]),Vt("design:returntype",void 0)],Ht.prototype,"setFittings",null),jt([Yt,Vt("design:type",Function),Vt("design:paramtypes",[Array]),Vt("design:returntype",void 0)],Ht.prototype,"addFittings",null),jt([Yt,Vt("design:type",Function),Vt("design:paramtypes",[Object]),Vt("design:returntype",void 0)],Ht.prototype,"removeFittings",null),jt([Yt,Vt("design:type",Function),Vt("design:paramtypes",[Array]),Vt("design:returntype",void 0)],Ht.prototype,"setGrooveFittings",null),jt([Yt,Vt("design:type",Function),Vt("design:paramtypes",[Array]),Vt("design:returntype",void 0)],Ht.prototype,"addGrooveFittings",null);var Kt=r(30),qt=r.n(Kt),Jt=r(100),Wt=r.n(Jt);function zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Xt(e,t){return(Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=er(e);if(t){var i=er(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $t(this,r)}}function $t(e,t){return!t||"object"!==tr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var rr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},nr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ir=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xt(e,t)}(o,e);var t,r,n,i=Zt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=Wt()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof At.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&zt(t.prototype,r),n&&zt(t,n),o}(Mt);function or(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ar(e,t){return(Ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ur(e);if(t){var i=ur(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sr(this,r)}}function sr(e,t){return!t||"object"!==cr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ur(e){return(ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cr(e){return(cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}rr([qt.a,nr("design:type",String)],ir.prototype,"id",void 0),rr([qt.a,nr("design:type",Object)],ir.prototype,"linkModel",void 0),rr([qt.a,nr("design:type","function"!=typeof!1&&Object)],ir.prototype,"hintOutline",void 0),rr([qt.a,nr("design:type",Boolean)],ir.prototype,"visible",void 0);var lr,gr,fr,hr,pr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":cr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},dr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":cr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Ir=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ar(e,t)}(o,e);var t,r,n,i=ar(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,c=r.rotate,l=r.height,g=r.boundingBox;return A.id=e||Wt()(),A.position=a instanceof Fe.a?a:new Fe.a(a),A.size=s instanceof Fe.a?s:new Fe.a(s),A.rotate=c instanceof Fe.a?c:new Fe.a(s),A.height=l,A.type="fittingType"in n?n.fittingType:u.INTERSECTED,A.visible=A.type!==u.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&or(t.prototype,r),n&&or(t,n),o}(Mt);pr([qt.a,dr("design:type",String)],Ir.prototype,"id",void 0),pr([qt.a,dr("design:type","function"==typeof(lr=void 0!==Fe.a&&Fe.a)?lr:Object)],Ir.prototype,"position",void 0),pr([qt.a,dr("design:type","function"==typeof(gr=void 0!==Fe.a&&Fe.a)?gr:Object)],Ir.prototype,"size",void 0),pr([qt.a,dr("design:type",Number)],Ir.prototype,"height",void 0),pr([qt.a,dr("design:type","function"==typeof(fr=void 0!==u&&u)?fr:Object)],Ir.prototype,"type",void 0),pr([qt.a,dr("design:type","function"==typeof(hr=void 0!==Fe.a&&Fe.a)?hr:Object)],Ir.prototype,"rotate",void 0),pr([qt.a,dr("design:type",Number)],Ir.prototype,"radius",void 0),pr([qt.a,dr("design:type",Object)],Ir.prototype,"visible",void 0),pr([qt.a,dr("design:type",Object)],Ir.prototype,"viewColor",void 0),pr([qt.a,dr("design:type",Object)],Ir.prototype,"opacity",void 0);var yr=r(16),Cr=r.n(yr);function Er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Br(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Br(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var mr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=Wt()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new s.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new s.Vector2d}},{key:"getRealLine",value:function(){var e=Er(this.start.getPointsForRender(),2)[1],t=Er(this.end.getPointsForRender(),1)[0];return this.getType()===_.SEGMENT?new s.LineSeg2d(e,t):this.getType()===_.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new s.CCS2d(new s.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new s.Vector2d(1,0)),t=new s.Ellipse2d(e,this.majorRadius,this.minorRadius);return s.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==_.CIRCLE_ARC)return new s.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,u,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new s.LineSeg2d(n,i),u=a.length/2,c=a.getPoint(u),l=Math.sqrt(r*r-u*u),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),s.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new s.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Er(this.start.getPointsForRender(),2)[1],Er(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&vr(t.prototype,r),n&&vr(t,n),e}();function Qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return br(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return br(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Sr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new s.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new s.Vector2d(t.offset||{x:0,y:0}),this.id=Wt()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===b.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new s.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=Qr(A,2),u=a[0],c=a[1];if(i===b.CIRCLE||i===b.CUT_CIRCLE){if(i===b.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:s.Arc2d.makeArcByStartEndPoints(u,u,c,!0),renderPoints:A};var f=new s.Line2d(u,l),h=new s.Line2d(c,g),p=Qr(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new s.LineSeg2d(u,c),renderPoints:A};var d=s.Arc2d.makeArcByStartEndPoints(p.point,u,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=s.Arc2d.makeArcByStartEndPoints(p.point,u,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:s.Arc2d.makeArcByStartEndPoints(o.added(n),u,c,!e),renderPoints:A}}if(i===b.ELLIPSE){var I=o.added(n),y=new s.CCS2d(new s.Point2d(I.x,I.y),new s.Vector2d(1,0)),C=new s.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:s.EllipticalArc2d.makeByStartEndPoints(C,u,c,!e),renderPoints:A}}return{curveLine:new s.LineSeg2d(u,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===b.NONE)return[a,a];if(!t||!r)return[a,a];var u=new s.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new s.Ray2d(r.start.getPosition(),r.getVector());if(A===b.LINE)return[u.getPoint(i[0]),c.getPoint(i[1])];if(A===b.CIRCLE){if(void 0!==e){var l=u.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[u.getPoint(h),c.getPoint(h)]}if(i)return[u.getPoint(i[0]),c.getPoint(i[0])]}if(A===b.CUT_CIRCLE){var p=a.added(o),d=new s.Circle2d(p,e),I=d.intersectCurve(u),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===b.ELLIPSE){var C=a.added(o),E=new s.CCS2d(new s.Point2d(C.x,C.y),new s.Vector2d(1,0)),B=new s.Ellipse2d(E,this.majorRadius,this.minorRadius),v=B.intersectCurve(u),m=B.intersectCurve(c);if(v.length&&m.length)return[v[0].point,m[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&_r(t.prototype,r),n&&_r(t,n),e}();function wr(e){return function(e){if(Array.isArray(e))return Mr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Rr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dr(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Rr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Rr(e,t){if(e){if("string"==typeof e)return Mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mr(e,t):void 0}}function Mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Pr=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===b.NONE&&(e=e.concat(t.getPosition())),t.getType()===b.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==b.CIRCLE&&t.getType()!==b.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===_.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=Dr(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==b.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=Dr(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new s.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new s.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,u=t.forceCCW,c=void 0===u||u,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=Wt()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=s.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==b.NONE?e.push.apply(e,wr(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==b.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new s.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new s.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==b.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=s.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===_.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==b.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==_.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===b.NONE?e.push(t.getPosition()):e.push.apply(e,wr(t.getRenderPoints()))})),e}}])&&xr(t.prototype,r),n&&xr(t,n),e}();function Tr(e,t){var r=t.paramPoints.map((function(e){return new Sr(e)})),n=t.paramPathLines.map((function(e){return new mr(e)}));return new Pr({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function Fr(e){return function(e){if(Array.isArray(e))return Lr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Or(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kr(e,t){return(kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ur(e);if(t){var i=Ur(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gr(this,r)}}function Gr(e,t){return!t||"object"!==jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jr(e){return(jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Vr,Yr,Hr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Kr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},qr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kr(e,t)}(o,e);var t,r,n,i=Nr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=u.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new s.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new s.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new s.Matrix4,t=this.model.getSize();return e.fromArray(Fr(this.model.getConcatenatedMatrix().multiply((new Me.a).makeTranslation(new Fe.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&Or(t.prototype,r),n&&Or(t,n),o}(Mt);Hr([qt.a,Kr("design:type",String)],qr.prototype,"id",void 0),Hr([qt.a,Kr("design:type",Object)],qr.prototype,"viewColor",void 0),Hr([qt.a,Kr("design:type",Object)],qr.prototype,"visible",void 0),Hr([qt.a,Kr("design:type","function"==typeof(Vr=void 0!==u&&u)?Vr:Object)],qr.prototype,"type",void 0),Hr([qt.a,Kr("design:type","function"==typeof(Yr=void 0!==Pr&&Pr)?Yr:Object)],qr.prototype,"path",void 0),Hr([qt.a,Kr("design:type",Number)],qr.prototype,"depth",void 0),Hr([qt.a,Kr("design:type",Number)],qr.prototype,"opacity",void 0);var Jr=r(142),Wr=r.n(Jr);function zr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Xr(e,t){return(Xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=en(e);if(t){var i=en(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $r(this,r)}}function $r(e,t){return!t||"object"!==tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function en(e){return(en=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tn(e){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var rn,nn,on,An,an,sn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},un=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xr(e,t)}(o,e);var t,r,n,i=Zr(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||Wt()(),u.position=r instanceof Fe.a?r:new Fe.a(r),u.size=A instanceof Fe.a?A:new Fe.a(A),u.rotate=n instanceof Fe.a?n:new Fe.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&zr(t.prototype,r),n&&zr(t,n),o}(Mt);function ln(e,t){return(ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hn(e);if(t){var i=hn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){return!t||"object"!==pn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hn(e){return(hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pn(e){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}sn([qt.a,un("design:type",String)],cn.prototype,"id",void 0),sn([qt.a,un("design:type","function"==typeof(rn=void 0!==c&&c)?rn:Object)],cn.prototype,"type",void 0),sn([qt.a,un("design:type","function"==typeof(nn=void 0!==Fe.a&&Fe.a)?nn:Object)],cn.prototype,"position",void 0),sn([qt.a,un("design:type","function"==typeof(on=void 0!==Fe.a&&Fe.a)?on:Object)],cn.prototype,"size",void 0),sn([qt.a,un("design:type","function"==typeof(An=void 0!==Fe.a&&Fe.a)?An:Object)],cn.prototype,"rotate",void 0),sn([qt.a,un("design:type","function"==typeof(an=void 0!==Wr.a&&Wr.a)?an:Object)],cn.prototype,"geometryModel",void 0),sn([qt.a,un("design:type",Array)],cn.prototype,"originPoints",void 0),sn([qt.a,un("design:type",Object)],cn.prototype,"viewColor",void 0);var dn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},In=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},yn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ln(e,t)}(r,e);var t=gn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:Wt()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(Mt);function Cn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mn(e);if(t){var i=mn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vn(this,r)}}function vn(e,t){return!t||"object"!==Qn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qn(e){return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}dn([qt.a,In("design:type",String)],yn.prototype,"id",void 0);var bn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Qn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},_n=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Qn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(o,e);var t,r,n,i=Bn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&Cn(t.prototype,r),n&&Cn(t,n),o}(Mt);function wn(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}bn([qt.a,_n("design:type",String)],Sn.prototype,"id",void 0),bn([qt.a,_n("design:type",Object)],Sn.prototype,"linkModel",void 0),bn([qt.a,_n("design:type",Object)],Sn.prototype,"viewColor",void 0),bn([qt.a,_n("design:type",Number)],Sn.prototype,"opacity",void 0),bn([qt.a,_n("design:type",Boolean)],Sn.prototype,"visible",void 0),bn([qt.a,_n("design:type",Array)],Sn.prototype,"points",void 0),bn([qt.a,_n("design:type",Number)],Sn.prototype,"height",void 0);var Dn=[new s.Vector3d({x:1,y:0,z:0}),new s.Vector3d({x:0,y:1,z:0}),new s.Vector3d({x:0,y:0,z:1})];function Rn(e){return!(!e||e.fittingType!==u.HOLE)}function Mn(e){return!(!e||e.fittingType!==u.GROOVE)}function xn(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,u=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),u=(new Me.a).makeTranslation(new Fe.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(u),l=new s.Point3d(i),g=new s.Point3d(o),f=new s.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new Fe.a(h).applyMatrix4(c);if(Rn(t)){var d=t.diameter;r=new Fe.a(d,f.length,d),n=Fe.a.Y_AXIS}if(Mn(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new Fe.a(I,f.length,y),n=Fe.a.Y_AXIS):[2,4].includes(A)?(r=new Fe.a(I,y,f.length),n=Fe.a.Z_AXIS):[1,3].includes(A)&&(r=new Fe.a(y,I,f.length),n=Fe.a.Z_AXIS)}var C=new Fe.a(o).sub(new Fe.a(i)).normalize(),E=(new Pe.a).setFromTwoVectors(n,C),B=c.clone().multiply((new Me.a).makeRotationFromQuaternion(E)),v=new Fe.a((new De.a).setFromRotationMatrix(B)),m=new Se.a(r,p,v);return new Ir(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);Rn(e)?(n=o,i=a):Mn(e)&&(n=A,i=u);var l=e.params||[],g=l.find((function(e){return e.key===Ee})),f=l.find((function(e){return e.key===Be}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var Pn=r(719),Tn=r(720),Fn=r(10),Ln=r(114),On=r.n(Ln),kn=r(141),Nn=r.n(kn),Gn=r(209),Un=r.n(Gn),jn=r(113),Vn=r.n(jn),Yn=r(210),Hn=r.n(Yn),Kn=r(427),qn=r.n(Kn),Jn=r(72),Wn=r.n(Jn),zn=r(188),Xn=r.n(zn);function Zn(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&Wn.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return Wn.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new Fe.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new Xn.a).includePoints(e);t=new Cr.a(r.min.x,r.max.y)}return e.map((function(e){return Cr.a.sub(e,t)}))}(r,e.pivot),indices:n}}var $n=new Fe.a(0,0,0);function ei(e){var t=e.planeTransform;return function(e){try{var t=Zn(e),r=new Wr.a;return r.vertices=new Float32Array(Fe.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(Fe.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(Cr.a.toFloatArray(t.textures)),r.indices=new Uint16Array(Fe.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return $n.set(e.x,e.y,0),t.localToWorld($n)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function ti(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ri(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ni,ii=new Fe.a(0,0,0);function oi(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new Me.a).makeTranslation(new Fe.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],l=(n=u===c.SHELL?function(e,t){var r,n=e.shell,i=Pn.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return Tn.triangulate2(e)})),o=new Wr.a,A=0,a=[],s=[],u=[],c=[],l=ti(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return ii.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s):Ai(t,s)).getBoundingBox3().getCenter(),g=On.a.decompose(s).rotation,f=On.a.compose(l,g,Fe.a.ONE),h=(new Me.a).getInverse(f),p=new Float32Array(n.vertices),d=new Nn.a,I=0;I<p.length;I+=3)ii.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(ii);return new cn(i,u,l,g,d.getSize(),n,t.points.map((function(e){return new Fe.a(e).applyMatrix4(s)})))}function Ai(e,t){var r=e.points.map((function(e){return new Fe.a(e).applyMatrix4(t)})),n=(new Un.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new qn.a(i,o,n,r[0]),a=r.map((function(e){return new Cr.a(A.worldToLocal(e))})),s=new Vn.a(a);return ei({planeTransform:A,shapes:[new Hn.a(s)]})}function ai(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(r),!0).forEach((function(t){ui(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ai(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ui(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ci(e,t){var r=t.clone().inversed(),n=new Pr({id:e.id,type:me.OUTER,points:e.points.map((function(e){return si(si({},e),{},{position:(t=e.position,n=new s.Point3d(t).appliedMatrix4(r),new s.Point2d(n))});var t,n})).map(li),lines:e.lines.map(gi),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function li(e){return new Sr(e)}function gi(e){return new mr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(ni||(ni={}));var fi=new s.Tolerance.Tolerance(.01,.01,.01);function hi(e){if(e.getType()===b.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==_.CIRCLE_ARC&&r.type!==_.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function pi(e){return e.type===_.SEGMENT||(!(e.type!==_.CIRCLE_ARC||!s.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==_.CIRCLE_ARC||!s.Num.isBigger(e.getVector().length,2*e.radius)))}function di(e){return e.type===ni.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===ni.LINE?e.val.getRealLine():void 0}function Ii(e,t){if(e.type===ni.POINT&&e.val.getType()===b.NONE)return!0;if(t.type===ni.POINT&&t.val.getType()===b.NONE)return!0;var r=di(e),n=di(t);if(!r||!n)return!1;var i=s.Curve2dIntersect.curve2dIntersectCurve2d(r,n,fi);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function yi(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=wn(e,s.Vector3d),n=Dn.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=s.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new s.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new qr({data:e,path:ci(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Ee})),u=(e.params||[]).find((function(e){return e.key===Be}));return A.setViewColor(a?a.value:n),A.setOpacity(u?Number(u.value):i),A}var Ci=r(23),Ei=r(12),Bi=r(11),vi=r.n(Bi);function mi(e){return(mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _i(e,t){return(_i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Si(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Di(e);if(t){var i=Di(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wi(this,r)}}function wi(e,t){return!t||"object"!==mi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Di(e){return(Di=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_i(e,t)}(o,e);var t,r,n,i=Si(o);function o(){return Qi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&bi(t.prototype,r),n&&bi(t,n),o}(vi.a.PureComponent);function Mi(e){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ti(e,t){return(Ti=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Oi(e);if(t){var i=Oi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Li(this,r)}}function Li(e,t){return!t||"object"!==Mi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oi(e){return(Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ki,Ni=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ti(e,t)}(o,e);var t,r,n,i=Fi(o);function o(){return xi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Pi(t.prototype,r),n&&Pi(t,n),o}(Ci.AXR);ki||(ki={});var Gi,Ui=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(Gi||(Gi={}));var ji,Vi,Yi={};function Hi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ki(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hi(Object(r),!0).forEach((function(t){qi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ji(e,t){!function(e){ji.log(Wi(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};Vi&&Object.assign(r.labels,Vi()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){ji.logByKtracker(e)}(r)}function Wi(e){return Ki(Ki({},e),{},{pluginName:"customPad"})}function zi(e){return(zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $i(e,t,r){return($i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=no(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function eo(e,t){return(eo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function to(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=no(e);if(t){var i=no(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ro(this,r)}}function ro(e,t){return!t||"object"!==zi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function no(e){return(no=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var io={entry:Ni,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eo(e,t)}(o,e);var t,r,n,i=to(o);function o(){return Xi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){$i(no(o.prototype),"init",this).call(this),this.addConfig({sendLog:Ji,perfLogConfig:Ui,timeLogConfig:Yi})}}])&&Zi(t.prototype,r),n&&Zi(t,n),o}(Ci.Monitor)};var oo,Ao,ao=r(60),so=r(718),uo=r(423);function co(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function lo(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){co(o,n,i,A,a,"next",e)}function a(e){co(o,n,i,A,a,"throw",e)}A(void 0)}))}}function go(e){return function(e){if(Array.isArray(e))return po(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ho(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=ho(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ho(e,t){if(e){if("string"==typeof e)return po(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?po(e,t):void 0}}function po(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Io(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(oo||(oo={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(Ao||(Ao={}));var yo=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new so.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(ao.throttleInRaf)((function(){Ci.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(uo.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;Ci.Util.safeExec((function(){var t,r=fo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;Ci.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;Ci.Util.safeExec((function(){var t,r=fo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;Ci.Util.safeExec((function(){var t,r=fo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ci.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(oo.autoBackup)&&Ci.Util.safeExec((function(){n[oo.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[oo.autoBackup])}),!1),t.includes(oo.transaction)&&Ci.Util.safeExec((function(){n[oo.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(oo.version)&&Ci.Util.safeExec((function(){n[oo.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(oo.modelBinding)&&Ci.Util.safeExec((function(){n[oo.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(oo.autoSave)&&Ci.Util.safeExec((function(){n[oo.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=fo(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[oo.autoBackup]&&Ci.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[oo.autoBackup])}),!1),t[oo.transaction]&&Ci.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[oo.transaction])})),t[oo.version]&&Ci.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[oo.version])})),t[oo.modelBinding]&&Ci.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[oo.modelBinding])})),t[oo.autoSave]&&Ci.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[oo.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=fo(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;go(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[oo.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[oo.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return lo(a.a.mark((function o(){var A,s,u,c,l,g=arguments;return a.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),s=g.length,u=new Array(s),c=0;c<s;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(Ao.mergeRecorder)&&this.mergeRecorder(),e.includes(Ao.requestBackup)?this.requestBackup():e.includes(Ao.forceBackup)?this.forceBackup():e.includes(Ao.revert)&&this.revert(),e.includes(Ao.notifyModelChange)&&this.notifyModelChange(),e.includes(Ao.autoSave)?this.save(!0):e.includes(Ao.save)&&this.save()}}])&&Io(t.prototype,r),n&&Io(t,n),e}(),Co=r(527),Eo=r.n(Co),Bo=r(290);function vo(e){return(vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qo(e,t){return(Qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=So(e);if(t){var i=So(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _o(this,r)}}function _o(e,t){return!t||"object"!==vo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qo(e,t)}(o,e);var t,r,n,i=bo(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&mo(t.prototype,r),n&&mo(t,n),o}(Ei.BackupItem);var Do=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=wo,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===Bo.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===Bo.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===Bo.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function Ro(e){return(Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mo(e){return function(e){if(Array.isArray(e))return To(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Po(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Po(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Po(e,t){if(e){if("string"==typeof e)return To(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?To(e,t):void 0}}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ko(e,t,r){return t&&Oo(e.prototype,t),r&&Oo(e,r),e}function No(e,t){return(No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Go(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jo(e);if(t){var i=jo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uo(this,r)}}function Uo(e,t){return!t||"object"!==Ro(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&No(e,t)}(r,e);var t=Go(r);function r(){var e;return Lo(this,r),(e=t.apply(this,arguments)).doc=new Ye.CDoc,e}return ko(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Eo()(Object)),Yo=new(function(){function e(){Lo(this,e),this.stacks=[{documentAction:new yo}]}var t,r;return ko(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=a.a.mark((function e(){var t,r,n,i,o,A,s,u,c,l,g,f,h,p,d,I=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([oo.autoBackup]),i=new yo,o=new Vo,A=new Ei.DocumentStateManager,s=xo(this.stacks);try{for(s.s();!(u=s.n()).done;){c=u.value,l=xo(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){s.e(e)}finally{s.f()}i.docs=[o].concat(Mo(t)),i.kafDocument=A,f=new Do(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=xo(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new Do(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){Fo(o,n,i,A,a,"next",e)}function a(e){Fo(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=xo(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=xo(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[Ao.requestBackup])}}]),e}());function Ho(e){return(Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ko(e,t){return(Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wo(e);if(t){var i=Wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}function Jo(e,t){return!t||"object"!==Ho(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wo(e){return(Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ko(e,t)}(r,e);var t=qo(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(Do);function Xo(e){return(Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $o(e,t){return($o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rA(e);if(t){var i=rA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tA(this,r)}}function tA(e,t){return!t||"object"!==Xo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rA(e){return(rA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$o(e,t)}(o,e);var t,r,n,i=eA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&Zo(t.prototype,r),n&&Zo(t,n),o}(Ei.BackupItem);var iA,oA,AA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=Dt.noop,this.BackupItemImpl=nA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){Mt.addSetHook(e)},this.beforeDispose=function(){}},aA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(iA||(iA={})),function(e){e.SELECTED="SELECTED"}(oA||(oA={}));var sA=Symbol("paramModelAssembly"),uA=Symbol("paramModel");function cA(e,t){return(cA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fA(e);if(t){var i=fA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gA(this,r)}}function gA(e,t){return!t||"object"!==hA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fA(e){return(fA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hA(e){return(hA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pA,dA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},IA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":hA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},yA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cA(e,t)}(r,e);var t=lA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=sA,n.entityId=e.getId(),n}return r}(Ei.Entity),CA=yA=dA([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),IA("design:paramtypes",["function"==typeof(pA=void 0!==Le.CoreParamModelAssembly&&Le.CoreParamModelAssembly)?pA:Object])],yA);function EA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vA(e,t)}function vA(e,t){return(vA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bA(e);if(t){var i=bA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return QA(this,r)}}function QA(e,t){return!t||"object"!==_A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bA(e){return(bA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _A(e){return(_A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var SA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_A(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},wA=function(e){BA(r,e);var t=mA(r);function r(e,n){var i;return EA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Ei.Entity),DA=function(e){BA(r,e);var t=mA(r);function r(){return EA(this,r),t.apply(this,arguments)}return r}(wA);DA=SA([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],DA);var RA=r(7),MA=r.n(RA),xA=r(190);function PA(e){return(PA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var TA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},FA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":PA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},LA=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function OA(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function kA(e){return(kA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GA(e,t){return(GA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=VA(e);if(t){var i=VA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jA(this,r)}}function jA(e,t){return!t||"object"!==kA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VA(e){return(VA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}TA([wt.observable,FA("design:type",Number)],LA.prototype,"opacity",void 0),TA([wt.observable,FA("design:type",Boolean)],LA.prototype,"visible",void 0);var YA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GA(e,t)}(o,e);var t,r,n,i=UA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new RA.LineBasicMaterial({color:iA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new RA.BufferGeometry).addAttribute("position",new RA.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?iA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&NA(t.prototype,r),n&&NA(t,n),o}(RA.LineSegments),HA=r(359),KA=r(84);function qA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function JA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var WA=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qA(Object(r),!0).forEach((function(t){JA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:RA.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function zA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function XA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zA(Object(r),!0).forEach((function(t){ZA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ZA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $A(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ea(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$A(o,n,i,A,a,"next",e)}function a(e){$A(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ta(e){return ra.apply(this,arguments)}function ra(){return(ra=ea(a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l,g,f,h,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,s=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=XA({},WA),u&&(l=Object(KA.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(Dt.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new RA.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,s){e.next=18;break}return e.next=16,Object(HA.loadImage)(g);case 16:h=e.sent,s={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(HA.loadTexture)(g,{wrapS:RA.WebGLTextureWrap.Repeat,wrapT:RA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new RA.Vector2(1/s.x,1/s.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:r.setValues(c);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function na(e){return(na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ia(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function oa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ia(o,n,i,A,a,"next",e)}function a(e){ia(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Aa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function aa(e,t){return(aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ca(e);if(t){var i=ca(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ua(this,r)}}function ua(e,t){return!t||"object"!==na(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ca(e){return(ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var la=new RA.BufferGeometry;var ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aa(e,t)}(s,e);var t,r,n,i,o,A=sa(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=A.call(this)).props=e,t.categoryId=Ci.EDCCountCategory.PHONG,t.material=new RA.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=s,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=oa(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new RA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new RA.BufferAttribute(r,1),t.addAttribute("position",new RA.BufferAttribute(n,3)),t.addAttribute("uv",new RA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new RA.BufferAttribute(i,3)):t.computeVertexNormals(),t):la}},{key:"updateMaterial",value:(i=oa(a.a.mark((function e(){var t,r,n,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,ta({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&Aa(t.prototype,r),n&&Aa(t,n),s}(RA.Mesh);function fa(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ha(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ha(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function da(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ia(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ya={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var Ca=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pa(Object(r),!0).forEach((function(t){da(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},ya),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new LA,this.id=t.model.getId(),this.type=r.type;var n,i=fa(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new RA.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(xA.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(xA.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(xA.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(xA.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(xA.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new ga({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(Dt.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=fa(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Ei.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||Fe.a.ZERO,size:n.size.clone().div(n.scale),scale:Fe.a.ONE,rotation:Fe.a.ZERO,generateComponentInstanceKey:OA(t.getId())}),this.displayInfoMesh=this.displayInfoDrawable.create(r),e.add(this.displayInfoMesh))):this.displayInfoDrawable&&this.displayInfoDrawable.update(this.displayInfoMesh)}},{key:"renderDisplayInfoMeshes",value:function(e,t,r){var n=t.getFurnitureModels();if(this.modelDepProps.furnitureModels!==n){if(this.modelDepProps.furnitureModels=n,this.disposeDisplayInfoMeshs(e),this.displayInfoDrawables=n.map((function(e){return new Ei.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:OA(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=fa(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r,n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new YA({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}])&&Ia(t.prototype,r),n&&Ia(t,n),e}();function Ea(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ba(e,t){return(Ba=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function va(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qa(e);if(t){var i=Qa(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ma(this,r)}}function ma(e,t){return!t||"object"!==ba(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qa(e){return(Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ba(e){return(ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _a=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ba(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Sa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ba(e,t)}(r,e);var t=va(r);function r(){var e;return Ea(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(wA);function wa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Da(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ra(e,t,r){return t&&Da(e.prototype,t),r&&Da(e,r),e}function Ma(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new Sa(e,t):new DA(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return Ma(e,t,r)})).filter((function(e){return!!e})),n}}Sa=_a([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return new Ca({model:this.model,renderChild:function t(r){return new Ca({model:r,renderChild:t},e.context)}},this.context)})),new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Sa);var xa=function(){function e(t){var r=this;wa(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return Ra(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)Ma(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new CA(e)}))}}]),e}(),Pa=function(){function e(t,r){wa(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new xa(r)}return Ra(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function Ta(e){return(Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Fa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ta(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},La=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ta(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Oa=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function ka(e){return function(e){if(Array.isArray(e))return Na(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Na(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Na(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Na(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ga(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Fa([wt.observable,La("design:type",Object)],Oa.prototype,"showOutline",void 0),Fa([wt.observable,La("design:type",Array)],Oa.prototype,"selected",void 0);var Ua=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof RA.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return ka(this.idMap.entries())}}])&&Ga(t.prototype,r),n&&Ga(t,n),e}(),ja=r(189);function Va(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ya=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ja.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(ja.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&Va(t.prototype,r),n&&Va(t,n),e}();function Ha(e){return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ka(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||Ja(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qa(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Ja(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Ja(e,t){if(e){if("string"==typeof e)return Wa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wa(e,t):void 0}}function Wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function za(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Za(e,t){return(Za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ts(e);if(t){var i=ts(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return es(this,r)}}function es(e,t){return!t||"object"!==Ha(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ts(e){return(ts=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ya.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var rs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Za(e,t)}(o,e);var t,r,n,i=$a(o);function o(){var e;return za(this,o),(e=i.apply(this,arguments)).store=new Oa,e.objectManager=new Ua,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=qa(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=Ka(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new Ya(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(oA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new Pa(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){wt.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){wt.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=qa(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=Ka(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=qa(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&Xa(t.prototype,r),n&&Xa(t,n),o}(_t.EventEmitter),ns=r(289),is=r.n(ns),os=r(727);function As(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function as(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ss(e,t,r){return t&&as(e.prototype,t),r&&as(e,r),e}function us(e){return(us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cs,ls,gs,fs,hs=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":us(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ps=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":us(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function ds(e){var t=this;if(t===gs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(fs){if(i!==fs)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(fs=i,Ke.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(fs=void 0,Ke.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(Dt.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===gs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(Dt.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(fs){if(o!==fs)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(fs=o,Ke.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(fs=void 0,Ke.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(gs||(gs={}));var Is={lazy:ds.bind(gs.LAZY),imme:ds.bind(gs.IMMEDIATE),guard:ds.bind(gs.GUARD),castTo:void 0};Is.castTo=function(){return Is};var ys=function(){function e(t){As(this,e),this.__DONT_USE_ME=t,fs&&(this.__TRANSFORM_CONTEXT_ADD_DEP=fs),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return ss(e,[{key:"asStub",value:function(){var e=Ye.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();hs([Is.imme(),ps("design:type",String)],ys.prototype,"id",void 0),hs([Is.imme((function(e){return e.constructor})),ps("design:type","function"==typeof(cs=void 0!==os.ConstructorOf&&os.ConstructorOf)?cs:Object)],ys.prototype,"kType",void 0),hs([Is.lazy((function(e){return e})),ps("design:type",Boolean)],ys.prototype,"$model",void 0),hs([Is.guard(),ps("design:type",Function),ps("design:paramtypes",[Function]),ps("design:returntype","function"==typeof(ls="undefined"!=typeof T&&T)?ls:Object)],ys.prototype,"guard",null);var Cs=function(){function e(){As(this,e)}return ss(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();Cs.creators=new Map;var Es=r(246);function Bs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vs(e,t){return(vs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ms(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qs(this,r)}}function Qs(e,t){return!t||"object"!==_s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _s(e){return(_s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ss,ws,Ds,Rs,Ms,xs=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_s(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ps=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":_s(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Ts=Symbol("baseParamModel"),Fs=Is.castTo(),Ls=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vs(e,t)}(r,e);var t=ms(r);function r(){return Bs(this,r),t.apply(this,arguments)}return r}(ys);function Os(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ks(e,t){return(ks=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Us(e);if(t){var i=Us(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gs(this,r)}}function Gs(e,t){return!t||"object"!==js(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Us(e){return(Us=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function js(e){return(js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}xs([Fs.lazy(),Ps("design:type",String)],Ls.prototype,"modelInstanceId",void 0),xs([Fs.imme(Ts),Ps("design:type",Symbol)],Ls.prototype,"type",void 0),xs([Fs.lazy((function(e){return e.getType()})),Ps("design:type","function"==typeof(Ss=void 0!==Fn.ParamModelType&&Fn.ParamModelType)?Ss:Object)],Ls.prototype,"modelType",void 0),xs([Fs.lazy(),Ps("design:type",String)],Ls.prototype,"name",void 0),xs([Fs.lazy(),Ps("design:type","function"==typeof(ws=void 0!==Fe.a&&Fe.a)?ws:Object)],Ls.prototype,"size",void 0),xs([Fs.lazy(),Ps("design:type","function"==typeof(Ds=void 0!==Se.a&&Se.a)?Ds:Object)],Ls.prototype,"box3",void 0),xs([Fs.lazy(),Ps("design:type","function"==typeof(Rs=void 0!==Es.ParamStore&&Es.ParamStore)?Rs:Object)],Ls.prototype,"paramStore",void 0),xs([Fs.lazy(),Ps("design:type","function"==typeof(Ms=void 0!==Fn.ParamModelCategory&&Fn.ParamModelCategory)?Ms:Object)],Ls.prototype,"category",void 0),xs([Fs.lazy(),Ps("design:type",Boolean)],Ls.prototype,"legal",void 0),xs([Fs.lazy((function(e){return e.getHasAttached()})),Ps("design:type",Boolean)],Ls.prototype,"attached",void 0),xs([Fs.lazy(),Ps("design:type",Boolean)],Ls.prototype,"deletable",void 0),xs([Fs.lazy(),Ps("design:type",Boolean)],Ls.prototype,"replaceable",void 0),xs([Fs.lazy(),Ps("design:type",Number)],Ls.prototype,"attachedVersion",void 0),xs([Fs.lazy(),Ps("design:type",Boolean)],Ls.prototype,"paramOverride",void 0);var Vs,Ys,Hs=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":js(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ks=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":js(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},qs=Is.castTo(),Js=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ks(e,t)}(o,e);var t,r,n,i=Ns(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&Os(t.prototype,r),n&&Os(t,n),o}(Ls);function Ws(e){return(Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zs(Object(r),!0).forEach((function(t){Zs(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Zs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $s(e){return function(e){if(Array.isArray(e))return eu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return eu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ru(e,t,r){return(ru="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Au(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function nu(e,t){return(nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Au(e);if(t){var i=Au(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ou(this,r)}}function ou(e,t){return!t||"object"!==Ws(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Au(e){return(Au=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function au(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Hs([qs.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),Ks("design:type",Js)],Js.prototype,"root",void 0),Hs([qs.imme(uA),Ks("design:type",Symbol)],Js.prototype,"type",void 0),Hs([qs.lazy((function(e){return e.isRoot()})),Ks("design:type",Boolean)],Js.prototype,"isRoot",void 0),Hs([qs.lazy((function(e){return e.isAccessory()})),Ks("design:type",Boolean)],Js.prototype,"isAccessory",void 0),Hs([qs.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),Ks("design:type",String)],Js.prototype,"assemblyId",void 0),Hs([qs.lazy((function(e,t){return e.getChildren().map((function(e){return Cs.get(e)}))})),Ks("design:type",Array)],Js.prototype,"children",void 0),Hs([qs.lazy((function(e,t){return e.getAccessories().map((function(e){return Cs.get(e)}))})),Ks("design:type",Array)],Js.prototype,"accessories",void 0),Hs([qs.lazy((function(e,t){return t.children.concat(t.accessories)})),Ks("design:type",Array)],Js.prototype,"childNodes",void 0),Hs([qs.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),Ks("design:type",Boolean)],Js.prototype,"belongsToTemplateAssembly",void 0),Hs([qs.guard(),Ks("design:type",Function),Ks("design:paramtypes",["function"==typeof(Vs=void 0!==ot.ParamModelVisitor&&ot.ParamModelVisitor)?Vs:Object,Boolean]),Ks("design:returntype",void 0)],Js.prototype,"visit",null),Hs([qs.guard(),Ks("design:type",Function),Ks("design:paramtypes",["function"==typeof(Ys=void 0!==ot.ParamModelVisitor&&ot.ParamModelVisitor)?Ys:Object,Boolean]),Ks("design:returntype",void 0)],Js.prototype,"upVisit",null),Cs.registeCreator(dt,(function(e){return e.isRoot()?new Js(e):Cs.get(e.getParent()).guard((function(t){return new Js(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var su=function e(){au(this,e),this.paramModels=[],this.paramModelAssembies=[]},uu=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},cu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nu(e,t)}(o,e);var t,r,n,i=iu(o);function o(e){var t;return au(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];ru(Au(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=Ci.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,$s(r.updatedOld));var o,A,a=r.added;a.push.apply(a,$s(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,Cs.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(Xs(Xs({},e),new su)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(is.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===uA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(ns.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=Cs.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(ns.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,uu);return t?Cs.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&tu(t.prototype,r),n&&tu(t,n),o}(Ei.KafBaseStateManager);function lu(e){return(lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hu(e,t,r){return(hu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function pu(e,t){return(pu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yu(e);if(t){var i=yu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Iu(this,r)}}function Iu(e,t){return!t||"object"!==lu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yu(e){return(yu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}cu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var Cu,Eu=Object(aA.getConnector)().setRootState,Bu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pu(e,t)}(o,e);var t,r,n,i=du(o);function o(){var e;return gu(this,o),(e=i.apply(this,arguments)).design=new it,e.fittingDesign=new Ht,e}return t=o,(r=[{key:"initState",value:function(){hu(yu(o.prototype),"initState",this).call(this);var e=pc().getDependentPlugin(Ei.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&fu(t.prototype,r),n&&fu(t,n),o}(Ei.types.combine({pad:cu}));function vu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(Cu||(Cu={}));var mu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=Ci.ERequest.GET),e.method===Ci.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&vu(t.prototype,r),n&&vu(t,n),e}();function Qu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var bu=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(Cu.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(Cu.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(Cu.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(Cu.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(Cu.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(Cu.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=mu.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(Cu.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(Cu.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(Cu.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(Cu.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=mu.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=mu.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=mu.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=mu.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&Qu(t.prototype,r),n&&Qu(t,n),e}();function _u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach((function(t){wu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Du(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ru(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Du(o,n,i,A,a,"next",e)}function a(e){Du(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var xu=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=Ru(a.a.mark((function e(r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Ru(a.a.mark((function e(r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Ru(a.a.mark((function e(r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Ru(a.a.mark((function e(r){var n,i,o,A=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Su(Su({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Ru(a.a.mark((function e(r,n){var i,o,A,s=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},o=t.convertRequest(Su(Su({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&Mu(t.prototype,r),n&&Mu(t,n),e}(),Pu=r(1120),Tu=r(31),Fu=r(213),Lu=r(162),Ou=r(92);function ku(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nu(e,t){return(Nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ju(e);if(t){var i=ju(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uu(this,r)}}function Uu(e,t){return!t||"object"!==Vu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ju(e){return(ju=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vu(e){return(Vu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Yu,Hu,Ku,qu,Ju,Wu,zu,Xu,Zu=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},$u=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ec=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nu(e,t)}(r,e);var t=Gu(r);function r(){var e;return ku(this,r),(e=t.apply(this,arguments)).client=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.encryptedClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.encryptInterceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.gzipEncryptBase64Interceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.pbEncryptedClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.encryptInterceptorWithArrayBuffer,Tu.encryptInterceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.gzipEncryptInterceptorWithArrayBuffer,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.gzipEncryptBase64Interceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.ossDegradedEncryptInterceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Lu.getClient)([Tu.interceptor,Fu.errorCodeInterceptor,Tu.ossDegradedGzipEncryptBase64Interceptor,Tu.parseCDNInterceptor,Tu.parseJSONInterceptor]),e}return r}(Pu.RequestClient);Zu([Tu.retryRequest,$u("design:type","function"==typeof(Yu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Yu:Object)],ec.prototype,"client",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(Hu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Hu:Object)],ec.prototype,"encryptedClient",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(Ku=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Ku:Object)],ec.prototype,"gzippedEncryptClient",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(qu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?qu:Object)],ec.prototype,"pbEncryptedClient",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(Ju=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Ju:Object)],ec.prototype,"pbGzippedEncryptClient",void 0),Zu([Object(Tu.retryRequest)(!0),$u("design:type","function"==typeof(Wu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Wu:Object)],ec.prototype,"ossGzippedEncryptClient",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(zu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?zu:Object)],ec.prototype,"ossDegradedEncryptedClient",void 0),Zu([Tu.retryRequest,$u("design:type","function"==typeof(Xu=void 0!==Ou.AxiosInstance&&Ou.AxiosInstance)?Xu:Object)],ec.prototype,"ossDegradedGzippedEncryptClient",void 0);var tc=Object(Dt.once)((function(){return new ec})),rc=Object(Dt.once)((function(){return new xu}));function nc(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ic(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var oc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return tc().addClientInterceptors(e)}},{key:"send",value:(i=a.a.mark((function e(t,r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=tc(),i=mu.toAxiosConfig(t),r.mode!==Cu.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==Cu.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){nc(o,r,n,A,a,"next",e)}function a(e){nc(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&ic(t.prototype,r),n&&ic(t,n),e}();function Ac(e){return(Ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ac(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sc(e,t,r){return(sc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function uc(e,t){return(uc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gc(e);if(t){var i=gc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lc(this,r)}}function lc(e,t){return!t||"object"!==Ac(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gc(e){return(gc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fc=new Ci.SingletonRef,hc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uc(e,t)}(o,e);var t,r,n,i=cc(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:Ri,axrs:io,singleton:fc},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){sc(gc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Ei.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Yo.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new zo(r,"custom-pad-document")),e.addDocumentSource(new AA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){wt.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){wt.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,ji=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Eu(this.stateManager)}},{key:"initNet",value:function(){sc(gc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new oc),this.client=new bu(this.net)}}])&&ac(t.prototype,r),n&&ac(t,n),o}(Ci.PluginApplication),pc=fc.instance;function dc(e){return function(e){if(Array.isArray(e))return Ic(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ic(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ic(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ic(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ec(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(Dt.map)(e,(function(e,t){var A=r(t);return A?Object(Dt.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yc(Object(r),!0).forEach((function(t){Cc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function Bc(e,t){if(!(e instanceof Sr&&e.type===b.NONE)){var r=pc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof mr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof s.Arc2d||t instanceof s.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof s.Arc2d){var n=t.circle.clone();n.radius+=1,t=new s.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===me.OUTER!=(s.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===s.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new s.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof s.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,u=t.endParam,c=t.clockSign;t=new s.EllipticalArc2d(i,o,A,a,u,c),e.path.type===me.OUTER!=(s.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===s.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new s.EllipticalArc2d(i,o,A,a,u,c))}}return t}(e);t&&a.transform(t);var u=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=pc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,u=i instanceof s.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new Sn({linkModel:A,points:u,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});u&&r.setPlankOutlineHintModels([].concat(dc(n),[u]))}}}var vc=r(0);function mc(e){return(mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
81
|
+
var Y=function(){return(Y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function H(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function K(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function q(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function J(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(q(arguments[t]));return e}var W=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===b.boolean)return Boolean(parseFloat(e));if(t===b.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===b.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:E.BZ_STORE,attr:P(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:E.BZ_STORE,attr:P(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var z,X=function(){function e(){this.data={name:"",displayName:"",type:Q.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:E.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:E.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function Z(e){var t=new X;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(z||(z={}));var $,ee,te,re,ne,ie,oe=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===y.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)x[t]="-";else if(14===t)x[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,x[t]=M[19===t?3&r|8:r]}return x.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===y.PARAM_ASSEMBLY||i===y.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set rotation!")}this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.ROTATION},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===y.PARAM_ASSEMBLY||i===y.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set position!")}this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.POSITION},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=U.get(e);if(this._origin===z.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==z.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Ae(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:v.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Ae(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:v.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=P(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=P(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=q(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=q(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new oe(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],Z(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new W,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),J(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,J(i)),r.push.apply(r,J(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==z.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType&&V.get(this.toolType),r=this.modelType;return r===m.ASSEMBLY||r===m.TEMPLATE_ASSEMBLY?{id:e,type:w.CustomGroup}:t?{id:e,type:t}:void 0},e}();function Ae(e,t,r){var n=r?"accessory":"child";if([y.PARAM_ASSEMBLY,y.TEMPLATE_ASSEMBLY,y.PARAM_FURNITURE,y.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===y.TEMPLATE_ASSEMBLY||t.type===y.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===z.SENSE||t._origin===z.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}($||($={})),function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}(ee||(ee={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(te||(te={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(re||(re={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(ne||(ne={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(ie||(ie={}));var ae,se,ue,ce,le,ge;new Map([[ie.AUDIT_PASS,"pass"],[ie.AUDIT_REJECT,"reject"],[ie.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(ae||(ae={})),function(e){e[e.AUDIT=0]="AUDIT"}(se||(se={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke"}(ue||(ue={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(ce||(ce={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(le||(le={})),function(e){e.API_CALL="API_CALL"}(ge||(ge={}));var fe,he,pe,de,Ie=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.collectSyncApiData=function(e,t,r){return function(n){var i={apiName:e.name,status:!0,args:r};try{var o=performance.now(),A=e.apply(t,r),a=performance.now();return i.return=A,i.duration=Math.floor(a-o),A}catch(e){throw i.status=!1,i.errMsg=e,e}finally{n(i)}}},e.collectAsyncApiData=function(e,t,r){return function(n){return H(void 0,void 0,void 0,(function(){var i,o,A,a,s;return K(this,(function(u){switch(u.label){case 0:i={apiName:e.name,status:!0,args:r},u.label=1;case 1:return u.trys.push([1,3,4,5]),o=performance.now(),[4,e.apply(t,r)];case 2:return A=u.sent(),a=performance.now(),i.return=A,i.duration=Math.floor(a-o),[2,A];case 3:throw s=u.sent(),i.status=!1,i.errMsg=s,s;case 4:return n(i),[7];case 5:return[2]}}))}))}},e.observeAsyncApiDeco=function(t){return function(r,n,i){var o=i.value,A=function(r){e.emitApiCalledEvent(Y(Y(Y({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return H(this,void 0,void 0,(function(){var r;return K(this,(function(n){switch(n.label){case 0:return r=this,[4,e.collectAsyncApiData(o,r,t)(A)];case 1:return[2,n.sent()]}}))}))},i}},e.observeSyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(Y(Y(Y({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,i=e.collectSyncApiData(o,n,t)(A);return i},i}},e.observeSyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.collectSyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(Y(Y({},r),t))}))}}},e.observeAsyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return H(this,void 0,void 0,(function(){return K(this,(function(o){return[2,e.collectAsyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(Y(Y({},r),t))}))]}))}))}}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(fe||(fe={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(he||(he={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(pe||(pe={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(de||(de={}));var ye,Ce,Ee,Be="$$geometry_color",ve="$$geometry_opacity",me=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(ye||(ye={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(Ce||(Ce={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(Ee||(Ee={}));var Qe,be,_e=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(Qe||(Qe={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(be||(be={}));var Se=r(68),we=r.n(Se),De=r(98),Re=r.n(De),Me=r(44),xe=r.n(Me),Pe=r(288),Te=r.n(Pe),Fe=r(5),Le=r.n(Fe),Oe=r(47);function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ve(e);if(t){var i=Ve(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return je(this,r)}}function je(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(r,e);var t=Ue(r);function r(){return Ne(this,r),t.apply(this,arguments)}return r}(Oe.CoreCustom),He=r(360),Ke=r(99),qe=r.n(Ke),Je=r(1117);function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ze(e,t,r){return(ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=et(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=et(e);if(t){var i=et(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $e(this,r)}}function $e(e,t){return!t||"object"!==tt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var rt,nt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},it=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xe(e,t)}(o,e);var t,r,n,i=Ze(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new He.CDoc,e.versionStore=new Je.VersionStore,e.setCustom(new Ye),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return ze(et(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),ze(et(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext),this}}])&&We(t.prototype,r),n&&We(t,n),o}(qe.a);nt([Object(Ke.property)(),it("design:type","function"==typeof(rt=void 0!==Ye&&Ye)?rt:Object)],ot.prototype,"custom",void 0);var At=r(107),at=r.n(At);function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ft(e);if(t){var i=ft(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gt(this,r)}}function gt(e,t){return!t||"object"!==ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ht(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},dt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ht(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},It=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(o,e);var t,r,n,i=lt(o);function o(){var e;return st(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&ut(t.prototype,r),n&&ut(t,n),o}(at.a);function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Et(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bt(e,t){return(Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qt(e);if(t){var i=Qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mt(this,r)}}function mt(e,t){return!t||"object"!==yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt([Object(Ke.property)(),dt("design:type",Boolean)],It.prototype,"isAppendHardware",void 0);var bt,_t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bt(e,t)}(o,e);var t,r,n,i=vt(o);function o(){return Ct(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return It}}])&&Et(t.prototype,r),n&&Et(t,n),o}(Oe.CoreParamModelAssembly),St=r(97),wt=new St.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(bt||(bt={}));var Dt=r(34),Rt=r(2),Mt=r(526),xt=Object(Mt.createKElementBaseClass)(),Pt=Dt.advanced.reportObserved,Tt=Dt.advanced.reportChanged;function Ft(e){return function(e){if(Array.isArray(e))return Lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Lt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ut(e);if(t){var i=Ut(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gt(this,r)}}function Gt(e,t){return!t||"object"!==jt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jt(e){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}xt.onGet=function(e){Pt(e)},xt.addSetHook((function(e){Tt(e)}));var Vt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Yt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Ht(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return wt.emit(bt.FITTING_MODEL_CHANGE),i}}var Kt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(o,e);var t,r,n,i=Nt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Ft(e),Ft(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(Rt.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Ft(this.grooveFittings),Ft(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&Ot(t.prototype,r),n&&Ot(t,n),o}(xt);Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"fittings",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"intersects",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"grooveFittings",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"plankFaceHintModels",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"fittingHintModels",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"plankOutlineHintModels",void 0),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"setFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"addFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Object]),Yt("design:returntype",void 0)],Kt.prototype,"removeFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"setGrooveFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"addGrooveFittings",null);var qt=r(30),Jt=r.n(qt),Wt=r(100),zt=r.n(Wt);function Xt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tr(e);if(t){var i=tr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return er(this,r)}}function er(e,t){return!t||"object"!==rr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tr(e){return(tr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ir=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":rr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},or=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zt(e,t)}(o,e);var t,r,n,i=$t(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=zt()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof at.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&Xt(t.prototype,r),n&&Xt(t,n),o}(xt);function Ar(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ar(e,t){return(ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cr(e);if(t){var i=cr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ur(this,r)}}function ur(e,t){return!t||"object"!==lr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lr(e){return(lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}nr([Jt.a,ir("design:type",String)],or.prototype,"id",void 0),nr([Jt.a,ir("design:type",Object)],or.prototype,"linkModel",void 0),nr([Jt.a,ir("design:type","function"!=typeof!1&&Object)],or.prototype,"hintOutline",void 0),nr([Jt.a,ir("design:type",Boolean)],or.prototype,"visible",void 0);var gr,fr,hr,pr,dr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ir=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ar(e,t)}(o,e);var t,r,n,i=sr(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,u=r.rotate,l=r.height,g=r.boundingBox;return A.id=e||zt()(),A.position=a instanceof Le.a?a:new Le.a(a),A.size=s instanceof Le.a?s:new Le.a(s),A.rotate=u instanceof Le.a?u:new Le.a(s),A.height=l,A.type="fittingType"in n?n.fittingType:c.INTERSECTED,A.visible=A.type!==c.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&Ar(t.prototype,r),n&&Ar(t,n),o}(xt);dr([Jt.a,Ir("design:type",String)],yr.prototype,"id",void 0),dr([Jt.a,Ir("design:type","function"==typeof(gr=void 0!==Le.a&&Le.a)?gr:Object)],yr.prototype,"position",void 0),dr([Jt.a,Ir("design:type","function"==typeof(fr=void 0!==Le.a&&Le.a)?fr:Object)],yr.prototype,"size",void 0),dr([Jt.a,Ir("design:type",Number)],yr.prototype,"height",void 0),dr([Jt.a,Ir("design:type","function"==typeof(hr=void 0!==c&&c)?hr:Object)],yr.prototype,"type",void 0),dr([Jt.a,Ir("design:type","function"==typeof(pr=void 0!==Le.a&&Le.a)?pr:Object)],yr.prototype,"rotate",void 0),dr([Jt.a,Ir("design:type",Number)],yr.prototype,"radius",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"visible",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"viewColor",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"opacity",void 0);var Cr=r(16),Er=r.n(Cr);function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Qr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=zt()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new u.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new u.Vector2d}},{key:"getRealLine",value:function(){var e=Br(this.start.getPointsForRender(),2)[1],t=Br(this.end.getPointsForRender(),1)[0];return this.getType()===S.SEGMENT?new u.LineSeg2d(e,t):this.getType()===S.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new u.CCS2d(new u.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new u.Vector2d(1,0)),t=new u.Ellipse2d(e,this.majorRadius,this.minorRadius);return u.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==S.CIRCLE_ARC)return new u.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,s,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new u.LineSeg2d(n,i),s=a.length/2,c=a.getPoint(s),l=Math.sqrt(r*r-s*s),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),u.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new u.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Br(this.start.getPointsForRender(),2)[1],Br(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&mr(t.prototype,r),n&&mr(t,n),e}();function br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var wr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new u.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new u.Vector2d(t.offset||{x:0,y:0}),this.id=zt()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===_.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new u.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=br(A,2),s=a[0],c=a[1];if(i===_.CIRCLE||i===_.CUT_CIRCLE){if(i===_.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:u.Arc2d.makeArcByStartEndPoints(s,s,c,!0),renderPoints:A};var f=new u.Line2d(s,l),h=new u.Line2d(c,g),p=br(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new u.LineSeg2d(s,c),renderPoints:A};var d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:u.Arc2d.makeArcByStartEndPoints(o.added(n),s,c,!e),renderPoints:A}}if(i===_.ELLIPSE){var I=o.added(n),y=new u.CCS2d(new u.Point2d(I.x,I.y),new u.Vector2d(1,0)),C=new u.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:u.EllipticalArc2d.makeByStartEndPoints(C,s,c,!e),renderPoints:A}}return{curveLine:new u.LineSeg2d(s,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===_.NONE)return[a,a];if(!t||!r)return[a,a];var s=new u.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new u.Ray2d(r.start.getPosition(),r.getVector());if(A===_.LINE)return[s.getPoint(i[0]),c.getPoint(i[1])];if(A===_.CIRCLE){if(void 0!==e){var l=s.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[s.getPoint(h),c.getPoint(h)]}if(i)return[s.getPoint(i[0]),c.getPoint(i[0])]}if(A===_.CUT_CIRCLE){var p=a.added(o),d=new u.Circle2d(p,e),I=d.intersectCurve(s),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===_.ELLIPSE){var C=a.added(o),E=new u.CCS2d(new u.Point2d(C.x,C.y),new u.Vector2d(1,0)),B=new u.Ellipse2d(E,this.majorRadius,this.minorRadius),v=B.intersectCurve(s),m=B.intersectCurve(c);if(v.length&&m.length)return[v[0].point,m[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Sr(t.prototype,r),n&&Sr(t,n),e}();function Dr(e){return function(e){if(Array.isArray(e))return xr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Mr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Mr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Mr(e,t){if(e){if("string"==typeof e)return xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xr(e,t):void 0}}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Tr=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===_.NONE&&(e=e.concat(t.getPosition())),t.getType()===_.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==_.CIRCLE&&t.getType()!==_.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===S.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=Rr(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==_.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=Rr(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,s=t.forceCCW,c=void 0===s||s,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=zt()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==_.NONE?e.push.apply(e,Dr(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==_.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new u.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new u.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==_.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===S.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==_.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==S.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===_.NONE?e.push(t.getPosition()):e.push.apply(e,Dr(t.getRenderPoints()))})),e}}])&&Pr(t.prototype,r),n&&Pr(t,n),e}();function Fr(e,t){var r=t.paramPoints.map((function(e){return new wr(e)})),n=t.paramPathLines.map((function(e){return new Qr(e)}));return new Tr({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function Lr(e){return function(e){if(Array.isArray(e))return Or(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Or(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nr(e,t){return(Nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jr(e);if(t){var i=jr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ur(this,r)}}function Ur(e,t){return!t||"object"!==Vr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vr(e){return(Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Yr,Hr,Kr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Jr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nr(e,t)}(o,e);var t,r,n,i=Gr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=c.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new u.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new u.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new u.Matrix4,t=this.model.getSize();return e.fromArray(Lr(this.model.getConcatenatedMatrix().multiply((new xe.a).makeTranslation(new Le.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&kr(t.prototype,r),n&&kr(t,n),o}(xt);Kr([Jt.a,qr("design:type",String)],Jr.prototype,"id",void 0),Kr([Jt.a,qr("design:type",Object)],Jr.prototype,"viewColor",void 0),Kr([Jt.a,qr("design:type",Object)],Jr.prototype,"visible",void 0),Kr([Jt.a,qr("design:type","function"==typeof(Yr=void 0!==c&&c)?Yr:Object)],Jr.prototype,"type",void 0),Kr([Jt.a,qr("design:type","function"==typeof(Hr=void 0!==Tr&&Tr)?Hr:Object)],Jr.prototype,"path",void 0),Kr([Jt.a,qr("design:type",Number)],Jr.prototype,"depth",void 0),Kr([Jt.a,qr("design:type",Number)],Jr.prototype,"opacity",void 0);var Wr=r(142),zr=r.n(Wr);function Xr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zr(e,t){return(Zr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tn(e);if(t){var i=tn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return en(this,r)}}function en(e,t){return!t||"object"!==rn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rn(e){return(rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nn,on,An,an,sn,un=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":rn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ln=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zr(e,t)}(o,e);var t,r,n,i=$r(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||zt()(),u.position=r instanceof Le.a?r:new Le.a(r),u.size=A instanceof Le.a?A:new Le.a(A),u.rotate=n instanceof Le.a?n:new Le.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&Xr(t.prototype,r),n&&Xr(t,n),o}(xt);function gn(e,t){return(gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pn(e);if(t){var i=pn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hn(this,r)}}function hn(e,t){return!t||"object"!==dn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dn(e){return(dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}un([Jt.a,cn("design:type",String)],ln.prototype,"id",void 0),un([Jt.a,cn("design:type","function"==typeof(nn=void 0!==l&&l)?nn:Object)],ln.prototype,"type",void 0),un([Jt.a,cn("design:type","function"==typeof(on=void 0!==Le.a&&Le.a)?on:Object)],ln.prototype,"position",void 0),un([Jt.a,cn("design:type","function"==typeof(An=void 0!==Le.a&&Le.a)?An:Object)],ln.prototype,"size",void 0),un([Jt.a,cn("design:type","function"==typeof(an=void 0!==Le.a&&Le.a)?an:Object)],ln.prototype,"rotate",void 0),un([Jt.a,cn("design:type","function"==typeof(sn=void 0!==zr.a&&zr.a)?sn:Object)],ln.prototype,"geometryModel",void 0),un([Jt.a,cn("design:type",Array)],ln.prototype,"originPoints",void 0),un([Jt.a,cn("design:type",Object)],ln.prototype,"viewColor",void 0);var In=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},yn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gn(e,t)}(r,e);var t=fn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:zt()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(xt);function En(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bn(e,t){return(Bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qn(e);if(t){var i=Qn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mn(this,r)}}function mn(e,t){return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}In([Jt.a,yn("design:type",String)],Cn.prototype,"id",void 0);var _n=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Sn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":bn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bn(e,t)}(o,e);var t,r,n,i=vn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&En(t.prototype,r),n&&En(t,n),o}(xt);function Dn(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}_n([Jt.a,Sn("design:type",String)],wn.prototype,"id",void 0),_n([Jt.a,Sn("design:type",Object)],wn.prototype,"linkModel",void 0),_n([Jt.a,Sn("design:type",Object)],wn.prototype,"viewColor",void 0),_n([Jt.a,Sn("design:type",Number)],wn.prototype,"opacity",void 0),_n([Jt.a,Sn("design:type",Boolean)],wn.prototype,"visible",void 0),_n([Jt.a,Sn("design:type",Array)],wn.prototype,"points",void 0),_n([Jt.a,Sn("design:type",Number)],wn.prototype,"height",void 0);var Rn=[new u.Vector3d({x:1,y:0,z:0}),new u.Vector3d({x:0,y:1,z:0}),new u.Vector3d({x:0,y:0,z:1})];function Mn(e){return!(!e||e.fittingType!==c.HOLE)}function xn(e){return!(!e||e.fittingType!==c.GROOVE)}function Pn(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,s=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),s=(new xe.a).makeTranslation(new Le.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(s),l=new u.Point3d(i),g=new u.Point3d(o),f=new u.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new Le.a(h).applyMatrix4(c);if(Mn(t)){var d=t.diameter;r=new Le.a(d,f.length,d),n=Le.a.Y_AXIS}if(xn(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new Le.a(I,f.length,y),n=Le.a.Y_AXIS):[2,4].includes(A)?(r=new Le.a(I,y,f.length),n=Le.a.Z_AXIS):[1,3].includes(A)&&(r=new Le.a(y,I,f.length),n=Le.a.Z_AXIS)}var C=new Le.a(o).sub(new Le.a(i)).normalize(),E=(new Te.a).setFromTwoVectors(n,C),B=c.clone().multiply((new xe.a).makeRotationFromQuaternion(E)),v=new Le.a((new Re.a).setFromRotationMatrix(B)),m=new we.a(r,p,v);return new yr(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);Mn(e)?(n=o,i=a):xn(e)&&(n=A,i=s);var l=e.params||[],g=l.find((function(e){return e.key===Be})),f=l.find((function(e){return e.key===ve}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var Tn=r(719),Fn=r(720),Ln=r(10),On=r(114),kn=r.n(On),Nn=r(141),Gn=r.n(Nn),Un=r(209),jn=r.n(Un),Vn=r(113),Yn=r.n(Vn),Hn=r(210),Kn=r.n(Hn),qn=r(427),Jn=r.n(qn),Wn=r(72),zn=r.n(Wn),Xn=r(188),Zn=r.n(Xn);function $n(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&zn.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return zn.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new Le.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new Zn.a).includePoints(e);t=new Er.a(r.min.x,r.max.y)}return e.map((function(e){return Er.a.sub(e,t)}))}(r,e.pivot),indices:n}}var ei=new Le.a(0,0,0);function ti(e){var t=e.planeTransform;return function(e){try{var t=$n(e),r=new zr.a;return r.vertices=new Float32Array(Le.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(Le.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(Er.a.toFloatArray(t.textures)),r.indices=new Uint16Array(Le.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return ei.set(e.x,e.y,0),t.localToWorld(ei)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function ri(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ni(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ni(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ii,oi=new Le.a(0,0,0);function Ai(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new xe.a).makeTranslation(new Le.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],c=(n=u===l.SHELL?function(e,t){var r,n=e.shell,i=Tn.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return Fn.triangulate2(e)})),o=new zr.a,A=0,a=[],s=[],u=[],c=[],l=ri(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return oi.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s):ai(t,s)).getBoundingBox3().getCenter(),g=kn.a.decompose(s).rotation,f=kn.a.compose(c,g,Le.a.ONE),h=(new xe.a).getInverse(f),p=new Float32Array(n.vertices),d=new Gn.a,I=0;I<p.length;I+=3)oi.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(oi);return new ln(i,u,c,g,d.getSize(),n,t.points.map((function(e){return new Le.a(e).applyMatrix4(s)})))}function ai(e,t){var r=e.points.map((function(e){return new Le.a(e).applyMatrix4(t)})),n=(new jn.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new Jn.a(i,o,n,r[0]),a=r.map((function(e){return new Er.a(A.worldToLocal(e))})),s=new Yn.a(a);return ti({planeTransform:A,shapes:[new Kn.a(s)]})}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ui(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?si(Object(r),!0).forEach((function(t){ci(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ci(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function li(e,t){var r=t.clone().inversed(),n=new Tr({id:e.id,type:Qe.OUTER,points:e.points.map((function(e){return ui(ui({},e),{},{position:(t=e.position,n=new u.Point3d(t).appliedMatrix4(r),new u.Point2d(n))});var t,n})).map(gi),lines:e.lines.map(fi),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function gi(e){return new wr(e)}function fi(e){return new Qr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(ii||(ii={}));var hi=new u.Tolerance.Tolerance(.01,.01,.01);function pi(e){if(e.getType()===_.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==S.CIRCLE_ARC&&r.type!==S.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function di(e){return e.type===S.SEGMENT||(!(e.type!==S.CIRCLE_ARC||!u.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==S.CIRCLE_ARC||!u.Num.isBigger(e.getVector().length,2*e.radius)))}function Ii(e){return e.type===ii.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===ii.LINE?e.val.getRealLine():void 0}function yi(e,t){if(e.type===ii.POINT&&e.val.getType()===_.NONE)return!0;if(t.type===ii.POINT&&t.val.getType()===_.NONE)return!0;var r=Ii(e),n=Ii(t);if(!r||!n)return!1;var i=u.Curve2dIntersect.curve2dIntersectCurve2d(r,n,hi);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function Ci(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=Dn(e,u.Vector3d),n=Rn.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=u.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new u.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new Jr({data:e,path:li(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Be})),s=(e.params||[]).find((function(e){return e.key===ve}));return A.setViewColor(a?a.value:n),A.setOpacity(s?Number(s.value):i),A}var Ei=r(23),Bi=r(12),vi=r(11),mi=r.n(vi);function Qi(e){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Si(e,t){return(Si=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ri(e);if(t){var i=Ri(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Di(this,r)}}function Di(e,t){return!t||"object"!==Qi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ri(e){return(Ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Si(e,t)}(o,e);var t,r,n,i=wi(o);function o(){return bi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&_i(t.prototype,r),n&&_i(t,n),o}(mi.a.PureComponent);function xi(e){return(xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ki(e);if(t){var i=ki(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Oi(this,r)}}function Oi(e,t){return!t||"object"!==xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ki(e){return(ki=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ni,Gi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(o,e);var t,r,n,i=Li(o);function o(){return Pi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Ti(t.prototype,r),n&&Ti(t,n),o}(Ei.AXR);Ni||(Ni={});var Ui,ji=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(Ui||(Ui={}));var Vi,Yi,Hi={};function Ki(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ki(Object(r),!0).forEach((function(t){Ji(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ki(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ji(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wi(e,t){!function(e){Vi.log(zi(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};Yi&&Object.assign(r.labels,Yi()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){Vi.logByKtracker(e)}(r)}function zi(e){return qi(qi({},e),{},{pluginName:"customPad"})}function Xi(e){return(Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eo(e,t,r){return(eo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=io(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function to(e,t){return(to=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ro(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=io(e);if(t){var i=io(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return no(this,r)}}function no(e,t){return!t||"object"!==Xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oo={entry:Gi,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&to(e,t)}(o,e);var t,r,n,i=ro(o);function o(){return Zi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){eo(io(o.prototype),"init",this).call(this),this.addConfig({sendLog:Wi,perfLogConfig:ji,timeLogConfig:Hi})}}])&&$i(t.prototype,r),n&&$i(t,n),o}(Ei.Monitor)};var Ao,ao,so=r(60),uo=r(718),co=r(423);function lo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function go(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){lo(o,n,i,A,a,"next",e)}function a(e){lo(o,n,i,A,a,"throw",e)}A(void 0)}))}}function fo(e){return function(e){if(Array.isArray(e))return Io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||po(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=po(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function po(e,t){if(e){if("string"==typeof e)return Io(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Io(e,t):void 0}}function Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(Ao||(Ao={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(ao||(ao={}));var Co=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new uo.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(so.throttleInRaf)((function(){Ei.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(co.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;Ei.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ei.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(Ao.autoBackup)&&Ei.Util.safeExec((function(){n[Ao.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[Ao.autoBackup])}),!1),t.includes(Ao.transaction)&&Ei.Util.safeExec((function(){n[Ao.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(Ao.version)&&Ei.Util.safeExec((function(){n[Ao.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(Ao.modelBinding)&&Ei.Util.safeExec((function(){n[Ao.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(Ao.autoSave)&&Ei.Util.safeExec((function(){n[Ao.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=ho(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[Ao.autoBackup]&&Ei.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[Ao.autoBackup])}),!1),t[Ao.transaction]&&Ei.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[Ao.transaction])})),t[Ao.version]&&Ei.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[Ao.version])})),t[Ao.modelBinding]&&Ei.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[Ao.modelBinding])})),t[Ao.autoSave]&&Ei.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[Ao.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=ho(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;fo(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Ao.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Ao.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return go(s.a.mark((function o(){var A,a,u,c,l,g=arguments;return s.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),a=g.length,u=new Array(a),c=0;c<a;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(ao.mergeRecorder)&&this.mergeRecorder(),e.includes(ao.requestBackup)?this.requestBackup():e.includes(ao.forceBackup)?this.forceBackup():e.includes(ao.revert)&&this.revert(),e.includes(ao.notifyModelChange)&&this.notifyModelChange(),e.includes(ao.autoSave)?this.save(!0):e.includes(ao.save)&&this.save()}}])&&yo(t.prototype,r),n&&yo(t,n),e}(),Eo=r(527),Bo=r.n(Eo),vo=r(290);function mo(e){return(mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bo(e,t){return(bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wo(e);if(t){var i=wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return So(this,r)}}function So(e,t){return!t||"object"!==mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wo(e){return(wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Do=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bo(e,t)}(o,e);var t,r,n,i=_o(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&Qo(t.prototype,r),n&&Qo(t,n),o}(Bi.BackupItem);var Ro=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=Do,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===vo.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===vo.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===vo.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function Mo(e){return(Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xo(e){return function(e){if(Array.isArray(e))return Fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||To(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=To(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function To(e,t){if(e){if("string"==typeof e)return Fo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fo(e,t):void 0}}function Fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function No(e,t,r){return t&&ko(e.prototype,t),r&&ko(e,r),e}function Go(e,t){return(Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vo(e);if(t){var i=Vo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jo(this,r)}}function jo(e,t){return!t||"object"!==Mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vo(e){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(r,e);var t=Uo(r);function r(){var e;return Oo(this,r),(e=t.apply(this,arguments)).doc=new He.CDoc,e}return No(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Bo()(Object)),Ho=new(function(){function e(){Oo(this,e),this.stacks=[{documentAction:new Co}]}var t,r;return No(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=s.a.mark((function e(){var t,r,n,i,o,A,a,u,c,l,g,f,h,p,d,I=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([Ao.autoBackup]),i=new Co,o=new Yo,A=new Bi.DocumentStateManager,a=Po(this.stacks);try{for(a.s();!(u=a.n()).done;){c=u.value,l=Po(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}i.docs=[o].concat(xo(t)),i.kafDocument=A,f=new Ro(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=Po(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new Ro(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){Lo(o,n,i,A,a,"next",e)}function a(e){Lo(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=Po(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=Po(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[ao.requestBackup])}}]),e}());function Ko(e){return(Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qo(e,t){return(qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zo(e);if(t){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wo(this,r)}}function Wo(e,t){return!t||"object"!==Ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zo(e){return(zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qo(e,t)}(r,e);var t=Jo(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(Ro);function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eA(e,t){return(eA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nA(e);if(t){var i=nA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rA(this,r)}}function rA(e,t){return!t||"object"!==Zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nA(e){return(nA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eA(e,t)}(o,e);var t,r,n,i=tA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&$o(t.prototype,r),n&&$o(t,n),o}(Bi.BackupItem);var oA,AA,aA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=Rt.noop,this.BackupItemImpl=iA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){xt.addSetHook(e)},this.beforeDispose=function(){}},sA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(oA||(oA={})),function(e){e.SELECTED="SELECTED"}(AA||(AA={}));var uA=Symbol("paramModelAssembly"),cA=Symbol("paramModel");function lA(e,t){return(lA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hA(e);if(t){var i=hA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fA(this,r)}}function fA(e,t){return!t||"object"!==pA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hA(e){return(hA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pA(e){return(pA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var dA,IA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},yA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":pA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},CA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lA(e,t)}(r,e);var t=gA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=uA,n.entityId=e.getId(),n}return r}(Bi.Entity),EA=CA=IA([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),yA("design:paramtypes",["function"==typeof(dA=void 0!==Oe.CoreParamModelAssembly&&Oe.CoreParamModelAssembly)?dA:Object])],CA);function BA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mA(e,t)}function mA(e,t){return(mA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_A(e);if(t){var i=_A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bA(this,r)}}function bA(e,t){return!t||"object"!==SA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _A(e){return(_A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function SA(e){return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":SA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},DA=function(e){vA(r,e);var t=QA(r);function r(e,n){var i;return BA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Bi.Entity),RA=function(e){vA(r,e);var t=QA(r);function r(){return BA(this,r),t.apply(this,arguments)}return r}(DA);RA=wA([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],RA);var MA=r(7),xA=r.n(MA),PA=r(190);function TA(e){return(TA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":TA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},LA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":TA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},OA=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function kA(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function NA(e){return(NA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UA(e,t){return(UA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=YA(e);if(t){var i=YA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VA(this,r)}}function VA(e,t){return!t||"object"!==NA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function YA(e){return(YA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}FA([Dt.observable,LA("design:type",Number)],OA.prototype,"opacity",void 0),FA([Dt.observable,LA("design:type",Boolean)],OA.prototype,"visible",void 0);var HA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UA(e,t)}(o,e);var t,r,n,i=jA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new MA.LineBasicMaterial({color:oA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new MA.BufferGeometry).addAttribute("position",new MA.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?oA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&GA(t.prototype,r),n&&GA(t,n),o}(MA.LineSegments),KA=r(359),qA=r(84);function JA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function WA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zA=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JA(Object(r),!0).forEach((function(t){WA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:MA.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function XA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ZA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?XA(Object(r),!0).forEach((function(t){$A(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ea(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ta(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ea(o,n,i,A,a,"next",e)}function a(e){ea(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ra(e){return na.apply(this,arguments)}function na(){return(na=ta(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,a=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=ZA({},zA),u&&(l=Object(qA.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(Rt.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new MA.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,a){e.next=18;break}return e.next=16,Object(KA.loadImage)(g);case 16:h=e.sent,a={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(KA.loadTexture)(g,{wrapS:MA.WebGLTextureWrap.Repeat,wrapT:MA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new MA.Vector2(1/a.x,1/a.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:r.setValues(c);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ia(e){return(ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Aa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){oa(o,n,i,A,a,"next",e)}function a(e){oa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function aa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sa(e,t){return(sa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=la(e);if(t){var i=la(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ca(this,r)}}function ca(e,t){return!t||"object"!==ia(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function la(e){return(la=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ga=new MA.BufferGeometry;var fa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sa(e,t)}(a,e);var t,r,n,i,o,A=ua(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=A.call(this)).props=e,t.categoryId=Ei.EDCCountCategory.PHONG,t.material=new MA.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=a,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=Aa(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new MA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new MA.BufferAttribute(r,1),t.addAttribute("position",new MA.BufferAttribute(n,3)),t.addAttribute("uv",new MA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new MA.BufferAttribute(i,3)):t.computeVertexNormals(),t):ga}},{key:"updateMaterial",value:(i=Aa(s.a.mark((function e(){var t,r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,ra({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&aa(t.prototype,r),n&&aa(t,n),a}(MA.Mesh);function ha(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return pa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function da(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ia(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ya(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ca={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var Ea=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?da(Object(r),!0).forEach((function(t){Ia(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Ca),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new OA,this.id=t.model.getId(),this.type=r.type;var n,i=ha(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new MA.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(PA.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(PA.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(PA.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(PA.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(PA.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new fa({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(Rt.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=ha(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Bi.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||Le.a.ZERO,size:n.size.clone().div(n.scale),scale:Le.a.ONE,rotation:Le.a.ZERO,generateComponentInstanceKey:kA(t.getId())}),this.displayInfoMesh=this.displayInfoDrawable.create(r),e.add(this.displayInfoMesh))):this.displayInfoDrawable&&this.displayInfoDrawable.update(this.displayInfoMesh)}},{key:"renderDisplayInfoMeshes",value:function(e,t,r){var n=t.getFurnitureModels();if(this.modelDepProps.furnitureModels!==n){if(this.modelDepProps.furnitureModels=n,this.disposeDisplayInfoMeshs(e),this.displayInfoDrawables=n.map((function(e){return new Bi.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:kA(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=ha(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r,n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new HA({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}])&&ya(t.prototype,r),n&&ya(t,n),e}();function Ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function va(e,t){return(va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ma(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ba(e);if(t){var i=ba(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qa(this,r)}}function Qa(e,t){return!t||"object"!==_a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ba(e){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _a(e){return(_a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Sa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_a(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},wa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&va(e,t)}(r,e);var t=ma(r);function r(){var e;return Ba(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(DA);function Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ma(e,t,r){return t&&Ra(e.prototype,t),r&&Ra(e,r),e}function xa(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new wa(e,t):new RA(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return xa(e,t,r)})).filter((function(e){return!!e})),n}}wa=Sa([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return new Ea({model:this.model,renderChild:function t(r){return new Ea({model:r,renderChild:t},e.context)}},this.context)})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],wa);var Pa=function(){function e(t){var r=this;Da(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return Ma(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)xa(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new EA(e)}))}}]),e}(),Ta=function(){function e(t,r){Da(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new Pa(r)}return Ma(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function Fa(e){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var La=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Oa=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ka=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function Na(e){return function(e){if(Array.isArray(e))return Ga(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ga(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ga(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ua(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}La([Dt.observable,Oa("design:type",Object)],ka.prototype,"showOutline",void 0),La([Dt.observable,Oa("design:type",Array)],ka.prototype,"selected",void 0);var ja=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof MA.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return Na(this.idMap.entries())}}])&&Ua(t.prototype,r),n&&Ua(t,n),e}(),Va=r(189);function Ya(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ha=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Va.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Va.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&Ya(t.prototype,r),n&&Ya(t,n),e}();function Ka(e){return(Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||Wa(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ja(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Wa(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Wa(e,t){if(e){if("string"==typeof e)return za(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?za(e,t):void 0}}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $a(e,t){return($a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function es(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rs(e);if(t){var i=rs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ts(this,r)}}function ts(e,t){return!t||"object"!==Ka(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rs(e){return(rs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ha.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var ns=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$a(e,t)}(o,e);var t,r,n,i=es(o);function o(){var e;return Xa(this,o),(e=i.apply(this,arguments)).store=new ka,e.objectManager=new ja,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=Ja(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=qa(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new Ha(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(AA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new Ta(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){Dt.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){Dt.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=Ja(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=qa(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=Ja(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&Za(t.prototype,r),n&&Za(t,n),o}(St.EventEmitter),is=r(289),os=r.n(is),As=r(727);function as(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ss(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function us(e,t,r){return t&&ss(e.prototype,t),r&&ss(e,r),e}function cs(e){return(cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ls,gs,fs,hs,ps=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":cs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ds=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":cs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Is(e){var t=this;if(t===fs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(hs){if(i!==hs)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(hs=i,qe.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(hs=void 0,qe.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(Rt.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===fs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(Rt.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(hs){if(o!==hs)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(hs=o,qe.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(hs=void 0,qe.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(fs||(fs={}));var ys={lazy:Is.bind(fs.LAZY),imme:Is.bind(fs.IMMEDIATE),guard:Is.bind(fs.GUARD),castTo:void 0};ys.castTo=function(){return ys};var Cs=function(){function e(t){as(this,e),this.__DONT_USE_ME=t,hs&&(this.__TRANSFORM_CONTEXT_ADD_DEP=hs),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return us(e,[{key:"asStub",value:function(){var e=He.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();ps([ys.imme(),ds("design:type",String)],Cs.prototype,"id",void 0),ps([ys.imme((function(e){return e.constructor})),ds("design:type","function"==typeof(ls=void 0!==As.ConstructorOf&&As.ConstructorOf)?ls:Object)],Cs.prototype,"kType",void 0),ps([ys.lazy((function(e){return e})),ds("design:type",Boolean)],Cs.prototype,"$model",void 0),ps([ys.guard(),ds("design:type",Function),ds("design:paramtypes",[Function]),ds("design:returntype","function"==typeof(gs="undefined"!=typeof T&&T)?gs:Object)],Cs.prototype,"guard",null);var Es=function(){function e(){as(this,e)}return us(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();Es.creators=new Map;var Bs=r(246);function vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){return(ms=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_s(e);if(t){var i=_s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bs(this,r)}}function bs(e,t){return!t||"object"!==Ss(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _s(e){return(_s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ss(e){return(Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ws,Ds,Rs,Ms,xs,Ps=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ss(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ts=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ss(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Fs=Symbol("baseParamModel"),Ls=ys.castTo(),Os=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ms(e,t)}(r,e);var t=Qs(r);function r(){return vs(this,r),t.apply(this,arguments)}return r}(Cs);function ks(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=js(e);if(t){var i=js(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Us(this,r)}}function Us(e,t){return!t||"object"!==Vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function js(e){return(js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vs(e){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Ps([Ls.lazy(),Ts("design:type",String)],Os.prototype,"modelInstanceId",void 0),Ps([Ls.imme(Fs),Ts("design:type",Symbol)],Os.prototype,"type",void 0),Ps([Ls.lazy((function(e){return e.getType()})),Ts("design:type","function"==typeof(ws=void 0!==Ln.ParamModelType&&Ln.ParamModelType)?ws:Object)],Os.prototype,"modelType",void 0),Ps([Ls.lazy(),Ts("design:type",String)],Os.prototype,"name",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Ds=void 0!==Le.a&&Le.a)?Ds:Object)],Os.prototype,"size",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Rs=void 0!==we.a&&we.a)?Rs:Object)],Os.prototype,"box3",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Ms=void 0!==Bs.ParamStore&&Bs.ParamStore)?Ms:Object)],Os.prototype,"paramStore",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(xs=void 0!==Ln.ParamModelCategory&&Ln.ParamModelCategory)?xs:Object)],Os.prototype,"category",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"legal",void 0),Ps([Ls.lazy((function(e){return e.getHasAttached()})),Ts("design:type",Boolean)],Os.prototype,"attached",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"deletable",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"replaceable",void 0),Ps([Ls.lazy(),Ts("design:type",Number)],Os.prototype,"attachedVersion",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"paramOverride",void 0);var Ys,Hs,Ks=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Js=ys.castTo(),Ws=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ns(e,t)}(o,e);var t,r,n,i=Gs(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&ks(t.prototype,r),n&&ks(t,n),o}(Os);function zs(e){return(zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xs(Object(r),!0).forEach((function(t){$s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eu(e){return function(e){if(Array.isArray(e))return tu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ru(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nu(e,t,r){return(nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=au(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function iu(e,t){return(iu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ou(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=au(e);if(t){var i=au(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Au(this,r)}}function Au(e,t){return!t||"object"!==zs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function au(e){return(au=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Ks([Js.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),qs("design:type",Ws)],Ws.prototype,"root",void 0),Ks([Js.imme(cA),qs("design:type",Symbol)],Ws.prototype,"type",void 0),Ks([Js.lazy((function(e){return e.isRoot()})),qs("design:type",Boolean)],Ws.prototype,"isRoot",void 0),Ks([Js.lazy((function(e){return e.isAccessory()})),qs("design:type",Boolean)],Ws.prototype,"isAccessory",void 0),Ks([Js.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),qs("design:type",String)],Ws.prototype,"assemblyId",void 0),Ks([Js.lazy((function(e,t){return e.getChildren().map((function(e){return Es.get(e)}))})),qs("design:type",Array)],Ws.prototype,"children",void 0),Ks([Js.lazy((function(e,t){return e.getAccessories().map((function(e){return Es.get(e)}))})),qs("design:type",Array)],Ws.prototype,"accessories",void 0),Ks([Js.lazy((function(e,t){return t.children.concat(t.accessories)})),qs("design:type",Array)],Ws.prototype,"childNodes",void 0),Ks([Js.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),qs("design:type",Boolean)],Ws.prototype,"belongsToTemplateAssembly",void 0),Ks([Js.guard(),qs("design:type",Function),qs("design:paramtypes",["function"==typeof(Ys=void 0!==At.ParamModelVisitor&&At.ParamModelVisitor)?Ys:Object,Boolean]),qs("design:returntype",void 0)],Ws.prototype,"visit",null),Ks([Js.guard(),qs("design:type",Function),qs("design:paramtypes",["function"==typeof(Hs=void 0!==At.ParamModelVisitor&&At.ParamModelVisitor)?Hs:Object,Boolean]),qs("design:returntype",void 0)],Ws.prototype,"upVisit",null),Es.registeCreator(It,(function(e){return e.isRoot()?new Ws(e):Es.get(e.getParent()).guard((function(t){return new Ws(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var uu=function e(){su(this,e),this.paramModels=[],this.paramModelAssembies=[]},cu=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&iu(e,t)}(o,e);var t,r,n,i=ou(o);function o(e){var t;return su(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];nu(au(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=Ei.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,eu(r.updatedOld));var o,A,a=r.added;a.push.apply(a,eu(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,Es.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(Zs(Zs({},e),new uu)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(os.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===cA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(is.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=Es.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(is.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,cu);return t?Es.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&ru(t.prototype,r),n&&ru(t,n),o}(Bi.KafBaseStateManager);function gu(e){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pu(e,t,r){return(pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function du(e,t){return(du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cu(e);if(t){var i=Cu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yu(this,r)}}function yu(e,t){return!t||"object"!==gu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}lu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var Eu,Bu=Object(sA.getConnector)().setRootState,vu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&du(e,t)}(o,e);var t,r,n,i=Iu(o);function o(){var e;return fu(this,o),(e=i.apply(this,arguments)).design=new ot,e.fittingDesign=new Kt,e}return t=o,(r=[{key:"initState",value:function(){pu(Cu(o.prototype),"initState",this).call(this);var e=dc().getDependentPlugin(Bi.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&hu(t.prototype,r),n&&hu(t,n),o}(Bi.types.combine({pad:lu}));function mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(Eu||(Eu={}));var Qu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=Ei.ERequest.GET),e.method===Ei.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&mu(t.prototype,r),n&&mu(t,n),e}();function bu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var _u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(Eu.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(Eu.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(Eu.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(Eu.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(Eu.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(Eu.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=Qu.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(Eu.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(Eu.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(Eu.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(Eu.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=Qu.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=Qu.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=Qu.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=Qu.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&bu(t.prototype,r),n&&bu(t,n),e}();function Su(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(r),!0).forEach((function(t){Du(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Du(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ru(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Mu(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ru(o,n,i,A,a,"next",e)}function a(e){Ru(o,n,i,A,a,"throw",e)}A(void 0)}))}}function xu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Pu=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&xu(t.prototype,r),n&&xu(t,n),e}(),Tu=r(1120),Fu=r(31),Lu=r(213),Ou=r(162),ku=r(92);function Nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gu(e,t){return(Gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vu(e);if(t){var i=Vu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ju(this,r)}}function ju(e,t){return!t||"object"!==Yu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vu(e){return(Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yu(e){return(Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Hu,Ku,qu,Ju,Wu,zu,Xu,Zu,$u=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Yu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ec=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Yu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gu(e,t)}(r,e);var t=Uu(r);function r(){var e;return Nu(this,r),(e=t.apply(this,arguments)).client=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.encryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.encryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.pbEncryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.encryptInterceptorWithArrayBuffer,Fu.encryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptInterceptorWithArrayBuffer,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.ossDegradedEncryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.ossDegradedGzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e}return r}(Tu.RequestClient);$u([Fu.retryRequest,ec("design:type","function"==typeof(Hu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Hu:Object)],tc.prototype,"client",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Ku=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Ku:Object)],tc.prototype,"encryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(qu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?qu:Object)],tc.prototype,"gzippedEncryptClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Ju=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Ju:Object)],tc.prototype,"pbEncryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Wu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Wu:Object)],tc.prototype,"pbGzippedEncryptClient",void 0),$u([Object(Fu.retryRequest)(!0),ec("design:type","function"==typeof(zu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?zu:Object)],tc.prototype,"ossGzippedEncryptClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Xu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Xu:Object)],tc.prototype,"ossDegradedEncryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Zu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Zu:Object)],tc.prototype,"ossDegradedGzippedEncryptClient",void 0);var rc=Object(Rt.once)((function(){return new tc})),nc=Object(Rt.once)((function(){return new Pu}));function ic(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function oc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ac=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return rc().addClientInterceptors(e)}},{key:"send",value:(i=s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=rc(),i=Qu.toAxiosConfig(t),r.mode!==Eu.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==Eu.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ic(o,r,n,A,a,"next",e)}function a(e){ic(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&oc(t.prototype,r),n&&oc(t,n),e}();function ac(e){return(ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uc(e,t,r){return(uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function cc(e,t){return(cc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fc(e);if(t){var i=fc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gc(this,r)}}function gc(e,t){return!t||"object"!==ac(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fc(e){return(fc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hc=new Ei.SingletonRef,pc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cc(e,t)}(o,e);var t,r,n,i=lc(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:Mi,axrs:oo,singleton:hc},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){uc(fc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Bi.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Ho.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new Xo(r,"custom-pad-document")),e.addDocumentSource(new aA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){Dt.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){Dt.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Vi=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Bu(this.stateManager)}},{key:"initNet",value:function(){uc(fc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Ac),this.client=new _u(this.net)}}])&&sc(t.prototype,r),n&&sc(t,n),o}(Ei.PluginApplication),dc=hc.instance;function Ic(e){return function(e){if(Array.isArray(e))return yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yc(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ec(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bc(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(Rt.map)(e,(function(e,t){var A=r(t);return A?Object(Rt.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cc(Object(r),!0).forEach((function(t){Ec(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function vc(e,t){if(!(e instanceof wr&&e.type===_.NONE)){var r=dc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof Qr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof u.Arc2d||t instanceof u.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof u.Arc2d){var n=t.circle.clone();n.radius+=1,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===Qe.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof u.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,s=t.endParam,c=t.clockSign;t=new u.EllipticalArc2d(i,o,A,a,s,c),e.path.type===Qe.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new u.EllipticalArc2d(i,o,A,a,s,c))}}return t}(e);t&&a.transform(t);var s=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=dc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,s=i instanceof u.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new wn({linkModel:A,points:s,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});s&&r.setPlankOutlineHintModels([].concat(Ic(n),[s]))}}}var mc=r(0);function Qc(e){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
82
82
|
/*!
|
|
83
83
|
* @qunhe/custom-miniapp-outer-sdk v0.19.10-alpha.1
|
|
84
84
|
* (c) 2022
|
|
85
85
|
* @license MIT
|
|
86
|
-
*/var
|
|
86
|
+
*/var bc,_c,Sc,wc,Dc,Rc,Mc;
|
|
87
87
|
/*!
|
|
88
88
|
* @qunhe/custom-apass-api v0.40.0
|
|
89
89
|
* (c) 2022 yuanlin <yuanlin@qunhemail.com>
|
|
@@ -103,7 +103,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
103
103
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
104
104
|
PERFORMANCE OF THIS SOFTWARE.
|
|
105
105
|
***************************************************************************** */
|
|
106
|
-
function Mc(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function xc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Mc(arguments[t]));return e}!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Qc||(Qc={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(bc||(bc={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(_c||(_c={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(Sc||(Sc={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(wc||(wc={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Dc||(Dc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Rc||(Rc={}));var Pc,Tc,Fc,Lc,Oc,kc,Nc,Gc,Uc,jc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Vc=new Array(36);function Yc(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(Pc||(Pc={})),function(e){e.SHELL="1",e.FACE="2"}(Tc||(Tc={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(Fc||(Fc={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(Lc||(Lc={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Oc||(Oc={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(kc||(kc={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(Nc||(Nc={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Gc||(Gc={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(Uc||(Uc={}));var Hc=new Map([[Uc.Cabinet,0],[Uc.Wardrobe,1],[Uc.DoorWindow,2],[Uc.CabinetCopy,4],[Uc.WardrobeCopy,5],[Uc.DoorWindowCopy,6]]),Kc=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===kc.boolean)return Boolean(parseFloat(e));if(t===kc.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===kc.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:Sc.BZ_STORE,attr:Yc(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:Sc.BZ_STORE,attr:Yc(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var qc,Jc=function(){function e(){this.data={name:"",displayName:"",type:Oc.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Sc.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Sc.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function Wc(e){var t=new Jc;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(qc||(qc={}));var zc,Xc,Zc,$c,el,tl,rl,nl=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){if(this.type===_c.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var t=this.toJSON(),r=e.deserialize(JSON.stringify(t));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)Vc[t]="-";else if(14===t)Vc[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Vc[t]=jc[19===t?3&r|8:r]}return Vc.join("")}(),r},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:Sc.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:Sc.ATTRIBUTE,attr:wc.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set rotation!");var t=this.getRoot(!0).type;if(t===_c.PARAM_ASSEMBLY||t===_c.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set rotation!");this.__trackUpdateField({type:Sc.ATTRIBUTE,attr:wc.ROTATION},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set position!");var t=this.getRoot(!0).type;if(t===_c.PARAM_ASSEMBLY||t===_c.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set position!");this.__trackUpdateField({type:Sc.ATTRIBUTE,attr:wc.POSITION},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=Hc.get(e);if(this._origin===qc.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:Sc.ATTRIBUTE,attr:wc.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==qc.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(il(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Dc.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(il(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Dc.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Yc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Yc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=Mc(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=Mc(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new nl(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],Wc(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new Kc,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),xc(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,xc(i)),r.push.apply(r,xc(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==qc.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e}();function il(e,t,r){var n=r?"accessory":"child";if([_c.PARAM_ASSEMBLY,_c.TEMPLATE_ASSEMBLY,_c.PARAM_FURNITURE,_c.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===_c.TEMPLATE_ASSEMBLY||t.type===_c.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===qc.SENSE||t._origin===qc.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(r&&!t.isRoot)throw new Error("Only root model can be append as accessory!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(zc||(zc={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Xc||(Xc={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(Zc||(Zc={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}($c||($c={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(el||(el={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(tl||(tl={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(rl||(rl={}));
|
|
106
|
+
function xc(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Pc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(xc(arguments[t]));return e}!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(bc||(bc={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(_c||(_c={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(Sc||(Sc={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(wc||(wc={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(Dc||(Dc={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Rc||(Rc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Mc||(Mc={}));var Tc,Fc,Lc,Oc,kc,Nc,Gc,Uc,jc,Vc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Yc=new Array(36);function Hc(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(Tc||(Tc={})),function(e){e.SHELL="1",e.FACE="2"}(Fc||(Fc={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(Lc||(Lc={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(Oc||(Oc={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(kc||(kc={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(Nc||(Nc={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(Gc||(Gc={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Uc||(Uc={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(jc||(jc={}));var Kc=new Map([[jc.Cabinet,0],[jc.Wardrobe,1],[jc.DoorWindow,2],[jc.CabinetCopy,4],[jc.WardrobeCopy,5],[jc.DoorWindowCopy,6]]),qc=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===Nc.boolean)return Boolean(parseFloat(e));if(t===Nc.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===Nc.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:wc.BZ_STORE,attr:Hc(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:wc.BZ_STORE,attr:Hc(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var Jc,Wc=function(){function e(){this.data={name:"",displayName:"",type:kc.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:wc.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:wc.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function zc(e){var t=new Wc;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(Jc||(Jc={}));var Xc,Zc,$c,el,tl,rl,nl,il=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){if(this.type===Sc.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var t=this.toJSON(),r=e.deserialize(JSON.stringify(t));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)Yc[t]="-";else if(14===t)Yc[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Yc[t]=Vc[19===t?3&r|8:r]}return Yc.join("")}(),r},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:wc.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set rotation!");var t=this.getRoot(!0).type;if(t===Sc.PARAM_ASSEMBLY||t===Sc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set rotation!");this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.ROTATION},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set position!");var t=this.getRoot(!0).type;if(t===Sc.PARAM_ASSEMBLY||t===Sc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set position!");this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.POSITION},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=Kc.get(e);if(this._origin===Jc.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==Jc.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(ol(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Rc.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(ol(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Rc.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Hc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Hc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=xc(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=xc(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new il(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],zc(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new qc,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),Pc(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,Pc(i)),r.push.apply(r,Pc(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==Jc.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e}();function ol(e,t,r){var n=r?"accessory":"child";if([Sc.PARAM_ASSEMBLY,Sc.TEMPLATE_ASSEMBLY,Sc.PARAM_FURNITURE,Sc.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===Sc.TEMPLATE_ASSEMBLY||t.type===Sc.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===Jc.SENSE||t._origin===Jc.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(r&&!t.isRoot)throw new Error("Only root model can be append as accessory!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Xc||(Xc={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Zc||(Zc={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}($c||($c={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(el||(el={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(tl||(tl={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(rl||(rl={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(nl||(nl={}));
|
|
107
107
|
/*! *****************************************************************************
|
|
108
108
|
Copyright (c) Microsoft Corporation.
|
|
109
109
|
|
|
@@ -118,7 +118,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
118
118
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
119
119
|
PERFORMANCE OF THIS SOFTWARE.
|
|
120
120
|
***************************************************************************** */
|
|
121
|
-
var ol=function(e,t){return(ol=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Al(e,t){function r(){this.constructor=e}ol(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var al,sl,ul=function(){return(ul=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function cl(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":mc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(al||(al={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(sl||(sl={}));var ll,gl,fl,hl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getAvailableMiniApp=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(ll||(ll={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(gl||(gl={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(fl||(fl={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(hl||(hl={}));var pl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.loadMode=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"loadMode"),cl([vc.anno.decl.api()],t.prototype,"isOpened"),cl([vc.anno.decl.api()],t.prototype,"close"),cl([vc.anno.decl.event()],t.prototype,"loaded"),cl([vc.anno.decl.api({ACL:el.PROTECTED})],t.prototype,"bootstrap"),cl([vc.anno.decl.api({ACL:el.PRIVATE})],t.prototype,"bootstrapDev"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(pl||(pl={}));var dl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=cl([vc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getDesignBaseInfo=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api({ACL:el.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:el.PROTECTED})],t)}(vc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(dl||(dl={}));var Il;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getDocStackState=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"docStackState"),cl([vc.anno.decl.api()],t.prototype,"getDocStackState"),cl([vc.anno.decl.event()],t.prototype,"undo"),cl([vc.anno.decl.api()],t.prototype,"doUndo"),cl([vc.anno.decl.event()],t.prototype,"redo"),cl([vc.anno.decl.api()],t.prototype,"doRedo"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.confirm=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"confirm"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(Il||(Il={}));var yl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.open=function(e,t){return Object(vc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"whenSelected"),cl([vc.anno.decl.api()],t.prototype,"open"),cl([vc.anno.decl.api()],t.prototype,"close"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.success=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"success"),cl([vc.anno.decl.api()],t.prototype,"error"),cl([vc.anno.decl.api()],t.prototype,"info"),cl([vc.anno.decl.api()],t.prototype,"warn"),cl([vc.anno.decl.api()],t.prototype,"loading"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(yl||(yl={}));var Cl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.hideAllMenuItems=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),cl([vc.anno.decl.notify()],t.prototype,"showAllMenuItems"),cl([vc.anno.decl.notify()],t.prototype,"hidePanel"),cl([vc.anno.decl.notify()],t.prototype,"showPanel"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(Cl||(Cl={}));var El,Bl,vl,ml,Ql,bl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.currentMainView=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watchMainViewSense"),cl([vc.anno.decl.api()],t.prototype,"currentMainView"),cl([vc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelected=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelected"),cl([vc.anno.decl.api()],t.prototype,"unSelected"),cl([vc.anno.decl.api()],t.prototype,"select"),cl([vc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),cl([vc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(vc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(El||(El={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(Bl||(Bl={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(vl||(vl={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(ml||(ml={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(Ql||(Ql={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(bl||(bl={}));var _l,Sl,wl,Dl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.highlightCornerCut=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.updateStructuresMsg=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"highlightCornerCut"),cl([vc.anno.decl.api()],t.prototype,"getStructures"),cl([vc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),cl([vc.anno.decl.api()],t.prototype,"updateStructuresMsg"),cl([vc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),cl([vc.anno.decl.api()],t.prototype,"delOneStructureMsg"),cl([vc.anno.decl.api()],t.prototype,"onMiniAppOpen"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:el.PRIVATE})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),cl([vc.anno.decl.event()],t.prototype,"onRequestReceived"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedWalls=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelectedWalls"),cl([vc.anno.decl.api()],t.prototype,"unSelected"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(vc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(_l||(_l={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(Sl||(Sl={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(wl||(wl={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(Dl||(Dl={}));var Rl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),cl([vc.anno.decl.api()],t.prototype,"generatePartitionWalls"),cl([vc.anno.decl.api()],t.prototype,"editPartitionWalls"),cl([vc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),cl([vc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),cl([vc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.undo=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"undo"),cl([vc.anno.decl.api()],t.prototype,"redo"),cl([vc.anno.decl.api()],t.prototype,"clear"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.style="style",e.material="material"}(Rl||(Rl={}));var Ml;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedLConnectors=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),cl([vc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),cl([vc.anno.decl.api()],t.prototype,"unSelected"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedColumns=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelectedColumns"),cl([vc.anno.decl.api()],t.prototype,"unSelected"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(Ml||(Ml={}));var xl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),cl([vc.anno.decl.api()],t.prototype,"generateColumns"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(xl||(xl={}));var Pl,Tl,Fl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedRooms=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.event()],t.prototype,"watcherOpen"),cl([vc.anno.decl.api()],t.prototype,"getSelectedRooms"),cl([vc.anno.decl.api()],t.prototype,"clearSelectedRooms"),cl([vc.anno.decl.api()],t.prototype,"openSelectRoom"),cl([vc.anno.decl.api()],t.prototype,"setOpenLinePanel"),cl([vc.anno.decl.api()],t.prototype,"generateLineFormData"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:el.PRIVATE})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getDefaultParam=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getDefaultParam"),cl([vc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Al(t,e),t.prototype.getKeys=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getKeys"),cl([vc.anno.decl.api()],t.prototype,"getItem"),cl([vc.anno.decl.api()],t.prototype,"getItems"),cl([vc.anno.decl.api()],t.prototype,"setItem"),cl([vc.anno.decl.api()],t.prototype,"removeItem"),cl([vc.anno.decl.api()],t.prototype,"removeItems"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(vc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(vc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),cl([vc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(Pl||(Pl={})),function(e){e.TRUE="true",e.FALSE="false"}(Tl||(Tl={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Fl||(Fl={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getDesignRoomList=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getDesignRoomList"),cl([vc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(vc.ServService);var Ll,Ol,kl=function(e){return e&&"object"===mc(e)?e.toJSON():e},Nl=function(e){return e&&"object"===mc(e)?nl.deserialize(JSON.stringify(e)):e},Gl={onRetnTransform:{recv:Nl,send:kl}},Ul={onCallTransform:{recv:function(e){return ul(ul({},e),{models:e.models.map(Nl)})},send:function(e){return ul(ul({},e),{models:e.models.map(kl)})}}},jl=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.newParamModelByCategory=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api(Gl)],t.prototype,"newParamModelByCategory"),cl([vc.anno.decl.api(Gl)],t.prototype,"newParamModelByBrandGoodId"),cl([vc.anno.decl.api(Gl)],t.prototype,"getParamModelByModelId"),cl([vc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Nl)}:ul(ul({},e),{data:e.data.map(Nl)})},send:function(e){return Array.isArray(e)?e.map(Nl):ul(ul({},e),{data:e.data.map(Nl)})}}})],t.prototype,"listTopModels"),cl([vc.anno.decl.api(Ul)],t.prototype,"save"),cl([vc.anno.decl.api(Ul)],t.prototype,"remove"),t=cl([vc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getDesignJson=function(e){throw Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"getDesignJson"),t=cl([vc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(vc.ServService),function(e){return e&&"object"===mc(e)?ul(ul({},e),{parent:e.parent.toJSON()}):e}),Vl=function(e){return e&&"object"===mc(e)?ul(ul({},e),{parent:nl.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelected=function(){throw Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event({transform:{recv:Vl,send:jl}})],t.prototype,"selection"),cl([vc.anno.decl.api({onRetnTransform:{send:jl,recv:Vl}})],t.prototype,"getSelected"),t=cl([vc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.current=function(){throw Object(vc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(vc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"current"),cl([vc.anno.decl.api()],t.prototype,"enter"),cl([vc.anno.decl.api()],t.prototype,"exit"),t=cl([vc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(vc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Ll||(Ll={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(Ol||(Ol={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Yl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.createHandsFree=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"createHandsFree"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}(Yl||(Yl={}));var Hl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.createWineCell=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"createWineCell"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:el.PRIVATE})],t)}(vc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(Hl||(Hl={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.showModelByCateId=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"showModelByCateId"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.remove=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(vc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.api()],t.prototype,"remove"),cl([vc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),cl([vc.anno.decl.api()],t.prototype,"updateAttacheds"),cl([vc.anno.decl.api()],t.prototype,"updateAttachedsNew"),cl([vc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),cl([vc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(vc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Al(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(vc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(vc.API_UNSUPPORT)()},cl([vc.anno.decl.event()],t.prototype,"watcher"),cl([vc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),cl([vc.anno.decl.api()],t.prototype,"unSelected"),t=cl([vc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(vc.ServService);var Kl=r(208),ql=r.n(Kl),Jl=r(426),Wl=r.n(Jl),zl=r(529),Xl=r(424),Zl=r(425),$l=r.n(Zl);function eg(e){return(eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
121
|
+
var Al=function(e,t){return(Al=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function al(e,t){function r(){this.constructor=e}Al(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var sl,ul,cl=function(){return(cl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ll(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Qc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(sl||(sl={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(ul||(ul={}));var gl,fl,hl,pl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getAvailableMiniApp=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(gl||(gl={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(fl||(fl={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(hl||(hl={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(pl||(pl={}));var dl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.loadMode=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"loadMode"),ll([mc.anno.decl.api()],t.prototype,"isOpened"),ll([mc.anno.decl.api()],t.prototype,"close"),ll([mc.anno.decl.event()],t.prototype,"loaded"),ll([mc.anno.decl.api({ACL:tl.PROTECTED})],t.prototype,"bootstrap"),ll([mc.anno.decl.api({ACL:tl.PRIVATE})],t.prototype,"bootstrapDev"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(dl||(dl={}));var Il;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=ll([mc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignBaseInfo=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api({ACL:tl.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:tl.PROTECTED})],t)}(mc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(Il||(Il={}));var yl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDocStackState=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"docStackState"),ll([mc.anno.decl.api()],t.prototype,"getDocStackState"),ll([mc.anno.decl.event()],t.prototype,"undo"),ll([mc.anno.decl.api()],t.prototype,"doUndo"),ll([mc.anno.decl.event()],t.prototype,"redo"),ll([mc.anno.decl.api()],t.prototype,"doRedo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.confirm=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"confirm"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(yl||(yl={}));var Cl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.open=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"whenSelected"),ll([mc.anno.decl.api()],t.prototype,"open"),ll([mc.anno.decl.api()],t.prototype,"close"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.success=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"success"),ll([mc.anno.decl.api()],t.prototype,"error"),ll([mc.anno.decl.api()],t.prototype,"info"),ll([mc.anno.decl.api()],t.prototype,"warn"),ll([mc.anno.decl.api()],t.prototype,"loading"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(Cl||(Cl={}));var El;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.hideAllMenuItems=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),ll([mc.anno.decl.notify()],t.prototype,"showAllMenuItems"),ll([mc.anno.decl.notify()],t.prototype,"hidePanel"),ll([mc.anno.decl.notify()],t.prototype,"showPanel"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(El||(El={}));var Bl,vl,ml,Ql,bl,_l;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.currentMainView=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watchMainViewSense"),ll([mc.anno.decl.api()],t.prototype,"currentMainView"),ll([mc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelected=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelected"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),ll([mc.anno.decl.api()],t.prototype,"select"),ll([mc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),ll([mc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(mc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Bl||(Bl={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(vl||(vl={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(ml||(ml={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(Ql||(Ql={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(bl||(bl={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(_l||(_l={}));var Sl,wl,Dl,Rl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.highlightCornerCut=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateStructuresMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"highlightCornerCut"),ll([mc.anno.decl.api()],t.prototype,"getStructures"),ll([mc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),ll([mc.anno.decl.api()],t.prototype,"updateStructuresMsg"),ll([mc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),ll([mc.anno.decl.api()],t.prototype,"delOneStructureMsg"),ll([mc.anno.decl.api()],t.prototype,"onMiniAppOpen"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:tl.PRIVATE})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),ll([mc.anno.decl.event()],t.prototype,"onRequestReceived"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedWalls=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedWalls"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(mc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(Sl||(Sl={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(wl||(wl={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(Dl||(Dl={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(Rl||(Rl={}));var Ml;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"generatePartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"editPartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),ll([mc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),ll([mc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.undo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"undo"),ll([mc.anno.decl.api()],t.prototype,"redo"),ll([mc.anno.decl.api()],t.prototype,"clear"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.style="style",e.material="material"}(Ml||(Ml={}));var xl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedLConnectors=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),ll([mc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedColumns=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedColumns"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(xl||(xl={}));var Pl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),ll([mc.anno.decl.api()],t.prototype,"generateColumns"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(Pl||(Pl={}));var Tl,Fl,Ll;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedRooms=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.event()],t.prototype,"watcherOpen"),ll([mc.anno.decl.api()],t.prototype,"getSelectedRooms"),ll([mc.anno.decl.api()],t.prototype,"clearSelectedRooms"),ll([mc.anno.decl.api()],t.prototype,"openSelectRoom"),ll([mc.anno.decl.api()],t.prototype,"setOpenLinePanel"),ll([mc.anno.decl.api()],t.prototype,"generateLineFormData"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:tl.PRIVATE})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDefaultParam=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDefaultParam"),ll([mc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return al(t,e),t.prototype.getKeys=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getKeys"),ll([mc.anno.decl.api()],t.prototype,"getItem"),ll([mc.anno.decl.api()],t.prototype,"getItems"),ll([mc.anno.decl.api()],t.prototype,"setItem"),ll([mc.anno.decl.api()],t.prototype,"removeItem"),ll([mc.anno.decl.api()],t.prototype,"removeItems"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(mc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),ll([mc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(Tl||(Tl={})),function(e){e.TRUE="true",e.FALSE="false"}(Fl||(Fl={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Ll||(Ll={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignRoomList=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDesignRoomList"),ll([mc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(mc.ServService);var Ol,kl,Nl=function(e){return e&&"object"===Qc(e)?e.toJSON():e},Gl=function(e){return e&&"object"===Qc(e)?il.deserialize(JSON.stringify(e)):e},Ul={onRetnTransform:{recv:Gl,send:Nl}},jl={onCallTransform:{recv:function(e){return cl(cl({},e),{models:e.models.map(Gl)})},send:function(e){return cl(cl({},e),{models:e.models.map(Nl)})}}},Vl=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.newParamModelByCategory=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api(Ul)],t.prototype,"newParamModelByCategory"),ll([mc.anno.decl.api(Ul)],t.prototype,"newParamModelByBrandGoodId"),ll([mc.anno.decl.api(Ul)],t.prototype,"getParamModelByModelId"),ll([mc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Gl)}:cl(cl({},e),{data:e.data.map(Gl)})},send:function(e){return Array.isArray(e)?e.map(Gl):cl(cl({},e),{data:e.data.map(Gl)})}}})],t.prototype,"listTopModels"),ll([mc.anno.decl.api(jl)],t.prototype,"save"),ll([mc.anno.decl.api(jl)],t.prototype,"remove"),t=ll([mc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignJson=function(e){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDesignJson"),t=ll([mc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(mc.ServService),function(e){return e&&"object"===Qc(e)?cl(cl({},e),{parent:e.parent.toJSON()}):e}),Yl=function(e){return e&&"object"===Qc(e)?cl(cl({},e),{parent:il.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelected=function(){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event({transform:{recv:Yl,send:Vl}})],t.prototype,"selection"),ll([mc.anno.decl.api({onRetnTransform:{send:Vl,recv:Yl}})],t.prototype,"getSelected"),t=ll([mc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.current=function(){throw Object(mc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(mc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"current"),ll([mc.anno.decl.api()],t.prototype,"enter"),ll([mc.anno.decl.api()],t.prototype,"exit"),t=ll([mc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Ol||(Ol={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(kl||(kl={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Hl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.createHandsFree=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"createHandsFree"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}(Hl||(Hl={}));var Kl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.createWineCell=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"createWineCell"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(Kl||(Kl={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.showModelByCateId=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"showModelByCateId"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.remove=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"remove"),ll([mc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),ll([mc.anno.decl.api()],t.prototype,"updateAttacheds"),ll([mc.anno.decl.api()],t.prototype,"updateAttachedsNew"),ll([mc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),ll([mc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(mc.ServService);var ql=r(208),Jl=r.n(ql),Wl=r(426),zl=r.n(Wl),Xl=r(529),Zl=r(424),$l=r(425),eg=r.n($l);function tg(e){return(tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
122
122
|
/*!
|
|
123
123
|
* @qunhe/custom-miniapp-api-core v0.2.4
|
|
124
124
|
* (c) 2022
|
|
@@ -137,7 +137,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
137
137
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
138
138
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
139
139
|
PERFORMANCE OF THIS SOFTWARE.
|
|
140
|
-
***************************************************************************** */var
|
|
140
|
+
***************************************************************************** */var rg=function(e,t){return(rg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function ng(e,t){function r(){this.constructor=e}rg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function ig(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}var og,Ag=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ng(t,e),t.prototype.request=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"request",null),ig([mc.anno.decl.api()],t.prototype,"get",null),ig([mc.anno.decl.api()],t.prototype,"delete",null),ig([mc.anno.decl.api()],t.prototype,"post",null),ig([mc.anno.decl.api()],t.prototype,"put",null),ig([mc.anno.decl.api()],t.prototype,"encryptedRequest",null),ig([mc.anno.decl.api()],t.prototype,"encryptedGet",null),ig([mc.anno.decl.api()],t.prototype,"encryptedDelete",null),ig([mc.anno.decl.api()],t.prototype,"encryptedPost",null),ig([mc.anno.decl.api()],t.prototype,"encryptedPut",null),ig([mc.anno.decl.api()],t.prototype,"gzipRequest",null),ig([mc.anno.decl.api()],t.prototype,"gzipGet",null),ig([mc.anno.decl.api()],t.prototype,"gzipPost",null),ig([mc.anno.decl.api()],t.prototype,"gzipPut",null),ig([mc.anno.decl.api()],t.prototype,"pbGzipGet",null),ig([mc.anno.decl.api()],t.prototype,"pbGzipPost",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService),ag=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ng(t,e),t.prototype.getAllAvailableService=function(){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ng(t,e),t.prototype.lockModelBySplit=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"lockModelBySplit",null),ig([mc.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService)),sg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ng(t,e),t.prototype.getIntersectedById=function(e){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"getIntersectedById",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.model.intersected",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ng(t,e),t.prototype.getPackageInfo=function(){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.event()],t.prototype,"onRequestReceived",void 0),ig([mc.anno.decl.api()],t.prototype,"getPackageInfo",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:tl.PRIVATE})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ng(t,e),t.prototype.getFitRule=function(e){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),ig([mc.anno.decl.api()],t.prototype,"getFitRule",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ng(t,e),t.prototype.getSwitchInfo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getSaasConfig=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getKMSConfig=function(){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"getSwitchInfo",null),ig([mc.anno.decl.api()],t.prototype,"getSaasConfig",null),ig([mc.anno.decl.api()],t.prototype,"getKMSConfig",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.service.ConfigInfo",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error"}(og||(og={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ng(t,e),t.prototype.getInternalLog=function(e){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"getInternalLog",null),ig([mc.anno.decl.event()],t.prototype,"floorLevelInfo",void 0),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.local.log",version:"1.0.0"})],t)}(mc.ServService);var ug=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ng(t,e),t.prototype.logApiCalledInfo=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.logApiError=function(e,t){return Object(mc.API_UNSUPPORT)()},ig([mc.anno.decl.api()],t.prototype,"logApiCalledInfo",null),ig([mc.anno.decl.api()],t.prototype,"logApiError",null),t=ig([mc.anno.decl({id:"com.custom.miniapp.inner.service.track.log",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService);function cg(e){return(cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
141
141
|
/*!
|
|
142
142
|
* @qunhe/custom-miniapp-sdk v0.21.4
|
|
143
143
|
* (c) 2022
|
|
@@ -156,4 +156,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
156
156
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
157
157
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
158
158
|
PERFORMANCE OF THIS SOFTWARE.
|
|
159
|
-
***************************************************************************** */var cg,lg=function(e,t){return(lg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function gg(e,t){function r(){this.constructor=e}lg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function fg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ug(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function hg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function pg(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hg(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(cg||(cg={}));var dg,Ig,yg,Cg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gg(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(vc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(vc.API_UNSUPPORT)()},fg([vc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),fg([vc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=fg([vc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:el.INNER})],t)}(vc.ServService),Eg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gg(t,e),t.prototype.toJSON=function(){return{paramPackages:pg(this.paramPackages.values()),hardwares:pg(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=hg(e,2);t[0];var r=t[1],n=new Wl.a;return Object(Dt.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:pg(this.displayInfos.values()),wireFrames:Object(Dt.fromPairs)(pg(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(Dt.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new Wl.a;if(Object(Dt.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new $l.a,n=new Wr.a;return Object(Dt.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Object(zl.toPopBufferMtl)(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Xl.FurnitureModel;Object(Dt.extend)(r,t.furnitureModel),r.size=new Fe.a(r.size),r.position=new Fe.a(r.position),r.rotate=new Fe.a(r.rotate),r.scale=new Fe.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(Dt.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(ql.a);!function(e){e[e.willExit=0]="willExit"}(dg||(dg={})),function(e){e[e.exit=0]="exit"}(Ig||(Ig={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(yg||(yg={}));var Bg=r(245),vg=r.n(Bg),mg=r(287),Qg=r.n(mg),bg=r(1121),_g=r.n(bg),Sg=r(357),wg=r.n(Sg),Dg=r(717),Rg=r.n(Dg),Mg=r(1122),xg=r.n(Mg),Pg=r(723),Tg=r.n(Pg),Fg=r(724),Lg=r.n(Fg),Og=r(207),kg=r.n(Og),Ng=r(112),Gg=r.n(Ng),Ug=r(187),jg=r.n(Ug),Vg=r(528),Yg=r.n(Vg),Hg=r(1123),Kg=r.n(Hg),qg=r(722),Jg=r.n(qg),Wg=r(721),zg=r.n(Wg),Xg=r(358),Zg=r.n(Xg),$g=r(242),ef=r.n($g),tf=r(728),rf=r.n(tf),nf=r(716),of=r.n(nf),Af=r(1124),af=r.n(Af),sf=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Xn.a,Nn.a,wg.a,Se.a,Rg.a,De.a,xg.a,kg.a,Gg.a,jg.a,Yg.a,Me.a,Un.a,Vn.a,Hn.a,Kg.a,Jg.a,zg.a,Pe.a,Zg.a,ef.a,rf.a,tf.LineIndex,qn.a,of.a,af.a,Cr.a,Fe.a,ArrayBuffer,RA.Vector3,Qg.a,_g.a,Es.ParamStore,Tg.a,Lg.a,$l.a,Wr.a,Xl.FurnitureModel,Map,RA.SkyBackground]:[];Object(Bg.inject)({isKnownImmutableInstance:function(e){return sf.some((function(t){return e instanceof t}))}});vg.a;var uf=r(211);function cf(e){return(cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ff(e,t){return(ff=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=df(e);if(t){var i=df(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pf(this,r)}}function pf(e,t){return!t||"object"!==cf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var If,yf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ff(e,t)}(o,e);var t,r,n,i=hf(o);function o(){var e;return lf(this,o),(e=i.apply(this,arguments)).rootState=new Bu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new hc(this,this.rootState);e.init(),e.run()}}])&&gf(t.prototype,r),n&&gf(t,n),o}(uf.BasePlugin);yf.dependencies=[Ei.AppServicePlugin];var Cf,Ef,Bf,vf=function(e){if(!If)throw new Error("please new Application before call method");return If.getCustomMiniAppService(e)},mf=r(249),Qf=r(108),bf=r(429);function _f(e){Bf=e}function Sf(e){return(Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wf(e){return function(e){if(Array.isArray(e))return Df(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Df(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Df(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Df(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Rf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mf(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function xf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Mf(o,n,i,A,a,"next",e)}function a(e){Mf(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Pf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ff(e,t){return(Ff=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=kf(e);if(t){var i=kf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Of(this,r)}}function Of(e,t){return!t||"object"!==Sf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kf(e){return(kf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ff(e,t)}(o,e);var t,r,n,i=Lf(o);function o(){var e;return Pf(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=xf(a.a.mark((function t(){var r,n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=vf(mf.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=xf(a.a.mark((function t(r){var n,i,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Dt.castArray)(r),o=Object(Dt.difference)(i,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=i,!o.length&&n){t.next=12;break}return t.next=9,WB(r);case 9:n=t.sent,t.next=13;break;case 12:return t.abrupt("return",n);case 13:return e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=xf(a.a.mark((function t(r){var n,i,o,A,s,u,c,l,g,f,h,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(Dt.uniq)(Object(Dt.flatten)(Object(Dt.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(Dt.map)(n,function(){var e=xf(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rv(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return s=t.sent,t.next=11,nv(n);case 11:for(p in u=t.sent,c=Object(Dt.mapValues)(Object(Dt.keyBy)(Object(Dt.filter)(s,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new Me.a).makeTranslation(new Fe.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(Dt.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=Rf(t,["paramModelData"]),A=e.rotate,a=(new dt).parse(i);Object(Qf.attach)(a,Object(Qf.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new Me.a).compose(new Fe.a(e.position),new De.a(A.x,A.y,A.z),new Fe.a(e.scale)).multiply((new Me.a).setPosition(new Fe.a(r)))),g=On.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new Fe.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,wf(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Cf.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Tf(t.prototype,r),n&&Tf(t,n),o}(Ci.AXR);function Gf(e){return(Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Uf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vf(e,t){return(Vf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Kf(e);if(t){var i=Kf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hf(this,r)}}function Hf(e,t){return!t||"object"!==Gf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kf(e){return(Kf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qf,Jf,Wf,zf,Xf,Zf,$f,eh,th=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vf(e,t)}(o,e);var t,r,n,i=Yf(o);function o(){var e;return Uf(this,o),(e=i.apply(this,arguments)).paramModelConstructor=dt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new bt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&jf(t.prototype,r),n&&jf(t,n),o}(Eg),rh=r(75),nh=Symbol("fitting-data"),ih=Symbol("groove-fitting-entity"),oh=Symbol("intersect-data"),Ah=Symbol("param-model-hint-entity"),ah=Symbol("fitting-hint-entity"),sh=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(qf||(qf={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(Jf||(Jf={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Wf||(Wf={})),function(e){e.SCENE_ID="cp"}(zf||(zf={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Xf||(Xf={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Zf||(Zf={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}($f||($f={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(eh||(eh={}));var uh,ch=[];function lh(e){return(lh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gh(e){return function(e){if(Array.isArray(e))return fh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ph(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){hh(o,n,i,A,a,"next",e)}function a(e){hh(o,n,i,A,a,"throw",e)}A(void 0)}))}}function dh(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ih(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ch(e,t){return(Ch=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vh(e);if(t){var i=vh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Bh(this,r)}}function Bh(e,t){return!t||"object"!==lh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vh(e){return(vh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(uh||(uh={}));var mh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ch(e,t)}(o,e);var t,r,n,i=Eh(o);function o(){var e;return Ih(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:Jf.READY,design:Jf.READY,series:Jf.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(a.a.mark((function e(t,r){var n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ef.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=dh(n,["paramModelData"]),A=(new dt).parse(i),Object(Qf.attach)(A,Object(Qf.toAttachedMap)(o)),e.next=9,Cf.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(ch),e.next=13,Object(rh.put)(this.$actionLoad.done.message({params:t,result:Jf.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(a.a.mark((function e(t,r){var n,i,o,A,s,u;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=ph(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ef.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Qf.attach)(t,Object(Qf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),s=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(gh(s),gh(A)),e.next=12,Cf.updateAttacheds(u);case 12:return e.next=14,Object(rh.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:Jf.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(a.a.mark((function e(t,r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=dh(e,["paramModelData"]),n=(new dt).parse(t,new th);return Object(Qf.attach)(n,Object(Qf.toAttachedMap)(r)),n})),e.next=3,Cf.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,gh(i)),e.next=6,Object(rh.put)(this.$actionAddParamModelToSense.done.message({params:t,result:Jf.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(a.a.mark((function e(t,r){var n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new th,o=t.map((function(e){return(new bt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=ph(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ef.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Qf.attach)(t,Object(Qf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Cf.updateAttacheds(gh(o));case 8:return n.addParamModelAssemblies.apply(n,gh(o)),n.addParamModels.apply(n,gh(A)),e.next=12,Object(rh.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:Jf.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&yh(t.prototype,r),n&&yh(t,n),o}(Ci.AXR);function Qh(e){return(Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sh(e,t)}function Sh(e,t){return(Sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Rh(e);if(t){var i=Rh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dh(this,r)}}function Dh(e,t){return!t||"object"!==Qh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rh(e){return(Rh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ci.AXR;var Mh=function(e){_h(r,e);var t=wh(r);function r(){return bh(this,r),t.apply(this,arguments)}return r}(Ci.AXRPartial),xh=(Ci.AXRManager,Math.sqrt(2)),Ph=Math.PI/6,Th=Math.PI/3+Math.PI;function Fh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Th,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ph,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*xh,a=new Fe.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var Lh;function Oh(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function kh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kh(Object(r),!0).forEach((function(t){Gh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Gh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uh(e){var t=e.elements;return(new MA.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e,t){var r,n=e.getSize(),i=(new Me.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(Uh(i)),A=o.x,a=o.y,s=o.z,u=(jh(r={},Lh.TOP,Math.abs(s-n.z/2)),jh(r,Lh.LEFT,Math.abs(A+n.x/2)),jh(r,Lh.BACK,Math.abs(a+n.y/2)),jh(r,Lh.RIGHT,Math.abs(A-n.x/2)),jh(r,Lh.FRONT,Math.abs(a-n.y/2)),jh(r,Lh.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:Lh.UNKNOWN}function Yh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(Lh||(Lh={}));var Hh=function(){var e,t=(e=a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l,g,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hy(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,s={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?s.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(s.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:s.modelid);case 11:return g=e.sent,f=g.toolType,s.toolType=f,e.abrupt("return",s);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Yh(o,n,i,A,a,"next",e)}function a(e){Yh(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Kh=r(243);function qh(e){return function(e){if(Array.isArray(e))return Jh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Jh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wh(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new th;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=qh(r.getParamModels())).concat.apply(t,qh(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(Dt.uniqBy)(Kh.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function zh(e){return(zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Zh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Xh(o,n,i,A,a,"next",e)}function a(e){Xh(o,n,i,A,a,"throw",e)}A(void 0)}))}}function $h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ep(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tp(e,t){return(tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ip(e);if(t){var i=ip(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return np(this,r)}}function np(e,t){return!t||"object"!==zh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ip(e){return(ip=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function op(e){return function(e){if(Array.isArray(e))return Ap(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ap(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ap(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ap(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ap(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?ap(e.subModels):[]})).flat();return t.push.apply(t,op(e)),t}var sp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tp(e,t)}(g,e);var t,r,n,i,o,A,s,u,c,l=rp(g);function g(){var e;return $h(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:qf.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l,g,f,h,p,d,I,y;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,s=void 0!==A&&A,u=t.templateId,c=this.state.state,l=c.currModelId,g=c.result,f=c.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(h=r===l,p=f===u,d=this.$actionLoadParamModelJsonData,e.prev=7,I=h&&!s&&p?g:void 0,!o||I){e.next=13;break}return e.next=12,zB(r,u);case 12:I=e.sent;case 13:if(I){e.next=18;break}return NB.delete(r),e.next=17,XB(r,u);case 17:I=e.sent;case 18:if(I){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return y=h&&!u?ap(I.paramModel):this.state.state.allSubModels,h&&hy().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,d.done.dispatch({params:t,result:{ossContent:I,allSubModels:y}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,d.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=qf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=qf.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=qf.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=Zh(a.a.mark((function e(t){var r,n,i,o,A,s,u,c=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Dt.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=hy().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(Ld).fittingDesignSense).initFittingDesign(),function(){var e=Zh(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Oh(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(Nf).getCurrentCustomData(r);case 12:return o=e.sent,A=new th,o.context&&A.unSerialize(o.context),s=Wh(o,A),(u=new Ve).addParamModels.apply(u,op(s.paramModels)),u.addParamModelAssemblies.apply(u,op(s.paramModelAssemblies)),e.next=21,this.getAxr(mh).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Zh(a.a.mark((function e(){var t,r,n,i,o,A,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,WB(this.state.state.currModelId);case 9:return o=e.sent,A=new th,o.context&&A.unSerialize(o.context),s=Wh(o,A),t.addParamModels.apply(t,op(s.paramModels)),t.addParamModelAssemblies.apply(t,op(s.paramModelAssemblies)),e.next=17,this.getAxr(mh).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(s=Zh(a.a.mark((function e(){var t,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=vf(mf.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(Dt.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=Zh(a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l,g,f,h;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,s=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=Oh(),this.getAxr(Ld).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:s}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=Oh(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:s,hasFitting:!!g,force:c,templateId:l}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===Fn.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,op(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=Zh(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=vf(Cg),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=Zh(a.a.mark((function e(t){var r,n,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Dt.castArray)(t),n=vf(mf.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([])}}])&&ep(t.prototype,r),n&&ep(t,n),g}(Ci.AXR);function up(e){return(up="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cp(Object(r),!0).forEach((function(t){gp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fp(e){return function(e){if(Array.isArray(e))return hp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function dp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){pp(o,n,i,A,a,"next",e)}function a(e){pp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Ip(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Cp(e,t,r){return(Cp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mp(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Ep(e,t){return(Ep=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mp(e);if(t){var i=mp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vp(this,r)}}function vp(e,t){return!t||"object"!==up(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mp(e){return(mp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qp={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},bp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ep(e,t)}(o,e);var t,r,n,i=Bp(o);function o(){var e;return Ip(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:qf.FAIL,design:Object(Dt.cloneDeep)(Qp)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t,r){var n,i,o,A,s,u,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(mh);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(rh.take)([i,o]);case 6:A=r.core,s=A.fittingDesign,u=A.design,s.setFittings([]),s.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(Nf).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(Dt.cloneDeep)(Qp))},e.getConnectedFittingDesign=function(){var t=dp(a.a.mark((function t(r){var n,i,o,A,s,u,c,l,g,f,h=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(Dt.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=a.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(Dt.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,s=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(s&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=s.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(Dt.filter)(i.holes[u],f),o.grooves[u]=Object(Dt.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Dt.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Dt.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(t){var r=e.stateManager.core,n=r.fittingDesign,i=r.pad,o=hy().fittingDesign.senseSetting.getSenseSettings(),A=Object(Dt.pick)(o,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),a=t.holes,s=void 0===a?{}:a,c=t.grooves,l=void 0===c?{}:c,g=t.hardwareGrooves,f=void 0===g?{}:g,h={findRelativeModel:i.findModelOrAssemblyModelById,transformModel:xn};n.addFittings([].concat(fp(Ec(s,lp(lp({},h),{},{type:u.HOLE,defaultConfig:A}))),fp(Ec(l,lp(lp({},h),{},{type:u.GROOVE,defaultConfig:A}))))),n.addGrooveFittings(Ec(f,lp(lp({},h),{},{type:u.HARDWARE_GROOVE,transformModel:yi,defaultConfig:A})))},e.appendFittingDataToFittingDesign=function(){var t=dp(a.a.mark((function t(r,n){var i,o,A,s,u,c,l,g,f,h,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,s=o.autoSave,u=!r.id||r.id===A.id,c=Qp,l=n.timeout,g=n.save,f=void 0===g?s:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:lp(lp({},u?A.holes:c.holes),r.holes||{}),grooves:lp(lp({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:lp(lp({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:lp(lp({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Dt.pull)(Object(Dt.keys)(h),"id").forEach((function(e){var t=h[e];Object(Dt.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=Oh(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(a.a.mark((function e(t,r){var n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,Hh(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,UB(lp(lp({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(Dt.cloneDeep)(Qp),i=this.getAxr(sp).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(sp).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(a.a.mark((function e(t,r){var n,i,o,A,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(sp).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,Hh(o);case 4:return A=e.sent,s=this.$actionClearFittingDesign,e.prev=6,e.next=9,KB(A);case 9:s.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),s.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(a.a.mark((function e(t,r){var n,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(sp).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(a.a.mark((function e(t){var r,n,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,Hh(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,HB(lp(lp({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("save failed!"));case 2:case"end":return e.stop()}}),e)}))),e.done.every(a.a.mark((function e(t,r){var n,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(sp).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Cp(mp(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&yp(t.prototype,r),n&&yp(t,n),o}(Mh);function _p(e){return(_p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dp(e,t){return(Dp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xp(e);if(t){var i=xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mp(this,r)}}function Mp(e,t){return!t||"object"!==_p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xp(e){return(xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dp(e,t)}(o,e);var t,r,n,i=Rp(o);function o(){var e;return Sp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(Dt.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(Dt.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new ir({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&wp(t.prototype,r),n&&wp(t,n),o}(Mh);function Tp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Fp=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&Tp(t.prototype,r),n&&Tp(t,n),e}();function Lp(e){var t,r=new Fp;if(r.id=e.id,e instanceof dt){if(!e.isAppendHardware)return;t=u.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function Op(e){return(Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kp(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Gp(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Np(e){return function(e){if(Array.isArray(e))return Up(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Gp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gp(e,t){if(e){if("string"==typeof e)return Up(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Up(e,t):void 0}}function Up(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yp(e,t){return(Yp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qp(e);if(t){var i=qp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kp(this,r)}}function Kp(e,t){return!t||"object"!==Op(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qp(e){return(qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yp(e,t)}(o,e);var t,r,n,i=Hp(o);function o(){return jp(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,Np((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(Np(o),Np(A),Np(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return Lp(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=kp(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,Np(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=kp(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===u.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),RB().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===u.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==u.HOLE&&e.modelType!==u.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&Vp(t.prototype,r),n&&Vp(t,n),o}(Mh);function Wp(e){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Xp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xp(Object(r),!0).forEach((function(t){$p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ed(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function td(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nd(e,t){return(nd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function id(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ad(e);if(t){var i=Ad(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return od(this,r)}}function od(e,t){return!t||"object"!==Wp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ad(e){return(Ad=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ad=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nd(e,t)}(s,e);var t,r,n,i,o,A=id(s);function s(){var e;return td(this,s),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:qf.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(a.a.mark((function e(t,r){var n,i,o,A,s,u,c,l,g;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hh(t.modelId);case 2:return n=e.sent,i=vf(ag),o=t.modelId,A=void 0===o?n.modelid:o,s=t.defer,u=ed(t,["modelId","defer"]),c=hy().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(Zp({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:s&&s.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:s&&s.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=hy().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=qf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=qf.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=qf.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,g=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var h=t.option,p=void 0===h?{}:h,d=t.intersectedGroups,I=Object(Dt.map)(d,(function(e){var t=!0===p.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==p.plankFaceIds&&!p.plankFaceIds.includes(r.plankFaceId))return!1;var A=o.findModelOrAssemblyModelById(r.linkedModelId);if(A){var a=oi(e,r,A),h=i===l.BOTH_PLANK?n===c.FACE?s:u:n===c.FACE?g:f;return a.setViewColor(h),a}})).filter((function(e){return!!e}));i.setIntersects(I),A||r.kaf.invisibleManager.hide("scene3d",oh,I.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",oh,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",oh,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(Zp(Zp({},r),{},{option:t}))},e}return t=s,(r=[{key:"getParamModelIntersectedData",value:(i=a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l,g=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hy().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,s=void 0===A?r:A,u=ed(n,["timeout","modelId"]),c=Oh(o),this.$actionLoadParamModelIntersectedData.started.dispatch(Zp(Zp({modelId:s},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){zp(o,r,n,A,a,"next",e)}function a(e){zp(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&rd(t.prototype,r),n&&rd(t,n),s}(Mh);function sd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ud(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sd(Object(r),!0).forEach((function(t){cd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ld(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return ud(ud({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function gd(e){return(gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pd(e,t){return(pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yd(e);if(t){var i=yd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Id(this,r)}}function Id(e,t){return!t||"object"!==gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yd(e){return(yd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cd={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},Ed=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pd(e,t)}(o,e);var t,r,n,i=dd(o);function o(){var e;return fd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:Cd}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(Dt.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(Dt.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Dt.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(Dt.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(Dt.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(Dt.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=wn(e.plankFaceId,Fe.a).mul(.1),r=ld(e.plankFaceId,n).map((function(e){var r=new Fe.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return ud(ud({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new yn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&hd(t.prototype,r),n&&hd(t,n),o}(Mh);function Bd(e){return(Bd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qd(e,t){return(Qd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sd(e);if(t){var i=Sd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _d(this,r)}}function _d(e,t){return!t||"object"!==Bd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sd(e){return(Sd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qd(e,t)}(o,e);var t,r,n,i=bd(o);function o(){var e;return vd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:ve,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(Dt.castArray)(t.renderIgnoreCategory)),Object(Dt.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&md(t.prototype,r),n&&md(t,n),o}(Mh);function Dd(e){return(Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fd(e);if(t){var i=Fd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(e,t){return!t||"object"!==Dd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fd(e){return(Fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ld=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xd(e,t)}(o,e);var t,r,n,i=Pd(o);function o(){var e;return Rd(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(bp),e.intersected=e.partialCreator.create(ad),e.senseSetting=e.partialCreator.create(wd),e.fittingModel=e.partialCreator.create(Jp),e.plankFaceHint=e.partialCreator.create(Ed),e.fittingHint=e.partialCreator.create(Pp),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Md(t.prototype,r),n&&Md(t,n),o}(Ci.AXR),Od=r(715),kd=r.n(Od);function Nd(e){return(Nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ud(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jd(e,t){return(jd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Hd(e);if(t){var i=Hd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yd(this,r)}}function Yd(e,t){return!t||"object"!==Nd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hd(e){return(Hd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jd(e,t)}(o,e);var t,r,n,i=Vd(o);function o(){return Gd(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:C.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Ud(t.prototype,r),n&&Ud(t,n),o}(ie);function qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(r),!0).forEach((function(t){Wd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zd={x:0,y:0,z:0},Xd={x:0,y:0,z:0};function Zd(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new Kd,a=!(e instanceof dt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof dt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=v.ASSEMBLY;if(u?c=v.COMMON:e.isTemplateAssembly()&&(c=v.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?zd:s.getPosition(),A.rotation=A.isRoot?Xd:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=eI(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Zd(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Zd(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function $d(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?Jd({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===C.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();hy().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===C.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[Fn.ParamType.MATERIAL,Fn.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===B.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==W.SENSE)&&(s=s.clone(!1)),o===B.CHILD?(s.setIsAppend(!0),s.setAppendType(kd.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,Jd(Jd({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==W.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===B.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,Jd(Jd({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(B.CHILD)),t.getAccessory().forEach(l(B.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function eI(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new z;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[m.MATERIAL,m.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var tI=r(125),rI=r.n(tI),nI={maxAge:6e5,max:20},iI=(eh.SHADING,eh.OUTLINE_WITH_SHADING,eh.TRANSLUCENT,eh.OUTLINE_AND_TRANSLUCENT,[Le.ParamModelType.PARAM_ENTITY,Le.ParamModelType.PARAM_FURNITURE,Le.ParamModelType.PARAM_PRIMITIVE]);function oI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function AI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oI(Object(r),!0).forEach((function(t){aI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function aI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function uI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){sI(o,n,i,A,a,"next",e)}function a(e){sI(o,n,i,A,a,"throw",e)}A(void 0)}))}}rI()(function(){var e=uI(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=rc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),AI({promise:!0},nI));function cI(){return(cI=uI(a.a.mark((function e(t){var r,n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lI(){return(lI=uI(a.a.mark((function e(t){var r,n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gI=rI()((function(e){return cI.apply(this,arguments)}),AI(AI({},nI),{},{promise:!0})),fI=rI()((function(e){return lI.apply(this,arguments)}),AI(AI({},nI),{},{promise:!0}));function hI(e){return function(e){if(Array.isArray(e))return pI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function II(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var yI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=a.a.mark((function e(t){var r,n,i,o,A,s,u=this,c=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Dt.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),s=function(e){return[].concat(hI(e.hardwares||[]),hI(e.textures||[]),hI(e.virtualModels||[]),hI(e.paramModelProducts||[]),hI(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,gI(i).then(s);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,fI(o).then(s);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){dI(o,r,n,A,a,"next",e)}function a(e){dI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&II(t.prototype,r),n&&II(t,n),e}();function CI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function EI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){CI(o,n,i,A,a,"next",e)}function a(e){CI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function BI(e){return function(e){if(Array.isArray(e))return vI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return vI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var bI=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new yI;mI(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,BI(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case W.BRANDGOOD:case W.CATEGORY:break;case W.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,BI(i.getChildNodes()))}}},{key:"attach",value:(i=EI(a.a.mark((function e(){var t,r,n,i,o,A,s,u,c=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,s=o._origin,e.t0=s,e.next=e.t0===W.SENSE?8:e.t0===W.CATEGORY||e.t0===W.BRANDGOOD||e.t0===W.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===C.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[m.MATERIAL,m.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,BI(i.getChild()).concat(BI(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(BI(Object(Dt.uniq)(r.modelIds).map(function(){var e=EI(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&QI(t.prototype,r),n&&QI(t,n),e}(),_I=r(729);function SI(e){return(SI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RI(e,t,r){return(RI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=TI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function MI(e,t){return(MI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=TI(e);if(t){var i=TI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return PI(this,r)}}function PI(e,t){return!t||"object"!==SI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function TI(e){return(TI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var FI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&MI(e,t)}(o,e);var t,r,n,i=xI(o);function o(){var e;return wI(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(mh),e.next=3,Object(rh.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==Jf.SUCCESS){e.next=13;break}return e.next=6,Object(rh.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(rh.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(rh.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t,r){var n,i,o,A,s,u;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),s=i.length?Object(_I.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(_I.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=Fh(s),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){RI(TI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&DI(t.prototype,r),n&&DI(t,n),o}(Mh);function LI(e){return(LI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=NI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function kI(e){return function(e){if(Array.isArray(e))return GI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||NI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NI(e,t){if(e){if("string"==typeof e)return GI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GI(e,t):void 0}}function GI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function jI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){UI(o,n,i,A,a,"next",e)}function a(e){UI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function VI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HI(e,t,r){return(HI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=WI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function KI(e,t){return(KI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=WI(e);if(t){var i=WI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JI(this,r)}}function JI(e,t){return!t||"object"!==LI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WI(e){return(WI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KI(e,t)}(u,e);var t,r,n,i,o,A,s=qI(u);function u(){var e;return VI(this,u),(e=s.apply(this,arguments)).cameraController=e.partialCreator.create(FI),e.state=e.stateCreator.create({renderMode:RA.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t,r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=RA.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===eh.SHADING?5:e.t0===eh.OUTLINE_WITH_SHADING?7:e.t0===eh.TRANSLUCENT?9:e.t0===eh.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=RA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=RA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=RA.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(rh.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:RB().viewer.toggleShowModelOutline(n===RA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),RB().viewer.triggerReducer(),this.emit(Zf.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?RA.RenderMode.OUTLINE_WITH_SHADING:RA.RenderMode.SHADING,e.next=3,Object(rh.put)(this.$actionMergeState.message({renderMode:n}));case 3:RB().viewer.toggleShowModelOutline(n===RA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(Zf.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(rh.put)(this.$actionMergeState.message({translucent:t}));case 2:RB().viewer.triggerReducer(),this.emit(Zf.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(rh.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;HI(WI(u.prototype),"init",this).call(this),RB().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?$f.translucentModel:$f.opaqueModel})),RB().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=jI(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Zd(e,{origin:W.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=jI(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",Zd(r,{origin:W.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=jI(a.a.mark((function e(t){var r,n,i,o,A,s,u,c,l;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new bI(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,kI(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return $d(e,i)})));case 8:o=e.sent,A=[],s=[],u=OI(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&s.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||s.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),RB().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&YI(t.prototype,r),n&&YI(t,n),u}(Ci.AXR);function XI(e){return(XI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ZI(Object(r),!0).forEach((function(t){ey(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ty(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ry(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ry(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ny(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oy(e,t,r){return(oy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=uy(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Ay(e,t){return(Ay=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ay(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=uy(e);if(t){var i=uy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sy(this,r)}}function sy(e,t){return!t||"object"!==XI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uy(e){return(uy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cy={rawSelected:[],selectedData:[],selectedDataV2:[]},ly=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},gy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ay(e,t)}(o,e);var t,r,n,i=ay(o);function o(){var e;return ny(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(cy).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(Dt.unzip)([t,r]).every((function(e){var t=ty(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return $I($I({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case uA:return r.findModelEx(e.entityId,uu);case sA:return r.findParamModelAssembly(e.entityId);case nh:return i.find((function(t){return t.id===e.entityId}));case ih:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(Dt.unzip)([s,a]).every((function(e){var t=ty(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return $I($I({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){oy(uy(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),oy(uy(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){oy(uy(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ja.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(cu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),St.on(Qt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(cu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),St.off(Qt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return cy})),this.selectionStateManager.off(ja.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],oy(uy(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(ly),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===uA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&iy(t.prototype,r),n&&iy(t,n),o}(Ci.AXR);gy.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",gy.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var fy={entry:mh,scene:zI,select:gy,fittingDesign:Ld,baseDesignInfo:Nf,viewParamModel:sp};function hy(){return RB().axr.axrs}var py=Object(aA.getConnector)(),dy=py.connect,Iy=py.setRootState;function yy(e,t,r){return dy((function(){return e(hy(),RB().getStateManager())}),t,r)}var Cy=r(1125),Ey=r.n(Cy);function By(e){return(By="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function my(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qy(e,t,r){return t&&my(e.prototype,t),r&&my(e,r),e}function by(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_y(e,t)}function _y(e,t){return(_y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dy(e);if(t){var i=Dy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wy(this,r)}}function wy(e,t){return!t||"object"!==By(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ry=Symbol("layout"),My=yy((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){by(r,e);var t=Sy(r);function r(){return vy(this,r),t.apply(this,arguments)}return Qy(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Ei.MountPoint)),xy=function(e){by(r,e);var t=Sy(r);function r(){return vy(this,r),t.apply(this,arguments)}return Qy(r,[{key:"render",value:function(){return vi.a.createElement(My,{mountPointId:Ry})}}]),r}(vi.a.PureComponent);function Py(e){return(Py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ly(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oy(e,t)}function Oy(e,t){return(Oy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ky(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Gy(e);if(t){var i=Gy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ny(this,r)}}function Ny(e,t){return!t||"object"!==Py(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gy(e){return(Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xy.contextType=Ei.AppContext;var Uy=yy((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){Ly(r,e);var t=ky(r);function r(){return Fy(this,r),t.apply(this,arguments)}return r}(Ei.Scene3D)),jy=yy((function(){return{}}),(function(){return{}}),function(e){Ly(o,e);var t,r,n,i=ky(o);function o(){var e;return Fy(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(RA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new RA.Color(Xf.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),RB().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return vi.a.createElement(Uy,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&Ty(t.prototype,r),n&&Ty(t,n),o}(vi.a.PureComponent));function Vy(e){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ky(e,t){return(Ky=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wy(e);if(t){var i=Wy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jy(this,r)}}function Jy(e,t){return!t||"object"!==Vy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wy(e){return(Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zy=yy((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ky(e,t)}(o,e);var t,r,n,i=qy(o);function o(){var e;return Yy(this,o),(e=i.apply(this,arguments)).rootRef=vi.a.createRef(),e.updateLayout=Object(Dt.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Cr.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return vi.a.createElement("div",{ref:this.rootRef,id:zf.SCENE_ID,className:r},vi.a.createElement(jy,{containerId:zf.SCENE_ID,size:new s.Vector2d(t.x,t.y)}))}}])&&Hy(t.prototype,r),n&&Hy(t,n),o}(vi.a.PureComponent));r(2073);function Xy(e){return(Xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eC(e,t){return(eC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nC(e);if(t){var i=nC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rC(this,r)}}function rC(e,t){return!t||"object"!==Xy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nC(e){return(nC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iC=yy((function(e){return{}}),(function(e){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eC(e,t)}(o,e);var t,r,n,i=tC(o);function o(){return Zy(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return vi.a.createElement(Ei.ViewMounter,{mountPointId:Ry},vi.a.createElement(zy,{key:"s3",className:Ey.a.scene3D}))}}])&&$y(t.prototype,r),n&&$y(t,n),o}(vi.a.PureComponent));function oC(e,t){return(oC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function AC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sC(e);if(t){var i=sC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aC(this,r)}}function aC(e,t){return!t||"object"!==uC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sC(e){return(sC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uC(e){return(uC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cC,lC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},gC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":uC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},fC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oC(e,t)}(r,e);var t=AC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=nh,n.entityId=e.id,n}return r}(Ei.Entity);fC=lC([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===u.GROOVE)return hC(e);if(t===u.HOLE)return pC(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),gC("design:paramtypes",["function"==typeof(cC=void 0!==Ir&&Ir)?cC:Object])],fC);var hC=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new RA.BoxGeometry(n.x,n.y,n.z),u=new RA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new RA.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},pC=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new RA.CylinderGeometry(s,s,o),c=new RA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new RA.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function dC(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function IC(e){return function(e){if(Array.isArray(e))return yC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return yC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CC(e,t){return(CC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function EC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vC(e);if(t){var i=vC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BC(this,r)}}function BC(e,t){return!t||"object"!==mC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vC(e){return(vC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mC(e){return(mC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var QC,bC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":mC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},_C=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":mC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},SC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&CC(e,t)}(r,e);var t=EC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ih,n.entityId=e.id,n}return r}(Ei.Entity);function wC(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new RA.LineBasicMaterial,u=new RA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new RA.Mesh(void 0,u),l=new RA.Line(void 0,s),g=new RA.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new RA.Shape,u=A?new RA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new RA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new RA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new RA.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function DC(e){var t=new s.BBox3d;return[].concat(IC(e.getTopRenderPoints()),IC(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new s.Point3d(e))})),new Se.a(new Fe.a({x:t.width,y:t.height,z:t.depth}),new Fe.a(t.center),new Fe.a({x:0,y:0,z:0}))}function RC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MC(e,t){return(MC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=TC(e);if(t){var i=TC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return PC(this,r)}}function PC(e,t){return!t||"object"!==FC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function TC(e){return(TC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function FC(e){return(FC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}SC=bC([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new RA.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,u=e.path.getAllPolygonPoints(),c=new Me.a;c.fromString(r.toArray().join(","));var l=Uh(c),g=On.a.decompose(c).position,f=wC({matrix:l,depth:0,points:u,color:i,side:RA.Side.FrontSide,position:g,opacity:o}),h=wC({matrix:l,depth:-n,points:u,color:i,side:RA.Side.BackSide,position:g,opacity:o}),p=[].concat(IC(u),[u[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new RA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new RA.Mesh(new RA.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof RA.BufferGeometry){var s=dC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new RA.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new s.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new s.Point3d(e.x,e.y,-n)})),color:i,side:RA.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof RA.Mesh&&e.material&&Object(Dt.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:DC(this.$model)}}))]),_C("design:paramtypes",["function"==typeof(QC=void 0!==qr&&qr)?QC:Object])],SC);var LC,OC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},kC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":FC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},NC=Ei.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,GC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&MC(e,t)}(o,e);var t,r,n,i=xC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=ah,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new RA.Geometry,r=e.getVertices().map((function(e){var t=e;return new RA.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new RA.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new RA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new RA.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof Le.CoreParamModel?t.getConcatenatedBox3():t instanceof Ir?t.boundingBox:DC(t),NC(e)}}])&&RC(t.prototype,r),n&&RC(t,n),o}(Ei.Entity),UC=GC=OC([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),kC("design:paramtypes",["function"==typeof(LC=void 0!==ir&&ir)?LC:Object])],GC);function jC(e){var t=new RA.BufferGeometry;if(t.index=new RA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new RA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new RA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new RA.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function VC(e,t){return(VC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function YC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=KC(e);if(t){var i=KC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return HC(this,r)}}function HC(e,t){return!t||"object"!==qC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KC(e){return(KC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qC(e){return(qC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var JC,WC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":qC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},zC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":qC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},XC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&VC(e,t)}(r,e);var t=YC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=oh,n.entityId=e.id,n}return r}(Ei.Entity),ZC=XC=WC([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new RA.Group,A=jC(r),a=new RA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:RA.Side.DoubleSide}),s=new RA.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new RA.Mesh($C,eE);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),zC("design:paramtypes",["function"==typeof(JC=void 0!==cn&&cn)?JC:Object])],XC),$C=new RA.SphereBufferGeometry(3),eE=new RA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function tE(e){return function(e){if(Array.isArray(e))return rE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return rE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nE(e,t){return(nE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=AE(e);if(t){var i=AE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oE(this,r)}}function oE(e,t){return!t||"object"!==aE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AE(e){return(AE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aE(e){return(aE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sE,uE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":aE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":aE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},lE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nE(e,t)}(r,e);var t=iE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Ah,n.entityId=e.id,n}return r}(Ei.Entity),gE=lE=uE([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new RA.Group;r&&r.forEach((function(e){var t=jC(Ai(e,o)),r=new RA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:RA.Side.DoubleSide}),n=new RA.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=ld(0,a),c=ld(5,a);s=[].concat(tE(Object(Dt.zip)(u,[].concat(tE(u.slice(1)),[u[0]]))),tE(Object(Dt.zip)(c,[].concat(tE(c.slice(1)),[c[0]]))),tE(Object(Dt.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Dt.chunk)(s,3).map((function(e){return new Fe.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new YA({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),cE("design:paramtypes",["function"==typeof(sE=void 0!==yn&&yn)?sE:Object])],lE);function fE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hE(e,t){return(hE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IE(e);if(t){var i=IE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dE(this,r)}}function dE(e,t){return!t||"object"!==yE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IE(e){return(IE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yE(e){return(yE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var CE,EE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":yE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},BE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":yE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},vE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hE(e,t)}(o,e);var t,r,n,i=pE(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=sh,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new s.Point3d(e.x,e.y,A/2)})),u=t.map((function(e){return new s.Point3d(e.x,e.y,-A/2)})),c=new RA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new RA.Mesh(new RA.BufferGeometry,c);if(c.setValues({side:RA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof RA.BufferGeometry){var g=dC(a,u);l.geometry.addAttribute("position",new RA.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new Fe.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(Uh(f)),l}}}])&&fE(t.prototype,r),n&&fE(t,n),o}(Ei.Entity),mE=vE=EE([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),BE("design:paramtypes",["function"==typeof(CE=void 0!==Sn&&Sn)?CE:Object])],vE);var QE=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new fC(e)})),this.createIntersectEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new ZC(e)})),this.createGrooveFittingEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new SC(e)})),this.createPlankFaceHintEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new gE(e)})),this.careateFittingHintEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new UC(e)})),this.careatePlankOutlineHintEntities=Ei.__unstable__.flatEntitiesCreator((function(e){return new mE(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function bE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _E(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function _E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var wE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(Dt.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=bE(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=bE(Object(Dt.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(Dt.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return be.includes(e)}}])&&SE(t.prototype,r),n&&SE(t,n),e}(),DE=new Map([[Fn.ParamModelCategory.FRAME,[Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SWING_DOOR,Fn.ParamModelCategory.PARAM_FURNITURE,Fn.ParamModelCategory.FASCIA_BOARD,Fn.ParamModelCategory.SPECIAL_FRAME,Fn.ParamModelCategory.EMBED_FRAME_W,Fn.ParamModelCategory.POLE_W,Fn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Fn.ParamModelCategory.BOARD,Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SPACE_GROUP,Fn.ParamModelCategory.SINGLE_SLIDING_DOOR,Fn.ParamModelCategory.FRAME,Fn.ParamModelCategory.SLIDING_DOOR_BOARD,Fn.ParamModelCategory.PARAM_FURNITURE_PART,Fn.ParamModelCategory.SANITARY_COMPONENT,Fn.ParamModelCategory.DOOR_LEAF,Fn.ParamModelCategory.DECORATIVE_MOLDING_C,Fn.ParamModelCategory.DECORATIVE_MOLDING_W,Fn.ParamModelCategory.HANDS_FREE,Fn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Fn.ParamModelCategory.SHOWER_ROOM,[Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SWING_DOOR,Fn.ParamModelCategory.PARAM_FURNITURE,Fn.ParamModelCategory.FASCIA_BOARD,Fn.ParamModelCategory.SPECIAL_FRAME,Fn.ParamModelCategory.EMBED_FRAME_W,Fn.ParamModelCategory.POLE_W,Fn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Fn.ParamModelCategory.BOARD,Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SPACE_GROUP,Fn.ParamModelCategory.SINGLE_SLIDING_DOOR,Fn.ParamModelCategory.FRAME,Fn.ParamModelCategory.PARAM_FURNITURE_PART,Fn.ParamModelCategory.SANITARY_COMPONENT,Fn.ParamModelCategory.DOOR_LEAF,Fn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SWING_DOOR,Fn.ParamModelCategory.PARAM_FURNITURE,Fn.ParamModelCategory.FASCIA_BOARD,Fn.ParamModelCategory.SPECIAL_FRAME,Fn.ParamModelCategory.EMBED_FRAME_W,Fn.ParamModelCategory.BOARD,Fn.ParamModelCategory.SPACE_GROUP,Fn.ParamModelCategory.POLE_W,Fn.ParamModelCategory.SINGLE_SLIDING_DOOR,Fn.ParamModelCategory.SLIDING_DOOR_BOARD,Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.RAIL,Fn.ParamModelCategory.DOOR_LEAF]],[Fn.ParamModelCategory.SLIDING_DOOR_C,[Fn.ParamModelCategory.RAIL,Fn.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Fn.ParamModelCategory.SPACE_GROUP,[Fn.ParamModelCategory.DRAWER,Fn.ParamModelCategory.SWING_DOOR,Fn.ParamModelCategory.PARAM_FURNITURE,Fn.ParamModelCategory.FASCIA_BOARD,Fn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Fn.ParamModelCategory.BOARD,Fn.ParamModelCategory.SPECIAL_BOARD,Fn.ParamModelCategory.SPACE_GROUP]],[Fn.ParamModelCategory.SINGLE_SLIDING_DOOR,[Fn.ParamModelCategory.SLIDING_DOOR_CORE,Fn.ParamModelCategory.DOOR_WAIST_LINE]],[Fn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Fn.ParamModelCategory.SWING_DOOR]],[Fn.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Fn.ParamModelCategory.BOARD]],[Fn.ParamModelCategory.SWING_DOOR,[Fn.ParamModelCategory.DOOR_CORE,Fn.ParamModelCategory.DOOR_WAIST_LINE,Fn.ParamModelCategory.DECORATIVE_MOLDING,Fn.ParamModelCategory.BOARD]],[Fn.ParamModelCategory.DRAWER,[Fn.ParamModelCategory.DRAWER_PANEL,Fn.ParamModelCategory.SWING_DOOR,Fn.ParamModelCategory.BOARD]],[Fn.ParamModelCategory.PARAM_FURNITURE,[Fn.ParamModelCategory.FURNITURE_LEG]],[Fn.ParamModelCategory.KADA,[Fn.ParamModelCategory.BYOBU,Fn.ParamModelCategory.BYOBU_FRAME,Fn.ParamModelCategory.BYOBU_PANEL]]]);function RE(e){return function(e){if(Array.isArray(e))return ME(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ME(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ME(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ME(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var PE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Ie.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new wE,this.memoGetHintModelLite=rI()((function(e){return t.isFittingLikeModel(e)?Lp(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(DE.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Zd(e,{origin:W.SENSE},void 0,Zd(t,{origin:W.SENSE})):Zd(e,{origin:W.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=FB(u))&&!this.isFittingLikeModel(o)&&(u.entityType===uA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof Le.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===ye.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof Le.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===ye.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===ye.CLICK)return s||a;if(t===ye.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&FB(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===ye.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===ye.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===ye.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===ye.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=FB(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===uA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof Le.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Le.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Ie.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Ie.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===Ie.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Dt.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=LB[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?Lp(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(Dt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Dt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof qr||e instanceof Ir||e instanceof dt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Ie.CUSTOM){switch(this.designMode){case Ie.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ie.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ie.PRODUCT:r=e}if(!r)return;var n=TB(r),i=Object(Dt.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,RE(this.prevModeSelectEntity));var o=i[0]&&FB(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(RE(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Ie.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ie.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ie.PRODUCT:r=e;break;case Ie.CUSTOM:return this.customModeSelectModel(e,t)}return TB(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Ie.TOP_MODEL:case Ie.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Ie.PRODUCT:t=e;break;case Ie.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(Dt.castArray)(this.curSelectEntity)||[];if(!([].concat(RE(r),RE(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return TB(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&xE(t.prototype,r),n&&xE(t,n),e}();function TE(e){return(TE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OE(e,t){return(OE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=GE(e);if(t){var i=GE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return NE(this,r)}}function NE(e,t){return!t||"object"!==TE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function GE(e){return(GE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&OE(e,t)}(o,e);var t,r,n,i=kE(o);function o(){return FE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&FB(e)}},{key:"selection",get:function(){return RB().getStateManager().kaf.selection}},{key:"hint",get:function(){return RB().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return RB().designModeContext}}])&&LE(t.prototype,r),n&&LE(t,n),o}(Ei.ToolModule.Feature);function jE(e){return(jE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HE(e,t){return(HE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=JE(e);if(t){var i=JE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qE(this,r)}}function qE(e,t){return!t||"object"!==jE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JE(e){return(JE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var WE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HE(e,t)}(o,e);var t,r,n,i=KE(o);function o(){var e;return VE(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if(St.eventNames().includes(Qt.PLANK_FACE_HOVER)&&r instanceof Le.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Vh(r,i)};St.emit(Qt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Ie.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&YE(t.prototype,r),n&&YE(t,n),o}(UE);function zE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return XE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XE(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function XE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ZE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $E(e,t){return($E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rB(e);if(t){var i=rB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tB(this,r)}}function tB(e,t){return!t||"object"!==nB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rB(e){return(rB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nB(e){return(nB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var iB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":nB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},oB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":nB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},AB=Ei.__INTERNAL__.Highlighters.WireGeometry,aB=Ei.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,sB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$E(e,t)}(o,e);var t,r,n,i=eB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new AB,r=zE(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof Le.CoreParamModel||n instanceof Le.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=aB(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&ZE(t.prototype,r),n&&ZE(t,n),o}(Ei.Entity),uB=sB=iB([Object(Ei.provideEntityAPIs)([new Ei.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),oB("design:paramtypes",[Array,Function])],sB);function cB(e){return(cB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gB(e,t){return(gB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pB(e);if(t){var i=pB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hB(this,r)}}function hB(e,t){return!t||"object"!==cB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pB(e){return(pB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gB(e,t)}(o,e);var t,r,n,i=fB(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return FB(e)}));return new uB(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Ir?e.boundingBox:DC(e)}},{key:"onClick",value:function(e){this.triggerClick(e,ye.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,ye.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(St.eventNames().includes(Qt.PLANK_FACE_CLICK)&&n instanceof Le.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Vh(n,o)};St.emit(Qt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Ie.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&lB(t.prototype,r),n&&lB(t,n),o}(UE);function IB(e){return(IB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function CB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yB(Object(r),!0).forEach((function(t){EB(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function EB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vB(e,t,r){return(vB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_B(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function mB(e,t){return(mB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_B(e);if(t){var i=_B(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bB(this,r)}}function bB(e,t){return!t||"object"!==IB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _B(e){return(_B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SB,wB=new Ci.SingletonRef,DB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mB(e,t)}(o,e);var t,r,n,i=QB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:iC,axrs:fy,singleton:wB},e)).stateManager=t,r.viewer=new rs,r.designModeContext=new PE,r}return t=o,(r=[{key:"init",value:function(){vB(_B(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),Iy(e);var t=this.getDependentPlugin(Ei.AppServicePlugin),r=this.getDependentPlugin(yf);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){vB(_B(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new oc),this.client=new bu(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Ei.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!iI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:uA,point:r}:CB(CB({},e),{},{point:r})},paramModelSymbol:uA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new QE((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new dB})),t.kaf.toolbox.addIdleToolFeature((function(){return new WE})),o.setLayout(xy)}}])&&BB(t.prototype,r),n&&BB(t,n),o}(Ci.PluginApplication),RB=wB.instance;function MB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xB(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(Dt.isObject)(n)&&Object(Dt.isFunction)(n.then)&&Object(Dt.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function PB(e){return e instanceof dt?uA:e instanceof bt?sA:e instanceof Ir?nh:e instanceof qr?ih:void 0}function TB(e){return{entityId:e.id,entityType:PB(e)}}function FB(e){var t=e.entityId,r=e.entityType,n=RB().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case uA:return o.findModelOrAssemblyModelById(t);case sA:return o.findParamModelAssembly(t);case ih:return i.getGrooveFittings().find((function(e){return e.id===t}));case nh:return i.getFittings().find((function(e){return e.id===t}));default:return}}var LB=(MB(SB={},Qe.PARAM_MODEL,uA),MB(SB,Qe.PARAM_MODEL_ASSEMBLY,sA),MB(SB,Qe.HOLE,nh),MB(SB,Qe.GROOVE,nh),MB(SB,Qe.HARDWARE_GROOVE,ih),MB(SB,Qe.HARDWARE,uA),SB);function OB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function kB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){OB(o,n,i,A,a,"next",e)}function a(e){OB(o,n,i,A,a,"throw",e)}A(void 0)}))}}var NB=new Map;function GB(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var UB=xB(function(){var e=kB(a.a.mark((function e(t){var r,n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=rc(),n=GB(t),!NB.has(n)){e.next=4;break}return e.abrupt("return",NB.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,NB.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),GB);function jB(){var e=vf(Ag);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var VB,YB,HB=function(){var e=kB(a.a.mark((function e(t,r){var n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=rc(),i=GB(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:NB.set(i,t),jB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),KB=function(){var e=kB(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=rc(),n=GB(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:NB.has(n)&&NB.delete(n),jB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function qB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function JB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){qB(o,n,i,A,a,"next",e)}function a(e){qB(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(VB||(VB={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(YB||(YB={}));var WB=function(){var e=JB(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Dt.castArray)(t),n=vf(Cg),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),zB=xB(function(){var e=JB(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=vf(mf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),XB=xB(function(){var e=JB(a.a.mark((function e(t,r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=vf(mf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function ZB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ev(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function tv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ev(o,n,i,A,a,"next",e)}function a(e){ev(o,n,i,A,a,"throw",e)}A(void 0)}))}}var rv=rI()(function(){var e=tv(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=rc(),e.next=3,r.gzipGet("/dcs-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ZB(Object(r),!0).forEach((function(t){$B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},nI)),nv=rI()(function(){var e=tv(a.a.mark((function e(t){var r,n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=rc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Dt.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var iv=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function ov(e){return(ov="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Av(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function av(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Av(Object(r),!0).forEach((function(t){sv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Av(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function cv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){uv(o,n,i,A,a,"next",e)}function a(e){uv(o,n,i,A,a,"throw",e)}A(void 0)}))}}function lv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fv(e,t){return(fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dv(e);if(t){var i=dv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pv(this,r)}}function pv(e,t){return!t||"object"!==ov(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Iv=function(){return hy().fittingDesign.fittingDesignSense},yv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fv(e,t)}(c,e);var t,r,n,i,o,A,s,u=hv(c);function c(){return lv(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Iv().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Iv().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(s=cv(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(hy().viewParamModel.state.state.currModelId!==t||Iv().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,Hh(t);case 5:return r=e.sent,e.abrupt("return",UB(av(av({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Iv().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=hy().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=hy().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:ni.POINT,val:t[i]},A={type:ni.LINE,val:r[i]};if(!hi(o.val))return!1;if(!pi(A.val))return!1;if(!Ii(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:ni.POINT,val:t[a]},u={type:ni.LINE,val:r[a]};if(!Ii(o,s))return!1;if(!Ii(o,u))return!1;if(!Ii(A,s))return!1;if(!Ii(A,u))return!1}}return!0}(yi(e,r,Object(Dt.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=cv(a.a.mark((function e(t){var r,n=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Iv().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=cv(a.a.mark((function e(t){var r,n,i,o=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=Oh(n),Iv().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=cv(a.a.mark((function e(t){var r,n,i,o,A;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=Oh(i),Iv().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&gv(t.prototype,r),n&&gv(t,n),c}(iv);function Cv(e){return(Cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ev(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vv(e,t){return(vv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bv(e);if(t){var i=bv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qv(this,r)}}function Qv(e,t){return!t||"object"!==Cv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bv(e){return(bv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _v=(new Nn.a).setFromCenterAndSize(new Fe.a(0,0,0),new Fe.a(200,200,100)),Sv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vv(e,t)}(o,e);var t,r,n,i=mv(o);function o(){return Ev(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return _v}}])&&Bv(t.prototype,r),n&&Bv(t,n),o}(Ei.Scene3DStateManager);function wv(e){return(wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(e,t){return(Rv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pv(e);if(t){var i=Pv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xv(this,r)}}function xv(e,t){return!t||"object"!==wv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pv(e){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rv(e,t)}(r,e);var t=Mv(r);function r(){return Dv(this,r),t.apply(this,arguments)}return r}(Ei.types.combine({scene3D:Sv})),Fv=window.document.createElement("script");Fv.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Fv);function Lv(e){return(Lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ov(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nv(e,t){return(Nv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jv(e);if(t){var i=jv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uv(this,r)}}function Uv(e,t){return!t||"object"!==Lv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jv(e){return(jv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nv(e,t)}(o,e);var t,r,n,i=Gv(o);function o(){var e;return Ov(this,o),(e=i.apply(this,arguments)).rootState=new Tv,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new DB(this,this.rootState);e.init(),e.run()}}])&&kv(t.prototype,r),n&&kv(t,n),o}(uf.BasePlugin);function Yv(e){return(Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qv(e,t){return(qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zv(e);if(t){var i=zv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wv(this,r)}}function Wv(e,t){return!t||"object"!==Yv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Vv.dependencies=[Ei.AppServicePlugin,yf];var Xv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qv(e,t)}(o,e);var t,r,n,i=Jv(o);function o(){return Hv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){hy().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){hy().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&Kv(t.prototype,r),n&&Kv(t,n),o}(iv);function Zv(e){return(Zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $v(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function em(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$v(o,n,i,A,a,"next",e)}function a(e){$v(o,n,i,A,a,"throw",e)}A(void 0)}))}}function tm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nm(e,t){return(nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function im(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Am(e);if(t){var i=Am(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return om(this,r)}}function om(e,t){return!t||"object"!==Zv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Am(e){return(Am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var am=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}(u,e);var t,r,n,i,o,A,s=im(u);function u(){return tm(this,u),s.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=em(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=em(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=em(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&rm(t.prototype,r),n&&rm(t,n),u}(iv);function sm(e){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function um(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lm(e,t){return(lm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hm(e);if(t){var i=hm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fm(this,r)}}function fm(e,t){return!t||"object"!==sm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hm(e){return(hm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lm(e,t)}(o,e);var t,r,n,i=gm(o);function o(){return um(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){hy().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){hy().fittingDesign.fittingHint.clearFittingHint(e)}}])&&cm(t.prototype,r),n&&cm(t,n),o}(iv);function dm(e){return(dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Im(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ym(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Im(o,n,i,A,a,"next",e)}function a(e){Im(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Cm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bm(e,t){return(Bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qm(e);if(t){var i=Qm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mm(this,r)}}function mm(e,t){return!t||"object"!==dm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qm(e){return(Qm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bm,_m,Sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bm(e,t)}(s,e);var t,r,n,i,o,A=vm(s);function s(){return Cm(this,s),A.apply(this,arguments)}return t=s,(r=[{key:"getAllFittingModels",value:(o=ym(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=ym(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Em(t.prototype,r),n&&Em(t,n),s}(iv);function wm(e){return(wm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mm(e,t){return(Mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tm(e);if(t){var i=Tm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pm(this,r)}}function Pm(e,t){return!t||"object"!==wm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tm(e){return(Tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(bm||(bm={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(_m||(_m={}));var Fm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mm(e,t)}(o,e);var t,r,n,i=xm(o);function o(){return Dm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case bm.View3D:t=Ei.PerspectiveCameraMode.View3D;break;case bm.Roamer:t=Ei.PerspectiveCameraMode.Roamer}RB().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=RB().getStateManager().scene3D;switch(e){case _m.UP:case _m.FRONT:t=Ei.ArrowType.UP;break;case _m.DOWN:case _m.BACK:t=Ei.ArrowType.DOWN;break;case _m.LEFT:t=Ei.ArrowType.LEFT;break;case _m.RIGHT:t=Ei.ArrowType.RIGHT}if(t){if(e===_m.UP||e===_m.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&Rm(t.prototype,r),n&&Rm(t,n),o}(iv);function Lm(e){return(Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Om(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function km(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nm(e,t){return(Nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jm(e);if(t){var i=jm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Um(this,r)}}function Um(e,t){return!t||"object"!==Lm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jm(e){return(jm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nm(e,t)}(o,e);var t,r,n,i=Gm(o);function o(){return Om(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){hy().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){hy().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){hy().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&km(t.prototype,r),n&&km(t,n),o}(iv);function Ym(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ym(o,n,i,A,a,"next",e)}function a(e){Ym(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jm(e,t){return(Jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xm(e);if(t){var i=Xm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zm(this,r)}}function zm(e,t){return!t||"object"!==Zm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zm(e){return(Zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $m,eQ,tQ=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Zm(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},rQ=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Zm(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},nQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jm(e,t)}(s,e);var t,r,n,i,o,A=Wm(s);function s(){return Km(this,s),A.apply(this,arguments)}return t=s,(r=[{key:"getParamData",value:(o=Hm(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=Hm(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hy().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(Dt.map)(n.intersectedGroups,(function(e){return Nh(Nh({},e),{},{intersecteds:Object(Dt.map)(e.intersecteds,(function(e){return Object(Dt.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=ve),hy().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return hy().viewParamModel.getParamModelPhotoData(e)}}])&&qm(t.prototype,r),n&&qm(t,n),s}(iv);function iQ(e){return(iQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function aQ(e,t){return(aQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cQ(e);if(t){var i=cQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uQ(this,r)}}function uQ(e,t){return!t||"object"!==iQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cQ(e){return(cQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}tQ([de.observeAsyncApiDeco({serviceName:"ModelService"}),rQ("design:type",Function),rQ("design:paramtypes",["function"!=typeof!1&&Object]),rQ("design:returntype","function"==typeof($m="undefined"!=typeof Promise&&Promise)?$m:Object)],nQ.prototype,"getParamData",null),tQ([de.observeAsyncApiDeco({serviceName:"ModelService"}),rQ("design:type",Function),rQ("design:paramtypes",["function"!=typeof!1&&Object]),rQ("design:returntype","function"==typeof(eQ="undefined"!=typeof Promise&&Promise)?eQ:Object)],nQ.prototype,"getParamIntersected",null);var lQ,gQ,fQ=function(){return hy().select},hQ=function(){return hy().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(lQ||(lQ={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(gQ||(gQ={}));var pQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aQ(e,t)}(o,e);var t,r,n,i=sQ(o);function o(){var e;return oQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(Dt.castArray)(e).map((function(e){var t={__sceneId:zf.SCENE_ID,entityId:e.id,entityType:uA};return e.type===gQ.CASBIN&&(t.entityId=hQ().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){St.emit(Qt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=fQ().state.state.selectedData,t=hy().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof dt&&r.isAppendHardware)return{data:[r.hardwareData],type:lQ.CASBIN};var n=Object(Dt.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:lQ.MODEL}}return{data:[],type:lQ.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);fQ().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);fQ().unSelect(t)}else fQ().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,fQ().on(gy.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),St.on(Qt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){St.off(Qt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),St.once(Qt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){fQ().off(gy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&AQ(t.prototype,r),n&&AQ(t,n),o}(iv);function dQ(e){return(dQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function CQ(e,t){return(CQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function EQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vQ(e);if(t){var i=vQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BQ(this,r)}}function BQ(e,t){return!t||"object"!==dQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vQ(e){return(vQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mQ=function(){return hy().select},QQ=function(){return RB().designModeContext},bQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&CQ(e,t)}(o,e);var t,r,n,i=EQ(o);function o(){var e;return IQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){St.on(Qt.PLANK_FACE_CLICK,e)},once:function(e){St.once(Qt.PLANK_FACE_CLICK,e)},off:function(e){St.off(Qt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){St.on(Qt.PLANK_FACE_HOVER,e)},once:function(e){St.once(Qt.PLANK_FACE_HOVER,e)},off:function(e){St.off(Qt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){St.emit(Qt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return mQ().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(Dt.castArray)(e).map(this._genEntityFromElement);mQ().select(t),QQ().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Dt.castArray)(e).map(this._genEntityFromElement);mQ().unSelect(t);var r=QQ().getCurSelectEntity();r&&(Array.isArray(r)?QQ().setCurSelectEntity(Object(Dt.difference)(r,t)):t.includes(r)&&QQ().setCurSelectEntity(void 0))}else mQ().select(),QQ().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),St.on(Qt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){St.off(Qt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),St.once(Qt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,mQ().on(gy.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:LB[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof dt?t=e.isAppendHardware?Qe.HARDWARE:Qe.PARAM_MODEL:e instanceof bt?t=Qe.PARAM_MODEL_ASSEMBLY:e instanceof qr?t=Qe.HARDWARE_GROOVE:e instanceof Ir&&(t=e.type===u.HOLE?Qe.HOLE:Qe.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){mQ().off(gy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&yQ(t.prototype,r),n&&yQ(t,n),o}(iv);function _Q(e){return(_Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function wQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){SQ(o,n,i,A,a,"next",e)}function a(e){SQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function DQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MQ(e,t){return(MQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=TQ(e);if(t){var i=TQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return PQ(this,r)}}function PQ(e,t){return!t||"object"!==_Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function TQ(e){return(TQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var FQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&MQ(e,t)}(u,e);var t,r,n,i,o,A,s=xQ(u);function u(){return DQ(this,u),s.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=wQ(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=wQ(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=RB().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){hy().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){hy().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){hy().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=wQ(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&RQ(t.prototype,r),n&&RQ(t,n),u}(iv),LQ=r(244);function OQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?OQ(Object(r),!0).forEach((function(t){NQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function NQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GQ(e){return function(e){if(Array.isArray(e))return UQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return UQ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var VQ=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=Wt()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var u=[];s.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),s.FacesBoolean.FaceBooleanType.subtract,u),a=u}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,GQ(a.map((function(e){return e.loops}))))};if(A){Object(LQ.calculateFaceBBox)(c);var l=c.box.center,g=s.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return HQ(me.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,GQ(t.loops.slice(1))),e}),[]).map((function(e){return HQ(me.INNER,e,!0)})),p=new e(this.modelID,[].concat(GQ(f),GQ(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=YQ(this.paths.find((function(e){return e.type===me.OUTER})));Object(LQ.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(YQ)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&jQ(t.prototype,r),n&&jQ(t,n),e}();function YQ(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==b.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,s.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:s.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function HQ(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new Sr({type:b.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof s.LineSeg2d?{type:_.SEGMENT}:e instanceof s.Arc2d?KQ(e):qQ(e),new mr(t)})),o=s.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=WQ(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new Pr({type:e,points:n,lines:i,forceCCW:!1})}function KQ(e){var t={};t.type=_.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new s.LineSeg2d(n,i),A=o.length/2,a=new s.Vector2d(o.getPoint(A)),u=new s.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=u.isSameDirection(o.rightNormal):t.minorArc=u.isSameDirection(o.leftNormal),t}function qQ(e){var t={};return t.type=_.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function JQ(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?s.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Bc(r,n):function(e,t){var r=pc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=dc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=kQ(kQ({},e.changeMap),{},{update:[]}))}function WQ(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function zQ(e){return(zQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function XQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $Q(e,t){return($Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rb(e);if(t){var i=rb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tb(this,r)}}function tb(e,t){return!t||"object"!==zQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rb(e){return(rb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$Q(e,t)}(o,e);var t,r,n,i=eb(o);function o(){return XQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(Tr(me.OUTER,r.path)),n.push.apply(n,GQ(r.holes.map((function(e){return Tr(me.INNER,e)})))),new VQ(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){JQ(e)}}])&&ZQ(t.prototype,r),n&&ZQ(t,n),o}(iv);function ib(e){return(ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ob(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ab(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ab(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sb(e,t){return(sb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lb(e);if(t){var i=lb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cb(this,r)}}function cb(e,t){return!t||"object"!==ib(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lb(e){return(lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sb(e,t)}(s,e);var t,r,n,i,o,A=ub(s);function s(){return Ab(this,s),A.apply(this,arguments)}return t=s,(r=[{key:"stable",value:(i=a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",hy().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ob(o,r,n,A,a,"next",e)}function a(e){ob(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&ab(t.prototype,r),n&&ab(t,n),s}(iv);function fb(e){return(fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function db(e,t){return(db=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ib(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cb(e);if(t){var i=Cb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yb(this,r)}}function yb(e,t){return!t||"object"!==fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cb(e){return(Cb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Eb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&db(e,t)}(o,e);var t,r,n,i=Ib(o);function o(){return hb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;RB().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){RB().designModeContext.registerMultiSelectShortcut(e)}}])&&pb(t.prototype,r),n&&pb(t,n),o}(iv),Bb=r(428),vb=r.n(Bb),mb=new Ci.I18NManager,Qb="custom_order_split",bb={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function _b(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Sb(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){_b(o,n,i,A,a,"next",e)}function a(e){_b(o,n,i,A,a,"throw",e)}A(void 0)}))}}var wb=Object(Dt.once)((function(){return!!Object(vc.parseServQueryParams)()}));function Db(){return Rb.apply(this,arguments)}function Rb(){return(Rb=Sb(a.a.mark((function e(){var t,r,n=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=vc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:vc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:vc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Mb=r(531),xb=r.n(Mb),Pb=r(1126),Tb=r.n(Pb);function Fb(e){return(Fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ob(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kb(e,t){return(kb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ub(e);if(t){var i=Ub(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gb(this,r)}}function Gb(e,t){return!t||"object"!==Fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ub(e){return(Ub=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kb(e,t)}(o,e);var t,r,n,i=Nb(o);function o(){return Lb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return vi.a.createElement("div",{className:xb()(Tb.a.empty,i)},!r&&vi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&vi.a.createElement("p",null,t))}}])&&Ob(t.prototype,r),n&&Ob(t,n),o}(vi.a.PureComponent);function Vb(e){return(Vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Kb(e,t){return(Kb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wb(e);if(t){var i=Wb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jb(this,r)}}function Jb(e,t){return!t||"object"!==Vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wb(e){return(Wb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kb(e,t)}(o,e);var t,r,n,i=qb(o);function o(){return Yb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return vi.a.createElement(Ei.Scene3D,e)}}])&&Hb(t.prototype,r),n&&Hb(t,n),o}(Bi.PureComponent),Xb=r(1127),Zb=r.n(Xb);function $b(e){return($b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e_(){return(e_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function t_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n_(e,t){return(n_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A_(e);if(t){var i=A_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o_(this,r)}}function o_(e,t){return!t||"object"!==$b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A_(e){return(A_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Bi.PureComponent;var a_=r(91);function s_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u_(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=vi.a;var c_=document.getElementById("root");function l_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function f_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){g_(o,n,i,A,a,"next",e)}function a(e){g_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function h_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var p_=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(pe.ZH_CN,{zh_CN:bb}),function(e){If=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return St.on(Qt.API_CALLED,e),function(){return St.off(Qt.API_CALLED,e)}},once:function(e){return St.once(Qt.API_CALLED,e),function(){return St.off(Qt.API_CALLED,e)}},emit:function(e){St.emit(Qt.API_CALLED,e)}};de.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(sg);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return wb()}},{key:"start",value:(o=f_(a.a.mark((function e(t){var r,n,i=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInCustomMiniAppMode()){e.next=7;break}if(vc.sappSDK.isStarted){e.next=4;break}return e.next=4,vc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=f_(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 4:this.sappSDK=vc.sappSDK,e.next=10;break;case 7:return e.next=9,Db(t);case 9:this.sappSDK=e.sent;case 10:return this.startOnApiCalledEvent(),e.next=13,Promise.resolve([Ei.App,Vv]).then((function(e){var t=s_(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(c_)})).catch((function(e){Object(a_.unmountComponentAtNode)(c_),Object(a_.render)(vi.a.createElement(jb,null),c_),console.error("micros/pad",e)}));case 13:return(r=this.getCustomMiniAppService(og))?(rc().setMiniAppHttpProxyClientService(r),_f(rc())):_f(tc()),(Cf=new bf.AttachedService).config.setRequestClient(Bf),Ef=new bf.ParamModelDataService({paramModelConstructor:dt,requestClient:Bf}),new bf.ParamModelAssemblyDataService({paramModelAssemblyConstructor:bt,requestClient:Bf}),n=this.getService(FQ),e.prev=17,e.next=20,n.viewSelected();case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(17),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 25:case"end":return e.stop()}}),e,this,[[17,22]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Dt.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),vb.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:Bb.ENUM.TranslatorType.I18next,packages:[Qb],resource:l_({},Qb,t)}),mb.init({namespace:Qb,resources:Qb})}},{key:"stop",value:(i=f_(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(Ag))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(Dt.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(iv.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof vc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&h_(t.prototype,r),n&&h_(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1119),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},L=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function O(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=O(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(726),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new L(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|
|
159
|
+
***************************************************************************** */var lg,gg=function(e,t){return(gg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function fg(e,t){function r(){this.constructor=e}gg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function hg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":cg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function pg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function dg(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(pg(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(lg||(lg={}));var Ig,yg,Cg,Eg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fg(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(mc.API_UNSUPPORT)()},hg([mc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),hg([mc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=hg([mc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService),Bg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fg(t,e),t.prototype.toJSON=function(){return{paramPackages:dg(this.paramPackages.values()),hardwares:dg(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=pg(e,2);t[0];var r=t[1],n=new zl.a;return Object(Rt.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:dg(this.displayInfos.values()),wireFrames:Object(Rt.fromPairs)(dg(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(Rt.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new zl.a;if(Object(Rt.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new eg.a,n=new zr.a;return Object(Rt.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Object(Xl.toPopBufferMtl)(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Zl.FurnitureModel;Object(Rt.extend)(r,t.furnitureModel),r.size=new Le.a(r.size),r.position=new Le.a(r.position),r.rotate=new Le.a(r.rotate),r.scale=new Le.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(Rt.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(Jl.a);!function(e){e[e.willExit=0]="willExit"}(Ig||(Ig={})),function(e){e[e.exit=0]="exit"}(yg||(yg={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Cg||(Cg={}));var vg=r(245),mg=r.n(vg),Qg=r(287),bg=r.n(Qg),_g=r(1121),Sg=r.n(_g),wg=r(357),Dg=r.n(wg),Rg=r(717),Mg=r.n(Rg),xg=r(1122),Pg=r.n(xg),Tg=r(723),Fg=r.n(Tg),Lg=r(724),Og=r.n(Lg),kg=r(207),Ng=r.n(kg),Gg=r(112),Ug=r.n(Gg),jg=r(187),Vg=r.n(jg),Yg=r(528),Hg=r.n(Yg),Kg=r(1123),qg=r.n(Kg),Jg=r(722),Wg=r.n(Jg),zg=r(721),Xg=r.n(zg),Zg=r(358),$g=r.n(Zg),ef=r(242),tf=r.n(ef),rf=r(728),nf=r.n(rf),of=r(716),Af=r.n(of),af=r(1124),sf=r.n(af),uf=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Zn.a,Gn.a,Dg.a,we.a,Mg.a,Re.a,Pg.a,Ng.a,Ug.a,Vg.a,Hg.a,xe.a,jn.a,Yn.a,Kn.a,qg.a,Wg.a,Xg.a,Te.a,$g.a,tf.a,nf.a,rf.LineIndex,Jn.a,Af.a,sf.a,Er.a,Le.a,ArrayBuffer,MA.Vector3,bg.a,Sg.a,Bs.ParamStore,Fg.a,Og.a,eg.a,zr.a,Zl.FurnitureModel,Map,MA.SkyBackground]:[];Object(vg.inject)({isKnownImmutableInstance:function(e){return uf.some((function(t){return e instanceof t}))}});mg.a;var cf=r(211);function lf(e){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ff(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hf(e,t){return(hf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=If(e);if(t){var i=If(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return df(this,r)}}function df(e,t){return!t||"object"!==lf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function If(e){return(If=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yf,Cf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hf(e,t)}(o,e);var t,r,n,i=pf(o);function o(){var e;return gf(this,o),(e=i.apply(this,arguments)).rootState=new vu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new pc(this,this.rootState);e.init(),e.run()}}])&&ff(t.prototype,r),n&&ff(t,n),o}(cf.BasePlugin);Cf.dependencies=[Bi.AppServicePlugin];var Ef,Bf,vf,mf=function(e){if(!yf)throw new Error("please new Application before call method");return yf.getCustomMiniAppService(e)},Qf=r(249),bf=r(108),_f=r(429);function Sf(e){vf=e}function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Df(e){return function(e){if(Array.isArray(e))return Rf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rf(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xf(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Pf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){xf(o,n,i,A,a,"next",e)}function a(e){xf(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Tf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Lf(e,t){return(Lf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Of(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Nf(e);if(t){var i=Nf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kf(this,r)}}function kf(e,t){return!t||"object"!==wf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nf(e){return(Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lf(e,t)}(o,e);var t,r,n,i=Of(o);function o(){var e;return Tf(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Pf(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=mf(Qf.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=Pf(s.a.mark((function t(r){var n,i,o;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Rt.castArray)(r),o=Object(Rt.difference)(i,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=i,!o.length&&n){t.next=12;break}return t.next=9,XB(r);case 9:n=t.sent,t.next=13;break;case 12:return t.abrupt("return",n);case 13:return e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=Pf(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(Rt.uniq)(Object(Rt.flatten)(Object(Rt.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(Rt.map)(n,function(){var e=Pf(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,iv(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,ov(n);case 11:for(p in u=t.sent,c=Object(Rt.mapValues)(Object(Rt.keyBy)(Object(Rt.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new xe.a).makeTranslation(new Le.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(Rt.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=Mf(t,["paramModelData"]),A=e.rotate,a=(new It).parse(i);Object(bf.attach)(a,Object(bf.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new xe.a).compose(new Le.a(e.position),new Re.a(A.x,A.y,A.z),new Le.a(e.scale)).multiply((new xe.a).setPosition(new Le.a(r)))),g=kn.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new Le.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,Df(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Ef.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Ff(t.prototype,r),n&&Ff(t,n),o}(Ei.AXR);function Uf(e){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yf(e,t){return(Yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qf(e);if(t){var i=qf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kf(this,r)}}function Kf(e,t){return!t||"object"!==Uf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qf(e){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jf,Wf,zf,Xf,Zf,$f,eh,th,rh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yf(e,t)}(o,e);var t,r,n,i=Hf(o);function o(){var e;return jf(this,o),(e=i.apply(this,arguments)).paramModelConstructor=It,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new _t).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Vf(t.prototype,r),n&&Vf(t,n),o}(Bg),nh=r(75),ih=Symbol("fitting-data"),oh=Symbol("groove-fitting-entity"),Ah=Symbol("intersect-data"),ah=Symbol("param-model-hint-entity"),sh=Symbol("fitting-hint-entity"),uh=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(Jf||(Jf={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(Wf||(Wf={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(zf||(zf={})),function(e){e.SCENE_ID="cp"}(Xf||(Xf={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Zf||(Zf={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}($f||($f={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(eh||(eh={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(th||(th={}));var ch,lh=[];function gh(e){return(gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fh(e){return function(e){if(Array.isArray(e))return hh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ph(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function dh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ph(o,n,i,A,a,"next",e)}function a(e){ph(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Ih(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ch(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Eh(e,t){return(Eh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mh(e);if(t){var i=mh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vh(this,r)}}function vh(e,t){return!t||"object"!==gh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mh(e){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(ch||(ch={}));var Qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eh(e,t)}(o,e);var t,r,n,i=Bh(o);function o(){var e;return yh(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:Wf.READY,design:Wf.READY,series:Wf.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Ih(n,["paramModelData"]),A=(new It).parse(i),Object(bf.attach)(A,Object(bf.toAttachedMap)(o)),e.next=9,Ef.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(lh),e.next=13,Object(nh.put)(this.$actionLoad.done.message({params:t,result:Wf.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=dh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(bf.attach)(t,Object(bf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(fh(a),fh(A)),e.next=12,Ef.updateAttacheds(u);case 12:return e.next=14,Object(nh.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:Wf.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Ih(e,["paramModelData"]),n=(new It).parse(t,new rh);return Object(bf.attach)(n,Object(bf.toAttachedMap)(r)),n})),e.next=3,Ef.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,fh(i)),e.next=6,Object(nh.put)(this.$actionAddParamModelToSense.done.message({params:t,result:Wf.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new rh,o=t.map((function(e){return(new _t).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=dh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(bf.attach)(t,Object(bf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Ef.updateAttacheds(fh(o));case 8:return n.addParamModelAssemblies.apply(n,fh(o)),n.addParamModels.apply(n,fh(A)),e.next=12,Object(nh.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:Wf.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Ch(t.prototype,r),n&&Ch(t,n),o}(Ei.AXR);function bh(e){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wh(e,t)}function wh(e,t){return(wh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Mh(e);if(t){var i=Mh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rh(this,r)}}function Rh(e,t){return!t||"object"!==bh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mh(e){return(Mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ei.AXR;var xh=function(e){Sh(r,e);var t=Dh(r);function r(){return _h(this,r),t.apply(this,arguments)}return r}(Ei.AXRPartial),Ph=(Ei.AXRManager,Math.sqrt(2)),Th=Math.PI/6,Fh=Math.PI/3+Math.PI;function Lh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fh,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Th,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*Ph,a=new Le.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var Oh,kh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function Nh(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function Gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gh(Object(r),!0).forEach((function(t){jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e){var t=e.elements;return(new xA.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Yh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hh(e,t){var r,n=e.getSize(),i=(new xe.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(Vh(i)),A=o.x,a=o.y,s=o.z,u=(Yh(r={},Oh.TOP,Math.abs(s-n.z/2)),Yh(r,Oh.LEFT,Math.abs(A+n.x/2)),Yh(r,Oh.BACK,Math.abs(a+n.y/2)),Yh(r,Oh.RIGHT,Math.abs(A-n.x/2)),Yh(r,Oh.FRONT,Math.abs(a-n.y/2)),Yh(r,Oh.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:Oh.UNKNOWN}function Kh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(Oh||(Oh={}));var qh=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dy(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Kh(o,n,i,A,a,"next",e)}function a(e){Kh(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Jh=r(243);function Wh(e){return function(e){if(Array.isArray(e))return zh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xh(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new rh;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Wh(r.getParamModels())).concat.apply(t,Wh(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(Rt.uniqBy)(Jh.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function Zh(e){return(Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $h(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ep(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$h(o,n,i,A,a,"next",e)}function a(e){$h(o,n,i,A,a,"throw",e)}A(void 0)}))}}function tp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t){return(np=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ip(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ap(e);if(t){var i=Ap(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return op(this,r)}}function op(e,t){return!t||"object"!==Zh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ap(e){return(Ap=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ap(e){return function(e){if(Array.isArray(e))return sp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return sp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function up(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?up(e.subModels):[]})).flat();return t.push.apply(t,ap(e)),t}var cp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&np(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=ip(g);function g(){var e;return tp(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:Jf.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=this.state.state,l=c.currModelId,g=c.result,f=c.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(h=r===l,p=f===u,d=this.$actionLoadParamModelJsonData,e.prev=7,I=h&&!a&&p?g:void 0,!o||I){e.next=13;break}return e.next=12,ZB(r,u);case 12:I=e.sent;case 13:if(I){e.next=18;break}return UB.delete(r),e.next=17,$B(r,u);case 17:I=e.sent;case 18:if(I){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return y=h&&!u?up(I.paramModel):this.state.state.allSubModels,h&&dy().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,d.done.dispatch({params:t,result:{ossContent:I,allSubModels:y}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,d.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=Jf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=Jf.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=Jf.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=ep(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Rt.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=dy().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(kd).fittingDesignSense).initFittingDesign(),function(){var e=ep(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Nh(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(Gf).getCurrentCustomData(r);case 12:return o=e.sent,A=new rh,o.context&&A.unSerialize(o.context),a=Xh(o,A),(u=new Ye).addParamModels.apply(u,ap(a.paramModels)),u.addParamModelAssemblies.apply(u,ap(a.paramModelAssemblies)),e.next=21,this.getAxr(Qh).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=ep(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,XB(this.state.state.currModelId);case 9:return o=e.sent,A=new rh,o.context&&A.unSerialize(o.context),a=Xh(o,A),t.addParamModels.apply(t,ap(a.paramModels)),t.addParamModelAssemblies.apply(t,ap(a.paramModelAssemblies)),e.next=17,this.getAxr(Qh).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=ep(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=mf(Qf.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(Rt.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=ep(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=Nh(),this.getAxr(kd).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=Nh(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===Ln.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,ap(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=ep(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=mf(Eg),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=ep(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Rt.castArray)(t),n=mf(Qf.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&rp(t.prototype,r),n&&rp(t,n),g}(Ei.AXR);function lp(e){return(lp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gp(Object(r),!0).forEach((function(t){hp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function hp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pp(e){return function(e){if(Array.isArray(e))return dp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ip(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function yp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ip(o,n,i,A,a,"next",e)}function a(e){Ip(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Cp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ep(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bp(e,t,r){return(Bp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bp(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function vp(e,t){return(vp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bp(e);if(t){var i=bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qp(this,r)}}function Qp(e,t){return!t||"object"!==lp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bp(e){return(bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _p={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},Sp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vp(e,t)}(o,e);var t,r,n,i=mp(o);function o(){var e;return Cp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:Jf.FAIL,design:Object(Rt.cloneDeep)(_p)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Qh);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(nh.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(Gf).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(Rt.cloneDeep)(_p))},e.getConnectedFittingDesign=function(){var t=yp(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(Rt.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(Rt.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(Rt.filter)(i.holes[u],f),o.grooves[u]=Object(Rt.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Rt.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Rt.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=yp(s.a.mark((function t(r){var n,i,o,A,a,u,l,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kh(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=dy().fittingDesign.senseSetting.getSenseSettings(),a=Object(Rt.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,l=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Pn},i.addFittings([].concat(pp(Bc(l,fp(fp({},d),{},{type:c.HOLE,defaultConfig:a}))),pp(Bc(f,fp(fp({},d),{},{type:c.GROOVE,defaultConfig:a}))))),i.addGrooveFittings(Bc(p,fp(fp({},d),{},{type:c.HARDWARE_GROOVE,transformModel:Ci,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=yp(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=_p,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:fp(fp({},u?A.holes:c.holes),r.holes||{}),grooves:fp(fp({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:fp(fp({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:fp(fp({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Rt.pull)(Object(Rt.keys)(h),"id").forEach((function(e){var t=h[e];Object(Rt.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=Nh(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,qh(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,VB(fp(fp({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(Rt.cloneDeep)(_p),i=this.getAxr(cp).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(cp).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(cp).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,qh(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,JB(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(cp).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,qh(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,qB(fp(fp({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("save failed!"));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(cp).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Bp(bp(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Ep(t.prototype,r),n&&Ep(t,n),o}(xh);function wp(e){return(wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tp(e);if(t){var i=Tp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pp(this,r)}}function Pp(e,t){return!t||"object"!==wp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tp(e){return(Tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mp(e,t)}(o,e);var t,r,n,i=xp(o);function o(){var e;return Dp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(Rt.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(Rt.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new or({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&Rp(t.prototype,r),n&&Rp(t,n),o}(xh);function Lp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Op=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&Lp(t.prototype,r),n&&Lp(t,n),e}();function kp(e){var t,r=new Op;if(r.id=e.id,e instanceof It){if(!e.isAppendHardware)return;t=c.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function Np(e){return(Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gp(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=jp(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Up(e){return function(e){if(Array.isArray(e))return Vp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||jp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jp(e,t){if(e){if("string"==typeof e)return Vp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vp(e,t):void 0}}function Vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Kp(e,t){return(Kp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wp(e);if(t){var i=Wp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jp(this,r)}}function Jp(e,t){return!t||"object"!==Np(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wp(e){return(Wp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kp(e,t)}(o,e);var t,r,n,i=qp(o);function o(){return Yp(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,Up((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(Up(o),Up(A),Up(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return kp(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=Gp(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,Up(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=Gp(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===c.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),xB().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===c.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==c.HOLE&&e.modelType!==c.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&Hp(t.prototype,r),n&&Hp(t,n),o}(xh);function Xp(e){return(Xp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function $p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ed(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$p(Object(r),!0).forEach((function(t){td(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function td(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rd(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function id(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function od(e,t){return(od=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ad(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sd(e);if(t){var i=sd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ad(this,r)}}function ad(e,t){return!t||"object"!==Xp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sd(e){return(sd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ud=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&od(e,t)}(a,e);var t,r,n,i,o,A=Ad(a);function a(){var e;return nd(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:Jf.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qh(t.modelId);case 2:return n=e.sent,i=mf(sg),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=rd(t,["modelId","defer"]),c=dy().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(ed({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=dy().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var h=t.option,p=void 0===h?{}:h,d=t.intersectedGroups,I=Object(Rt.map)(d,(function(e){var t=!0===p.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==p.plankFaceIds&&!p.plankFaceIds.includes(r.plankFaceId))return!1;var A=o.findModelOrAssemblyModelById(r.linkedModelId);if(A){var a=Ai(e,r,A),h=i===g.BOTH_PLANK?n===l.FACE?s:u:n===l.FACE?c:f;return a.setViewColor(h),a}})).filter((function(e){return!!e}));i.setIntersects(I),A||r.kaf.invisibleManager.hide("scene3d",Ah,I.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Ah,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Ah,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(ed(ed({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dy().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=rd(n,["timeout","modelId"]),c=Nh(o),this.$actionLoadParamModelIntersectedData.started.dispatch(ed(ed({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Zp(o,r,n,A,a,"next",e)}function a(e){Zp(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&id(t.prototype,r),n&&id(t,n),a}(xh);function cd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ld(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cd(Object(r),!0).forEach((function(t){gd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fd(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return ld(ld({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function hd(e){return(hd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Id(e,t){return(Id=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ed(e);if(t){var i=Ed(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cd(this,r)}}function Cd(e,t){return!t||"object"!==hd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ed(e){return(Ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bd={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},vd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Id(e,t)}(o,e);var t,r,n,i=yd(o);function o(){var e;return pd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:Bd}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(Rt.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(Rt.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Rt.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(Rt.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(Rt.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(Rt.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=Dn(e.plankFaceId,Le.a).mul(.1),r=fd(e.plankFaceId,n).map((function(e){var r=new Le.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return ld(ld({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Cn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&dd(t.prototype,r),n&&dd(t,n),o}(xh);function md(e){return(md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _d(e,t){return(_d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dd(e);if(t){var i=Dd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wd(this,r)}}function wd(e,t){return!t||"object"!==md(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dd(e){return(Dd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_d(e,t)}(o,e);var t,r,n,i=Sd(o);function o(){var e;return Qd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:me,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(Rt.castArray)(t.renderIgnoreCategory)),Object(Rt.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&bd(t.prototype,r),n&&bd(t,n),o}(xh);function Md(e){return(Md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Td(e,t){return(Td=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Od(e);if(t){var i=Od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ld(this,r)}}function Ld(e,t){return!t||"object"!==Md(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Od(e){return(Od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Td(e,t)}(o,e);var t,r,n,i=Fd(o);function o(){var e;return xd(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(Sp),e.intersected=e.partialCreator.create(ud),e.senseSetting=e.partialCreator.create(Rd),e.fittingModel=e.partialCreator.create(zp),e.plankFaceHint=e.partialCreator.create(vd),e.fittingHint=e.partialCreator.create(Fp),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Pd(t.prototype,r),n&&Pd(t,n),o}(Ei.AXR),Nd=r(715),Gd=r.n(Nd);function Ud(e){return(Ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yd(e,t){return(Yd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qd(e);if(t){var i=qd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kd(this,r)}}function Kd(e,t){return!t||"object"!==Ud(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qd(e){return(qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yd(e,t)}(o,e);var t,r,n,i=Hd(o);function o(){return jd(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Vd(t.prototype,r),n&&Vd(t,n),o}(oe);function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wd(Object(r),!0).forEach((function(t){Xd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Zd={x:0,y:0,z:0},$d={x:0,y:0,z:0};function eI(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new Jd,a=!(e instanceof It)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof It;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=m.ASSEMBLY;if(u?c=m.COMMON:e.isTemplateAssembly()&&(c=m.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?Zd:s.getPosition(),A.rotation=A.isRoot?$d:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=rI(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return eI(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return eI(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function tI(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?zd({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===E.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();dy().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===E.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[Ln.ParamType.MATERIAL,Ln.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===v.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==z.SENSE)&&(s=s.clone(!1)),o===v.CHILD?(s.setIsAppend(!0),s.setAppendType(Gd.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,zd(zd({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==z.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===v.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,zd(zd({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(v.CHILD)),t.getAccessory().forEach(l(v.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function rI(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new X;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[Q.MATERIAL,Q.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var nI=r(125),iI=r.n(nI),oI={maxAge:6e5,max:20},AI=(th.SHADING,th.OUTLINE_WITH_SHADING,th.TRANSLUCENT,th.OUTLINE_AND_TRANSLUCENT,[Oe.ParamModelType.PARAM_ENTITY,Oe.ParamModelType.PARAM_FURNITURE,Oe.ParamModelType.PARAM_PRIMITIVE]);function aI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(r),!0).forEach((function(t){uI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function uI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function lI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){cI(o,n,i,A,a,"next",e)}function a(e){cI(o,n,i,A,a,"throw",e)}A(void 0)}))}}iI()(function(){var e=lI(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),sI({promise:!0},oI));function gI(){return(gI=lI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fI(){return(fI=lI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hI=iI()((function(e){return gI.apply(this,arguments)}),sI(sI({},oI),{},{promise:!0})),pI=iI()((function(e){return fI.apply(this,arguments)}),sI(sI({},oI),{},{promise:!0}));function dI(e){return function(e){if(Array.isArray(e))return II(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return II(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return II(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function II(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function CI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var EI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Rt.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(dI(e.hardwares||[]),dI(e.textures||[]),dI(e.virtualModels||[]),dI(e.paramModelProducts||[]),dI(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,hI(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,pI(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){yI(o,r,n,A,a,"next",e)}function a(e){yI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&CI(t.prototype,r),n&&CI(t,n),e}();function BI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function vI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){BI(o,n,i,A,a,"next",e)}function a(e){BI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function mI(e){return function(e){if(Array.isArray(e))return QI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return QI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var SI=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new EI;bI(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,mI(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case z.BRANDGOOD:case z.CATEGORY:break;case z.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,mI(i.getChildNodes()))}}},{key:"attach",value:(i=vI(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===z.SENSE?8:e.t0===z.CATEGORY||e.t0===z.BRANDGOOD||e.t0===z.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===E.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[Q.MATERIAL,Q.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,mI(i.getChild()).concat(mI(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(mI(Object(Rt.uniq)(r.modelIds).map(function(){var e=vI(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&_I(t.prototype,r),n&&_I(t,n),e}(),wI=r(729);function DI(e){return(DI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xI(e,t,r){return(xI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=LI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function PI(e,t){return(PI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LI(e);if(t){var i=LI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FI(this,r)}}function FI(e,t){return!t||"object"!==DI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LI(e){return(LI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PI(e,t)}(o,e);var t,r,n,i=TI(o);function o(){var e;return RI(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Qh),e.next=3,Object(nh.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==Wf.SUCCESS){e.next=13;break}return e.next=6,Object(nh.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(nh.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(nh.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(wI.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(wI.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=Lh(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){xI(LI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&MI(t.prototype,r),n&&MI(t,n),o}(xh);function kI(e){return(kI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=UI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function GI(e){return function(e){if(Array.isArray(e))return jI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||UI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UI(e,t){if(e){if("string"==typeof e)return jI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jI(e,t):void 0}}function jI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function YI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){VI(o,n,i,A,a,"next",e)}function a(e){VI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qI(e,t,r){return(qI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=XI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function JI(e,t){return(JI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=XI(e);if(t){var i=XI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zI(this,r)}}function zI(e,t){return!t||"object"!==kI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function XI(e){return(XI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ZI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JI(e,t)}(u,e);var t,r,n,i,o,A,a=WI(u);function u(){var e;return HI(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(OI),e.state=e.stateCreator.create({renderMode:MA.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=MA.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===th.SHADING?5:e.t0===th.OUTLINE_WITH_SHADING?7:e.t0===th.TRANSLUCENT?9:e.t0===th.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=MA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=MA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=MA.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(nh.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:xB().viewer.toggleShowModelOutline(n===MA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),xB().viewer.triggerReducer(),this.emit($f.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?MA.RenderMode.OUTLINE_WITH_SHADING:MA.RenderMode.SHADING,e.next=3,Object(nh.put)(this.$actionMergeState.message({renderMode:n}));case 3:xB().viewer.toggleShowModelOutline(n===MA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit($f.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(nh.put)(this.$actionMergeState.message({translucent:t}));case 2:xB().viewer.triggerReducer(),this.emit($f.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(nh.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;qI(XI(u.prototype),"init",this).call(this),xB().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?eh.translucentModel:eh.opaqueModel})),xB().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=YI(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return eI(e,{origin:z.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=YI(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",eI(r,{origin:z.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=YI(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new SI(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,GI(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return tI(e,i)})));case 8:o=e.sent,A=[],a=[],u=NI(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),xB().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&KI(t.prototype,r),n&&KI(t,n),u}(Ei.AXR);function $I(e){return($I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ty(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(r),!0).forEach((function(t){ry(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ay(e,t,r){return(ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ly(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function sy(e,t){return(sy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ly(e);if(t){var i=ly(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cy(this,r)}}function cy(e,t){return!t||"object"!==$I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ly(e){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gy={rawSelected:[],selectedData:[],selectedDataV2:[]},fy=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},hy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sy(e,t)}(o,e);var t,r,n,i=uy(o);function o(){var e;return oy(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(gy).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(Rt.unzip)([t,r]).every((function(e){var t=ny(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return ty(ty({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case cA:return r.findModelEx(e.entityId,cu);case uA:return r.findParamModelAssembly(e.entityId);case ih:return i.find((function(t){return t.id===e.entityId}));case oh:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(Rt.unzip)([s,a]).every((function(e){var t=ny(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return ty(ty({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){ay(ly(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),ay(ly(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){ay(ly(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Va.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(lu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),wt.on(bt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(lu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),wt.off(bt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return gy})),this.selectionStateManager.off(Va.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],ay(ly(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(fy),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===cA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&Ay(t.prototype,r),n&&Ay(t,n),o}(Ei.AXR);hy.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",hy.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var py={entry:Qh,scene:ZI,select:hy,fittingDesign:kd,baseDesignInfo:Gf,viewParamModel:cp};function dy(){return xB().axr.axrs}var Iy=Object(sA.getConnector)(),yy=Iy.connect,Cy=Iy.setRootState;function Ey(e,t,r){return yy((function(){return e(dy(),xB().getStateManager())}),t,r)}var By=r(1125),vy=r.n(By);function my(e){return(my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _y(e,t,r){return t&&by(e.prototype,t),r&&by(e,r),e}function Sy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wy(e,t)}function wy(e,t){return(wy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=My(e);if(t){var i=My(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(e,t){return!t||"object"!==my(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function My(e){return(My=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=Symbol("layout"),Py=Ey((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){Sy(r,e);var t=Dy(r);function r(){return Qy(this,r),t.apply(this,arguments)}return _y(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Bi.MountPoint)),Ty=function(e){Sy(r,e);var t=Dy(r);function r(){return Qy(this,r),t.apply(this,arguments)}return _y(r,[{key:"render",value:function(){return mi.a.createElement(Py,{mountPointId:xy})}}]),r}(mi.a.PureComponent);function Fy(e){return(Fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ny(e,t)}function Ny(e,t){return(Ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jy(e);if(t){var i=jy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uy(this,r)}}function Uy(e,t){return!t||"object"!==Fy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jy(e){return(jy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ty.contextType=Bi.AppContext;var Vy=Ey((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){ky(r,e);var t=Gy(r);function r(){return Oy(this,r),t.apply(this,arguments)}return r}(Bi.Scene3D)),Yy=Ey((function(){return{}}),(function(){return{}}),function(e){ky(o,e);var t,r,n,i=Gy(o);function o(){var e;return Oy(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(MA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new MA.Color(Zf.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),xB().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return mi.a.createElement(Vy,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&Ly(t.prototype,r),n&&Ly(t,n),o}(mi.a.PureComponent));function Hy(e){return(Hy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xy(e);if(t){var i=Xy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zy(this,r)}}function zy(e,t){return!t||"object"!==Hy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zy=Ey((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jy(e,t)}(o,e);var t,r,n,i=Wy(o);function o(){var e;return Ky(this,o),(e=i.apply(this,arguments)).rootRef=mi.a.createRef(),e.updateLayout=Object(Rt.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Er.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return mi.a.createElement("div",{ref:this.rootRef,id:Xf.SCENE_ID,className:r},mi.a.createElement(Yy,{containerId:Xf.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&qy(t.prototype,r),n&&qy(t,n),o}(mi.a.PureComponent));r(2073);function $y(e){return($y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rC(e,t){return(rC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=oC(e);if(t){var i=oC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return iC(this,r)}}function iC(e,t){return!t||"object"!==$y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oC(e){return(oC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AC=Ey((function(e){return{}}),(function(e){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rC(e,t)}(o,e);var t,r,n,i=nC(o);function o(){return eC(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return mi.a.createElement(Bi.ViewMounter,{mountPointId:xy},mi.a.createElement(Zy,{key:"s3",className:vy.a.scene3D}))}}])&&tC(t.prototype,r),n&&tC(t,n),o}(mi.a.PureComponent));function aC(e,t){return(aC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cC(e);if(t){var i=cC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uC(this,r)}}function uC(e,t){return!t||"object"!==lC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cC(e){return(cC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lC(e){return(lC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var gC,fC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},hC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":lC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},pC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aC(e,t)}(r,e);var t=sC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ih,n.entityId=e.id,n}return r}(Bi.Entity);pC=fC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===c.GROOVE)return dC(e);if(t===c.HOLE)return IC(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),hC("design:paramtypes",["function"==typeof(gC=void 0!==yr&&yr)?gC:Object])],pC);var dC=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new MA.BoxGeometry(n.x,n.y,n.z),u=new MA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new MA.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},IC=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new MA.CylinderGeometry(s,s,o),c=new MA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new MA.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function yC(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function CC(e){return function(e){if(Array.isArray(e))return EC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return EC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BC(e,t){return(BC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QC(e);if(t){var i=QC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mC(this,r)}}function mC(e,t){return!t||"object"!==bC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QC(e){return(QC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bC(e){return(bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _C,SC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},wC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":bC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},DC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BC(e,t)}(r,e);var t=vC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=oh,n.entityId=e.id,n}return r}(Bi.Entity);function RC(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new MA.LineBasicMaterial,u=new MA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new MA.Mesh(void 0,u),l=new MA.Line(void 0,s),g=new MA.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new MA.Shape,u=A?new MA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new MA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new MA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new MA.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function MC(e){var t=new u.BBox3d;return[].concat(CC(e.getTopRenderPoints()),CC(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new we.a(new Le.a({x:t.width,y:t.height,z:t.depth}),new Le.a(t.center),new Le.a({x:0,y:0,z:0}))}function xC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PC(e,t){return(PC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LC(e);if(t){var i=LC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FC(this,r)}}function FC(e,t){return!t||"object"!==OC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LC(e){return(LC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function OC(e){return(OC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}DC=SC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new MA.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new xe.a;c.fromString(r.toArray().join(","));var l=Vh(c),g=kn.a.decompose(c).position,f=RC({matrix:l,depth:0,points:s,color:i,side:MA.Side.FrontSide,position:g,opacity:o}),h=RC({matrix:l,depth:-n,points:s,color:i,side:MA.Side.BackSide,position:g,opacity:o}),p=[].concat(CC(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new MA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new MA.Mesh(new MA.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof MA.BufferGeometry){var s=yC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new MA.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:MA.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof MA.Mesh&&e.material&&Object(Rt.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:MC(this.$model)}}))]),wC("design:paramtypes",["function"==typeof(_C=void 0!==Jr&&Jr)?_C:Object])],DC);var kC,NC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":OC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},GC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":OC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},UC=Bi.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,jC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PC(e,t)}(o,e);var t,r,n,i=TC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=sh,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new MA.Geometry,r=e.getVertices().map((function(e){var t=e;return new MA.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new MA.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new MA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new MA.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof Oe.CoreParamModel?t.getConcatenatedBox3():t instanceof yr?t.boundingBox:MC(t),UC(e)}}])&&xC(t.prototype,r),n&&xC(t,n),o}(Bi.Entity),VC=jC=NC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),GC("design:paramtypes",["function"==typeof(kC=void 0!==or&&or)?kC:Object])],jC);function YC(e){var t=new MA.BufferGeometry;if(t.index=new MA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new MA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new MA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new MA.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function HC(e,t){return(HC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=JC(e);if(t){var i=JC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qC(this,r)}}function qC(e,t){return!t||"object"!==WC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JC(e){return(JC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function WC(e){return(WC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zC,XC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":WC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ZC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":WC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},$C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HC(e,t)}(r,e);var t=KC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Ah,n.entityId=e.id,n}return r}(Bi.Entity),eE=$C=XC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new MA.Group,A=YC(r),a=new MA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:MA.Side.DoubleSide}),s=new MA.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new MA.Mesh(tE,rE);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),ZC("design:paramtypes",["function"==typeof(zC=void 0!==ln&&ln)?zC:Object])],$C),tE=new MA.SphereBufferGeometry(3),rE=new MA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function nE(e){return function(e){if(Array.isArray(e))return iE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return iE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oE(e,t){return(oE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function AE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sE(e);if(t){var i=sE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aE(this,r)}}function aE(e,t){return!t||"object"!==uE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sE(e){return(sE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uE(e){return(uE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cE,lE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},gE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":uE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},fE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oE(e,t)}(r,e);var t=AE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ah,n.entityId=e.id,n}return r}(Bi.Entity),hE=fE=lE([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new MA.Group;r&&r.forEach((function(e){var t=YC(ai(e,o)),r=new MA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:MA.Side.DoubleSide}),n=new MA.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=fd(0,a),c=fd(5,a);s=[].concat(nE(Object(Rt.zip)(u,[].concat(nE(u.slice(1)),[u[0]]))),nE(Object(Rt.zip)(c,[].concat(nE(c.slice(1)),[c[0]]))),nE(Object(Rt.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Rt.chunk)(s,3).map((function(e){return new Le.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new HA({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),gE("design:paramtypes",["function"==typeof(cE=void 0!==Cn&&Cn)?cE:Object])],fE);function pE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t){return(dE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=CE(e);if(t){var i=CE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yE(this,r)}}function yE(e,t){return!t||"object"!==EE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CE(e){return(CE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EE(e){return(EE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var BE,vE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":EE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},mE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":EE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},QE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dE(e,t)}(o,e);var t,r,n,i=IE(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=uh,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new MA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new MA.Mesh(new MA.BufferGeometry,c);if(c.setValues({side:MA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof MA.BufferGeometry){var g=yC(a,s);l.geometry.addAttribute("position",new MA.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new Le.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(Vh(f)),l}}}])&&pE(t.prototype,r),n&&pE(t,n),o}(Bi.Entity),bE=QE=vE([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),mE("design:paramtypes",["function"==typeof(BE=void 0!==wn&&wn)?BE:Object])],QE);var _E=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new pC(e)})),this.createIntersectEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new eE(e)})),this.createGrooveFittingEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new DC(e)})),this.createPlankFaceHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new hE(e)})),this.careateFittingHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new VC(e)})),this.careatePlankOutlineHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new bE(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function SE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wE(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function wE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var RE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(Rt.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=SE(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=SE(Object(Rt.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(Rt.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return _e.includes(e)}}])&&DE(t.prototype,r),n&&DE(t,n),e}(),ME=new Map([[Ln.ParamModelCategory.FRAME,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.FRAME,Ln.ParamModelCategory.SLIDING_DOOR_BOARD,Ln.ParamModelCategory.PARAM_FURNITURE_PART,Ln.ParamModelCategory.SANITARY_COMPONENT,Ln.ParamModelCategory.DOOR_LEAF,Ln.ParamModelCategory.DECORATIVE_MOLDING_C,Ln.ParamModelCategory.DECORATIVE_MOLDING_W,Ln.ParamModelCategory.HANDS_FREE,Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Ln.ParamModelCategory.SHOWER_ROOM,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.FRAME,Ln.ParamModelCategory.PARAM_FURNITURE_PART,Ln.ParamModelCategory.SANITARY_COMPONENT,Ln.ParamModelCategory.DOOR_LEAF,Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.SLIDING_DOOR_BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.RAIL,Ln.ParamModelCategory.DOOR_LEAF]],[Ln.ParamModelCategory.SLIDING_DOOR_C,[Ln.ParamModelCategory.RAIL,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Ln.ParamModelCategory.SPACE_GROUP,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.SPECIAL_BOARD,Ln.ParamModelCategory.SPACE_GROUP]],[Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,[Ln.ParamModelCategory.SLIDING_DOOR_CORE,Ln.ParamModelCategory.DOOR_WAIST_LINE]],[Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Ln.ParamModelCategory.SWING_DOOR]],[Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.SWING_DOOR,[Ln.ParamModelCategory.DOOR_CORE,Ln.ParamModelCategory.DOOR_WAIST_LINE,Ln.ParamModelCategory.DECORATIVE_MOLDING,Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.DRAWER,[Ln.ParamModelCategory.DRAWER_PANEL,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.PARAM_FURNITURE,[Ln.ParamModelCategory.FURNITURE_LEG]],[Ln.ParamModelCategory.KADA,[Ln.ParamModelCategory.BYOBU,Ln.ParamModelCategory.BYOBU_FRAME,Ln.ParamModelCategory.BYOBU_PANEL]]]);function xE(e){return function(e){if(Array.isArray(e))return PE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return PE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var FE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ye.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new RE,this.memoGetHintModelLite=iI()((function(e){return t.isFittingLikeModel(e)?kp(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(ME.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?eI(e,{origin:z.SENSE},void 0,eI(t,{origin:z.SENSE})):eI(e,{origin:z.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=OB(u))&&!this.isFittingLikeModel(o)&&(u.entityType===cA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof Oe.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===Ce.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof Oe.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===Ce.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===Ce.CLICK)return s||a;if(t===Ce.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&OB(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===Ce.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===Ce.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===Ce.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===Ce.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=OB(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===cA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof Oe.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Oe.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===ye.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===ye.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===ye.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Rt.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=kB[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?kp(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(Rt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Rt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof Jr||e instanceof yr||e instanceof It&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==ye.CUSTOM){switch(this.designMode){case ye.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case ye.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case ye.PRODUCT:r=e}if(!r)return;var n=LB(r),i=Object(Rt.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,xE(this.prevModeSelectEntity));var o=i[0]&&OB(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(xE(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case ye.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case ye.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case ye.PRODUCT:r=e;break;case ye.CUSTOM:return this.customModeSelectModel(e,t)}return LB(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case ye.TOP_MODEL:case ye.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case ye.PRODUCT:t=e;break;case ye.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(Rt.castArray)(this.curSelectEntity)||[];if(!([].concat(xE(r),xE(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return LB(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&TE(t.prototype,r),n&&TE(t,n),e}();function LE(e){return(LE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NE(e,t){return(NE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function GE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jE(e);if(t){var i=jE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return UE(this,r)}}function UE(e,t){return!t||"object"!==LE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jE(e){return(jE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var VE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NE(e,t)}(o,e);var t,r,n,i=GE(o);function o(){return OE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&OB(e)}},{key:"selection",get:function(){return xB().getStateManager().kaf.selection}},{key:"hint",get:function(){return xB().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return xB().designModeContext}}])&&kE(t.prototype,r),n&&kE(t,n),o}(Bi.ToolModule.Feature);function YE(e){return(YE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qE(e,t){return(qE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function JE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zE(e);if(t){var i=zE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return WE(this,r)}}function WE(e,t){return!t||"object"!==YE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zE(e){return(zE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var XE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qE(e,t)}(o,e);var t,r,n,i=JE(o);function o(){var e;return HE(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if(wt.eventNames().includes(bt.PLANK_FACE_HOVER)&&r instanceof Oe.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Hh(r,i)};wt.emit(bt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ye.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&KE(t.prototype,r),n&&KE(t,n),o}(VE);function ZE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $E(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function $E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tB(e,t){return(tB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iB(e);if(t){var i=iB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nB(this,r)}}function nB(e,t){return!t||"object"!==oB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iB(e){return(iB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oB(e){return(oB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var AB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":oB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},aB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":oB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sB=Bi.__INTERNAL__.Highlighters.WireGeometry,uB=Bi.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,cB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tB(e,t)}(o,e);var t,r,n,i=rB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new sB,r=ZE(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof Oe.CoreParamModel||n instanceof Oe.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=uB(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&eB(t.prototype,r),n&&eB(t,n),o}(Bi.Entity),lB=cB=AB([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),aB("design:paramtypes",[Array,Function])],cB);function gB(e){return(gB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hB(e,t){return(hB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IB(e);if(t){var i=IB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dB(this,r)}}function dB(e,t){return!t||"object"!==gB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IB(e){return(IB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hB(e,t)}(o,e);var t,r,n,i=pB(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return OB(e)}));return new lB(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof yr?e.boundingBox:MC(e)}},{key:"onClick",value:function(e){this.triggerClick(e,Ce.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,Ce.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(wt.eventNames().includes(bt.PLANK_FACE_CLICK)&&n instanceof Oe.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Hh(n,o)};wt.emit(bt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===ye.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&fB(t.prototype,r),n&&fB(t,n),o}(VE);function CB(e){return(CB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function BB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?EB(Object(r),!0).forEach((function(t){vB(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function QB(e,t,r){return(QB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=wB(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function bB(e,t){return(bB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wB(e);if(t){var i=wB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SB(this,r)}}function SB(e,t){return!t||"object"!==CB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wB(e){return(wB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DB,RB=new Ei.SingletonRef,MB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bB(e,t)}(o,e);var t,r,n,i=_B(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:AC,axrs:py,singleton:RB},e)).stateManager=t,r.viewer=new ns,r.designModeContext=new FE,r}return t=o,(r=[{key:"init",value:function(){QB(wB(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),Cy(e);var t=this.getDependentPlugin(Bi.AppServicePlugin),r=this.getDependentPlugin(Cf);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){QB(wB(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Ac),this.client=new _u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Bi.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!AI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:cA,point:r}:BB(BB({},e),{},{point:r})},paramModelSymbol:cA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new _E((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new yB})),t.kaf.toolbox.addIdleToolFeature((function(){return new XE})),o.setLayout(Ty)}}])&&mB(t.prototype,r),n&&mB(t,n),o}(Ei.PluginApplication),xB=RB.instance;function PB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TB(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(Rt.isObject)(n)&&Object(Rt.isFunction)(n.then)&&Object(Rt.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function FB(e){return e instanceof It?cA:e instanceof _t?uA:e instanceof yr?ih:e instanceof Jr?oh:void 0}function LB(e){return{entityId:e.id,entityType:FB(e)}}function OB(e){var t=e.entityId,r=e.entityType,n=xB().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case cA:return o.findModelOrAssemblyModelById(t);case uA:return o.findParamModelAssembly(t);case oh:return i.getGrooveFittings().find((function(e){return e.id===t}));case ih:return i.getFittings().find((function(e){return e.id===t}));default:return}}var kB=(PB(DB={},be.PARAM_MODEL,cA),PB(DB,be.PARAM_MODEL_ASSEMBLY,uA),PB(DB,be.HOLE,ih),PB(DB,be.GROOVE,ih),PB(DB,be.HARDWARE_GROOVE,oh),PB(DB,be.HARDWARE,cA),DB);function NB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function GB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){NB(o,n,i,A,a,"next",e)}function a(e){NB(o,n,i,A,a,"throw",e)}A(void 0)}))}}var UB=new Map;function jB(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var VB=TB(function(){var e=GB(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=nc(),n=jB(t),!UB.has(n)){e.next=4;break}return e.abrupt("return",UB.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,UB.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),jB);function YB(){var e=mf(ag);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var HB,KB,qB=function(){var e=GB(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nc(),i=jB(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:UB.set(i,t),YB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),JB=function(){var e=GB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),n=jB(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:UB.has(n)&&UB.delete(n),YB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function WB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function zB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){WB(o,n,i,A,a,"next",e)}function a(e){WB(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(HB||(HB={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(KB||(KB={}));var XB=function(){var e=zB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Rt.castArray)(t),n=mf(Eg),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ZB=TB(function(){var e=zB(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mf(Qf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),$B=TB(function(){var e=zB(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mf(Qf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function ev(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function nv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){rv(o,n,i,A,a,"next",e)}function a(e){rv(o,n,i,A,a,"throw",e)}A(void 0)}))}}var iv=iI()(function(){var e=nv(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),e.next=3,r.gzipGet("/dcs-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(r),!0).forEach((function(t){tv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},oI)),ov=iI()(function(){var e=nv(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Rt.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var Av=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function av(e){return(av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sv(Object(r),!0).forEach((function(t){cv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function gv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){lv(o,n,i,A,a,"next",e)}function a(e){lv(o,n,i,A,a,"throw",e)}A(void 0)}))}}function fv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pv(e,t){return(pv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yv(e);if(t){var i=yv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Iv(this,r)}}function Iv(e,t){return!t||"object"!==av(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yv(e){return(yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cv=function(){return dy().fittingDesign.fittingDesignSense},Ev=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pv(e,t)}(c,e);var t,r,n,i,o,A,a,u=dv(c);function c(){return fv(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Cv().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Cv().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=gv(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(dy().viewParamModel.state.state.currModelId!==t||Cv().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,qh(t);case 5:return r=e.sent,e.abrupt("return",VB(uv(uv({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Cv().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=dy().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=dy().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:ii.POINT,val:t[i]},A={type:ii.LINE,val:r[i]};if(!pi(o.val))return!1;if(!di(A.val))return!1;if(!yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:ii.POINT,val:t[a]},u={type:ii.LINE,val:r[a]};if(!yi(o,s))return!1;if(!yi(o,u))return!1;if(!yi(A,s))return!1;if(!yi(A,u))return!1}}return!0}(Ci(e,r,Object(Rt.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=gv(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Cv().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=gv(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=Nh(n),Cv().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=gv(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=Nh(i),Cv().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&hv(t.prototype,r),n&&hv(t,n),c}(Av);function Bv(e){return(Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sv(e);if(t){var i=Sv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _v(this,r)}}function _v(e,t){return!t||"object"!==Bv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wv=(new Gn.a).setFromCenterAndSize(new Le.a(0,0,0),new Le.a(200,200,100)),Dv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qv(e,t)}(o,e);var t,r,n,i=bv(o);function o(){return vv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return wv}}])&&mv(t.prototype,r),n&&mv(t,n),o}(Bi.Scene3DStateManager);function Rv(e){return(Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xv(e,t){return(xv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fv(e);if(t){var i=Fv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Tv(this,r)}}function Tv(e,t){return!t||"object"!==Rv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fv(e){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xv(e,t)}(r,e);var t=Pv(r);function r(){return Mv(this,r),t.apply(this,arguments)}return r}(Bi.types.combine({scene3D:Dv})),Ov=window.document.createElement("script");Ov.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Ov);function kv(e){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Uv(e,t){return(Uv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yv(e);if(t){var i=Yv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vv(this,r)}}function Vv(e,t){return!t||"object"!==kv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yv(e){return(Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uv(e,t)}(o,e);var t,r,n,i=jv(o);function o(){var e;return Nv(this,o),(e=i.apply(this,arguments)).rootState=new Lv,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new MB(this,this.rootState);e.init(),e.run()}}])&&Gv(t.prototype,r),n&&Gv(t,n),o}(cf.BasePlugin);function Kv(e){return(Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Wv(e,t){return(Wv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Zv(e);if(t){var i=Zv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xv(this,r)}}function Xv(e,t){return!t||"object"!==Kv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zv(e){return(Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Hv.dependencies=[Bi.AppServicePlugin,Cf];var $v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wv(e,t)}(o,e);var t,r,n,i=zv(o);function o(){return qv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){dy().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){dy().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&Jv(t.prototype,r),n&&Jv(t,n),o}(Av);function em(e){return(em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function rm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){tm(o,n,i,A,a,"next",e)}function a(e){tm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function im(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function om(e,t){return(om=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Am(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sm(e);if(t){var i=sm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return am(this,r)}}function am(e,t){return!t||"object"!==em(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sm(e){return(sm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var um=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&om(e,t)}(u,e);var t,r,n,i,o,A,a=Am(u);function u(){return nm(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=rm(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=rm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=rm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&im(t.prototype,r),n&&im(t,n),u}(Av);function cm(e){return(cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fm(e,t){return(fm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dm(e);if(t){var i=dm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pm(this,r)}}function pm(e,t){return!t||"object"!==cm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dm(e){return(dm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Im=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fm(e,t)}(o,e);var t,r,n,i=hm(o);function o(){return lm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){dy().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){dy().fittingDesign.fittingHint.clearFittingHint(e)}}])&&gm(t.prototype,r),n&&gm(t,n),o}(Av);function ym(e){return(ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Em(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Cm(o,n,i,A,a,"next",e)}function a(e){Cm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Bm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_m(e);if(t){var i=_m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bm(this,r)}}function bm(e,t){return!t||"object"!==ym(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sm,wm,Dm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mm(e,t)}(a,e);var t,r,n,i,o,A=Qm(a);function a(){return Bm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=Em(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=Em(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&vm(t.prototype,r),n&&vm(t,n),a}(Av);function Rm(e){return(Rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pm(e,t){return(Pm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Lm(e);if(t){var i=Lm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fm(this,r)}}function Fm(e,t){return!t||"object"!==Rm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lm(e){return(Lm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Sm||(Sm={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(wm||(wm={}));var Om=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pm(e,t)}(o,e);var t,r,n,i=Tm(o);function o(){return Mm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Sm.View3D:t=Bi.PerspectiveCameraMode.View3D;break;case Sm.Roamer:t=Bi.PerspectiveCameraMode.Roamer}xB().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=xB().getStateManager().scene3D;switch(e){case wm.UP:case wm.FRONT:t=Bi.ArrowType.UP;break;case wm.DOWN:case wm.BACK:t=Bi.ArrowType.DOWN;break;case wm.LEFT:t=Bi.ArrowType.LEFT;break;case wm.RIGHT:t=Bi.ArrowType.RIGHT}if(t){if(e===wm.UP||e===wm.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&xm(t.prototype,r),n&&xm(t,n),o}(Av);function km(e){return(km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Um(e,t){return(Um=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ym(e);if(t){var i=Ym(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vm(this,r)}}function Vm(e,t){return!t||"object"!==km(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ym(e){return(Ym=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Um(e,t)}(o,e);var t,r,n,i=jm(o);function o(){return Nm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){dy().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){dy().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){dy().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Gm(t.prototype,r),n&&Gm(t,n),o}(Av);function Km(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function qm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Km(o,n,i,A,a,"next",e)}function a(e){Km(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zm(e,t){return(zm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$m(e);if(t){var i=$m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zm(this,r)}}function Zm(e,t){return!t||"object"!==eQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $m(e){return($m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eQ(e){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tQ,rQ,nQ=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eQ(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},iQ=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":eQ(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},oQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zm(e,t)}(a,e);var t,r,n,i,o,A=Xm(a);function a(){return Jm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=qm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=qm(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dy().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(Rt.map)(n.intersectedGroups,(function(e){return Uh(Uh({},e),{},{intersecteds:Object(Rt.map)(e.intersecteds,(function(e){return Object(Rt.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=me),dy().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return dy().viewParamModel.getParamModelPhotoData(e)}}])&&Wm(t.prototype,r),n&&Wm(t,n),a}(Av);function AQ(e){return(AQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uQ(e,t){return(uQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gQ(e);if(t){var i=gQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lQ(this,r)}}function lQ(e,t){return!t||"object"!==AQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gQ(e){return(gQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}nQ([Ie.observeAsyncApiDeco({serviceName:"ModelService"}),iQ("design:type",Function),iQ("design:paramtypes",["function"!=typeof!1&&Object]),iQ("design:returntype","function"==typeof(tQ="undefined"!=typeof Promise&&Promise)?tQ:Object)],oQ.prototype,"getParamData",null),nQ([Ie.observeAsyncApiDeco({serviceName:"ModelService"}),iQ("design:type",Function),iQ("design:paramtypes",["function"!=typeof!1&&Object]),iQ("design:returntype","function"==typeof(rQ="undefined"!=typeof Promise&&Promise)?rQ:Object)],oQ.prototype,"getParamIntersected",null);var fQ,hQ,pQ=function(){return dy().select},dQ=function(){return dy().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(fQ||(fQ={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(hQ||(hQ={}));var IQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uQ(e,t)}(o,e);var t,r,n,i=cQ(o);function o(){var e;return aQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(Rt.castArray)(e).map((function(e){var t={__sceneId:Xf.SCENE_ID,entityId:e.id,entityType:cA};return e.type===hQ.CASBIN&&(t.entityId=dQ().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){wt.emit(bt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=pQ().state.state.selectedData,t=dy().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof It&&r.isAppendHardware)return{data:[r.hardwareData],type:fQ.CASBIN};var n=Object(Rt.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:fQ.MODEL}}return{data:[],type:fQ.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);pQ().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);pQ().unSelect(t)}else pQ().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,pQ().on(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),wt.on(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){wt.off(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),wt.once(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){pQ().off(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&sQ(t.prototype,r),n&&sQ(t,n),o}(Av);function yQ(e){return(yQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BQ(e,t){return(BQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QQ(e);if(t){var i=QQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mQ(this,r)}}function mQ(e,t){return!t||"object"!==yQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QQ(e){return(QQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bQ=function(){return dy().select},_Q=function(){return xB().designModeContext},SQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BQ(e,t)}(o,e);var t,r,n,i=vQ(o);function o(){var e;return CQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){wt.on(bt.PLANK_FACE_CLICK,e)},once:function(e){wt.once(bt.PLANK_FACE_CLICK,e)},off:function(e){wt.off(bt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){wt.on(bt.PLANK_FACE_HOVER,e)},once:function(e){wt.once(bt.PLANK_FACE_HOVER,e)},off:function(e){wt.off(bt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){wt.emit(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return bQ().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(Rt.castArray)(e).map(this._genEntityFromElement);bQ().select(t),_Q().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Rt.castArray)(e).map(this._genEntityFromElement);bQ().unSelect(t);var r=_Q().getCurSelectEntity();r&&(Array.isArray(r)?_Q().setCurSelectEntity(Object(Rt.difference)(r,t)):t.includes(r)&&_Q().setCurSelectEntity(void 0))}else bQ().select(),_Q().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),wt.on(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){wt.off(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),wt.once(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,bQ().on(hy.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:kB[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof It?t=e.isAppendHardware?be.HARDWARE:be.PARAM_MODEL:e instanceof _t?t=be.PARAM_MODEL_ASSEMBLY:e instanceof Jr?t=be.HARDWARE_GROOVE:e instanceof yr&&(t=e.type===c.HOLE?be.HOLE:be.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){bQ().off(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&EQ(t.prototype,r),n&&EQ(t,n),o}(Av);function wQ(e){return(wQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function RQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){DQ(o,n,i,A,a,"next",e)}function a(e){DQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function MQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PQ(e,t){return(PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LQ(e);if(t){var i=LQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FQ(this,r)}}function FQ(e,t){return!t||"object"!==wQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LQ(e){return(LQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PQ(e,t)}(u,e);var t,r,n,i,o,A,a=TQ(u);function u(){return MQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=RQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=RQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=xB().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){dy().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){dy().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){dy().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=RQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&xQ(t.prototype,r),n&&xQ(t,n),u}(Av),kQ=r(244);function NQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function GQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?NQ(Object(r),!0).forEach((function(t){UQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function UQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jQ(e){return function(e){if(Array.isArray(e))return VQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return VQ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var HQ=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=zt()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,jQ(a.map((function(e){return e.loops}))))};if(A){Object(kQ.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return qQ(Qe.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,jQ(t.loops.slice(1))),e}),[]).map((function(e){return qQ(Qe.INNER,e,!0)})),p=new e(this.modelID,[].concat(jQ(f),jQ(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=KQ(this.paths.find((function(e){return e.type===Qe.OUTER})));Object(kQ.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(KQ)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&YQ(t.prototype,r),n&&YQ(t,n),e}();function KQ(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==_.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function qQ(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new wr({type:_.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:S.SEGMENT}:e instanceof u.Arc2d?JQ(e):WQ(e),new Qr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=XQ(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new Tr({type:e,points:n,lines:i,forceCCW:!1})}function JQ(e){var t={};t.type=S.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function WQ(e){var t={};return t.type=S.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function zQ(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?vc(r,n):function(e,t){var r=dc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Ic(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=GQ(GQ({},e.changeMap),{},{update:[]}))}function XQ(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function ZQ(e){return(ZQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tb(e,t){return(tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ib(e);if(t){var i=ib(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nb(this,r)}}function nb(e,t){return!t||"object"!==ZQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ib(e){return(ib=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ob=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tb(e,t)}(o,e);var t,r,n,i=rb(o);function o(){return $Q(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(Fr(Qe.OUTER,r.path)),n.push.apply(n,jQ(r.holes.map((function(e){return Fr(Qe.INNER,e)})))),new HQ(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){zQ(e)}}])&&eb(t.prototype,r),n&&eb(t,n),o}(Av);function Ab(e){return(Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ab(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function sb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ub(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cb(e,t){return(cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fb(e);if(t){var i=fb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gb(this,r)}}function gb(e,t){return!t||"object"!==Ab(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fb(e){return(fb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cb(e,t)}(a,e);var t,r,n,i,o,A=lb(a);function a(){return sb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ab(o,r,n,A,a,"next",e)}function a(e){ab(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&ub(t.prototype,r),n&&ub(t,n),a}(Av);function pb(e){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ib(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yb(e,t){return(yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bb(e);if(t){var i=Bb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Eb(this,r)}}function Eb(e,t){return!t||"object"!==pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bb(e){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yb(e,t)}(o,e);var t,r,n,i=Cb(o);function o(){return db(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;xB().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){xB().designModeContext.registerMultiSelectShortcut(e)}}])&&Ib(t.prototype,r),n&&Ib(t,n),o}(Av),mb=r(428),Qb=r.n(mb),bb=new Ei.I18NManager,_b="custom_order_split",Sb={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function wb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Db(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wb(o,n,i,A,a,"next",e)}function a(e){wb(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Rb=Object(Rt.once)((function(){return!!Object(mc.parseServQueryParams)()}));function Mb(){return xb.apply(this,arguments)}function xb(){return(xb=Db(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=mc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:mc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:mc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pb=r(531),Tb=r.n(Pb),Fb=r(1126),Lb=r.n(Fb);function Ob(e){return(Ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Gb(e,t){return(Gb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vb(e);if(t){var i=Vb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jb(this,r)}}function jb(e,t){return!t||"object"!==Ob(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gb(e,t)}(o,e);var t,r,n,i=Ub(o);function o(){return kb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return mi.a.createElement("div",{className:Tb()(Lb.a.empty,i)},!r&&mi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&mi.a.createElement("p",null,t))}}])&&Nb(t.prototype,r),n&&Nb(t,n),o}(mi.a.PureComponent);function Hb(e){return(Hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jb(e,t){return(Jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xb(e);if(t){var i=Xb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zb(this,r)}}function zb(e,t){return!t||"object"!==Hb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xb(e){return(Xb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jb(e,t)}(o,e);var t,r,n,i=Wb(o);function o(){return Kb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return mi.a.createElement(Bi.Scene3D,e)}}])&&qb(t.prototype,r),n&&qb(t,n),o}(vi.PureComponent),$b=r(1127),e_=r.n($b);function t_(e){return(t_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r_(){return(r_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o_(e,t){return(o_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=s_(e);if(t){var i=s_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a_(this,r)}}function a_(e,t){return!t||"object"!==t_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s_(e){return(s_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}vi.PureComponent;var u_=r(91);function c_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l_(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=mi.a;var g_=document.getElementById("root");function f_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function p_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){h_(o,n,i,A,a,"next",e)}function a(e){h_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function d_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I_=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(de.ZH_CN,{zh_CN:Sb}),function(e){yf=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return wt.on(bt.API_CALLED,e),function(){return wt.off(bt.API_CALLED,e)}},once:function(e){return wt.once(bt.API_CALLED,e),function(){return wt.off(bt.API_CALLED,e)}},emit:function(e){wt.emit(bt.API_CALLED,e)}};Ie.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(ug);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return Rb()}},{key:"start",value:(o=p_(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInCustomMiniAppMode()){e.next=7;break}if(mc.sappSDK.isStarted){e.next=4;break}return e.next=4,mc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=p_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 4:this.sappSDK=mc.sappSDK,e.next=10;break;case 7:return e.next=9,Mb(t);case 9:this.sappSDK=e.sent;case 10:return this.startOnApiCalledEvent(),e.next=13,Promise.resolve([Bi.App,Hv]).then((function(e){var t=c_(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(g_)})).catch((function(e){Object(u_.unmountComponentAtNode)(g_),Object(u_.render)(mi.a.createElement(Yb,null),g_),console.error("micros/pad",e)}));case 13:return(r=this.getCustomMiniAppService(Ag))?(nc().setMiniAppHttpProxyClientService(r),Sf(nc())):Sf(rc()),(Ef=new _f.AttachedService).config.setRequestClient(vf),Bf=new _f.ParamModelDataService({paramModelConstructor:It,requestClient:vf}),new _f.ParamModelAssemblyDataService({paramModelAssemblyConstructor:_t,requestClient:vf}),n=this.getService(OQ),e.prev=17,e.next=20,n.viewSelected();case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(17),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 25:case"end":return e.stop()}}),e,this,[[17,22]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Rt.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),Qb.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:mb.ENUM.TranslatorType.I18next,packages:[_b],resource:f_({},_b,t)}),bb.init({namespace:_b,resources:_b})}},{key:"stop",value:(i=p_(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(ag))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(Rt.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(Av.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof mc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&d_(t.prototype,r),n&&d_(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1119),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},L=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function O(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=O(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(726),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new L(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|