@manycore/custom-sdk 1.7.0-rc.0 → 1.8.0-rc.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.
Files changed (3) hide show
  1. package/index.d.ts +69 -4
  2. package/index.js +10 -10
  3. package/package.json +8 -3
package/index.js CHANGED
@@ -63,17 +63,17 @@ 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 o(A,a){if(!r[A]){if(!t[A]){if(i)return i(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 o(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var i=!1,A=0;A<n.length;A++)o(n[A]);return o}({1:[function(e,t,n){(function(e){"use strict";var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,A=new o(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=i=++i%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 o(){}var i={},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!==o&&p(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 i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.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 p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var A=h((function(){t(o,n)}));"error"===A.status&&n(A.value)}function h(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(o);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){i.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){i.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=h(f,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=s,e.outcome=t;for(var o=-1,A=e.queue.length;++o<A;)e.queue[o].callFulfilled(t)}return e},i.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:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.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(o);++s<r;)c(e[s],s);return u;function c(e,o){t.resolve(e).then((function(e){A[o]=e,++a!==r||n||(n=!0,i.resolve(u,A))}),(function(e){n||(n=!0,i.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(o);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,i.resolve(s,e))}),(function(e){n||(n=!0,i.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)},o=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 i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;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={},p=Object.prototype.toString;function h(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=i([""]);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 i=[e.name];t&&i.push(e.version);var A=o.open.apply(o,i);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,o=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),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function m(e){return i([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),o=0;o<t;o++)n[o]=e.charCodeAt(o);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 o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===o.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 o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._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 o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(o)}}var w={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var o=f[r.name];o||(o={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var i=[];function a(){return A.resolve()}for(var s=0;s<o.forages.length;s++){var u=o.forages[s];u!==t&&i.push(u._initReady().catch(a))}var c=o.forages.slice(0);return A.all(i).then((function(){return r.db=o.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=o.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var i=c[n];i!==t&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}}))},_support:function(){try{if(!o||!o.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(o,i){if(o)return n(o);try{var A=i.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 o=e(n,r.key,a++);void 0!==o?t(o):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(o,i){if(o)return n(o);try{var A=i.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 o=new A((function(r,o){var i;n.ready().then((function(){return i=n._dbInfo,"[object Blob]"===p.call(t)?h(i.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(i,A){if(i)return o(i);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;o(e)}}catch(e){o(e)}}))})).catch(o)}));return s(o,r),o},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(o,i){if(o)return n(o);try{var A=i.objectStore(r._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){n(A.error)},i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){r(i.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(o,i){if(o)return n(o);try{var A=i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];i.onsuccess=function(){var t=i.result;t?(A.push(t.key),t.continue()):e(A)},i.onerror=function(){r(i.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,i=this;if(e.name){var a=e.name===r.name&&i._dbInfo.db,u=a?A.resolve(i._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var o=0;o<n.length;o++)n[o]._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],i=n.forages;t.close();for(var a=0;a<i.length;a++){var s=i[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var i=o.open(e.name,r);i.onerror=function(e){i.result.close(),n(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<i.length;t++){var r=i[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 i=0;i<n.length;i++)n[i]._dbInfo.db=null;return new A((function(t,r){var n=o.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}},S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,o,i,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=S.indexOf(e[t]),n=S.indexOf(e[t+1]),o=S.indexOf(e[t+2]),i=S.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|o>>2,c[s++]=(3&o)<<6|63&i;return u}function F(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=S[r[t]>>2],n+=S[(3&r[t])<<4|r[t+1]>>4],n+=S[(15&r[t+1])<<2|r[t+2]>>6],n+=S[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 O={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,o="__lfsc__:";e instanceof ArrayBuffer?(n=e,o+="arbf"):(n=e.buffer,"[object Int8Array]"===r?o+="si08":"[object Uint8Array]"===r?o+="ui08":"[object Uint8ClampedArray]"===r?o+="uic8":"[object Int16Array]"===r?o+="si16":"[object Uint16Array]"===r?o+="ur16":"[object Int32Array]"===r?o+="si32":"[object Uint32Array]"===r?o+="ui32":"[object Float32Array]"===r?o+="fl32":"[object Float64Array]"===r?o+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(o+F(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+F(this.result);t("__lfsc__:blob"+r)},i.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 o=r.match(D);t=o[1],r=r.substring(o[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return i([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:F};function T(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,o,i){e.executeSql(r,n,o,(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?i(e,A):T(e,t,(function(){e.executeSql(r,n,o,i)}),i)}),i):i(e,A)}),i)}function k(e,t,r,n){var o=this;e=c(e);var i=new A((function(i,A){o.ready().then((function(){void 0===t&&(t=null);var a=t,s=o._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(k.apply(o,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(i,r),i}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 o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);t({db:e,storeNames:o})}),(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 o=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(o){T(o,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=O,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,A=i.length,a=0;a<A;a++){var s=i.item(a),u=s.value;if(u&&(u=o.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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"DELETE FROM "+o.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){L(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){L(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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT key FROM "+o.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){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).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,o=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?o._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 o(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var i=[],a=0,s=e.storeNames.length;a<s;a++)i.push(o(e.storeNames[a]));A.all(i).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 Y={_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=O,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,o=n.length,i=localStorage.length,A=1,a=0;a<i;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(o),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 o=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(o,i){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)i(n);else try{localStorage.setItem(A.keyPrefix+e,t),o(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return s(o,r),o},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=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&n.push(i.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,o=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,o._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}},V=function(e,t){for(var r,n,o=e.length,i=0;i<o;){if((r=e[i])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;i++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},J={},q={INDEXEDDB:w,WEBSQL:G,LOCALSTORAGE:Y},W=[q.INDEXEDDB._driver,q.WEBSQL._driver,q.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),q)if(q.hasOwnProperty(r)){var n=q[r],o=n._driver;this[r]=o,K[o]||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,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(o);for(var i=X.concat("_initStorage"),a=0,u=i.length;a<u;a++){var c=i[a];if((!V(z,c)||e[c])&&"function"!=typeof e[c])return void r(o)}!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 o=z[r];e[o]||(e[o]=t(o))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,J[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(O);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 o=this._getSupportedDrivers(e);function i(){n._config.driver=n.driver()}function a(e){return n._extend(e),i(),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=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var o=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(o).then(a).catch(r)}i();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(o)}))})).catch((function(){i();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!!J[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 o=e[r];this.supports(o)&&t.push(o)}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():(o=[],void 0===(i="function"==typeof(n=A)?n.apply(t,o):n)||(e.exports=i))}).call(this,r(140))},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(3),o=r(134),i=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}(o.default);t.default=i},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(966)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return o.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(3),o=r(281),i=r(1990),A=r(658),a=r(2),s=r(1033);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}(o.BackupItem);function l(e,t,r){var o=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)o.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=i.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var o=e+r;return n.monitoredRequestedKeySet.has(o)?t:(n.monitoredRequestedKeySet.add(o),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,o=this.getDocumentsSortedByPriority(t.getDocFetchPriority),i=new Map;return o.reduce((function(t,o){return t.then((function(){var t=[];return o.documents.forEach((function(o){if(void 0!==o.fetch){var A=n.monitorSourceFetch(o.key,o.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),i.set(o.key,A)}})),Promise.all(t)}))}),Promise.resolve()),i},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=i.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 o=e.reload;return o?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,o(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(),o={actionId:r};return t&&(o=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,o)})))}))},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,o={};return t=this.documentSources,r=function(t,r){var n=e(t);o[n]||(o[n]=[]),o[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(o).map((function(e){var t=parseFloat(e);return{priority:t,documents:o[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}(o.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1991),o=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=o},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,i){return(0,o.__assign)((0,o.__assign)({},i),{value:function(){for(var t,r,o=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=i.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(o,A)}))};try{var c=null===(r=i.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 o=r(3);var i=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 i=this.changeStack[this.changeStack.length-1];if(i.scope.alive)break;this.changeStack.pop(),n.push(i)}try{for(var A=(0,o.__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 i(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,i.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(3),o=r(2),i=r(1064),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,o.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(1021)},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(1065)},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(230)},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(1998)},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(1040)},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(2e3)},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,o.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!(o=this.props,A=e,a=t,s=Object.keys(o),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||i)(o[e],A[e])}))&&(0,n.default)(this.state,r));var o,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,o.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 i(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,o.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]})),o=Object.keys(t).filter((function(e){return!r[e]}));return n.length===o.length&&n.every((function(r){return i(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(255),o=r(179);function i(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 o.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return o.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return i.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(230),o=r(415),i=r(176),A=r(202)},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 o.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return i.Feature}});var n=r(412),o=r(669),i=r(1002)},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(1066)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),o=r(507),i=r(2009),A=r(690),a=r(691),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,i){var A;if(void 0===r&&(r=!1),i){if(i.customUnitInfo){if((0,a.getQuantityTypeForUnit)(i.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)(i.customUnitInfo.unitType),n=i.customUnitInfo.precision}if(i.customBaseUnit){if((0,a.getQuantityTypeForUnit)(i.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,i.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&&o.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&o.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 o;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}o=(0,a.getUnitInstance)(n.customUnit)}if(!o){var i=this.getGlobalUnitInfo(t);i&&(o=i.unit)}if(o){var A=o.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=i.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=i.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=i.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 o.LengthUnitType.mm:t=i.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case o.LengthUnitType.m:t=i.globalLengthUnitInfoMaps.metricSystem.meter;break;case o.LengthUnitType.ft:t=i.globalLengthUnitInfoMaps.imperialSystem.foot;break;case o.LengthUnitType.in:t=i.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 o.AreaUnitType.sqMm:t=i.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case o.AreaUnitType.sqM:t=i.globalAreaUnitInfoMaps.metricSystem.meter;break;case o.AreaUnitType.sqFt:t=i.globalAreaUnitInfoMaps.imperialSystem.foot;break;case o.AreaUnitType.mats:t=i.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case o.AreaUnitType.tsubo:t=i.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(203);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 o=n(r(2007)),i=r(508),A=n(r(2008)),a=new o.default("m",i.FACTORS.m2mm,i.regexMap.number,i.regexMap.meterText);t.meter=a;var s=new o.default("mm",i.FACTORS.mm2mm,i.regexMap.number,i.regexMap.millimeterText);t.millimeter=s;var u=new o.default("''",i.FACTORS.inch2mm,i.regexMap.number,i.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new o.default("ft²",i.FACTORS.sqft2sqmm,i.regexMap.number,i.regexMap.squareFootText);t.squareFoot=l;var g=new o.default("m²",i.FACTORS.sqm2sqmm,i.regexMap.number,i.regexMap.squareMeterText);t.squareMeter=g;var f=new o.default("mm²",i.FACTORS.sqmm2sqmm,i.regexMap.number,i.regexMap.squareMillimeterText);t.squareMillimeter=f;var p=new o.default("mats",i.FACTORS.mats2sqmm,i.regexMap.number,i.regexMap.matsText);t.mats=p;var h=new o.default("tsubo",i.FACTORS.tsubo2sqmm,i.regexMap.number,i.regexMap.tsuboText);t.tsubo=h},function(e,t,r){"use strict";var n=r(203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(73)),i=n(r(74)),A=r(1067),a=function(){function e(t,r,n,i){(0,o.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=i}return(0,i.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(203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(73)),i=n(r(74)),A=r(508),a=r(1067),s=function(){function e(){(0,o.default)(this,e),this.factor=0}return(0,i.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(507),o={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=o;var i={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=i;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 o.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return i.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(2011),o=r(415),i=r(2015),A=r(494)},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(2012)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2013),o=r(2014),i=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=o.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==o.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===o.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=o.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=o.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=o.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=o.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=o.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=o.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=i},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 o=t,i=r;if(n!==o){for(var A=[],a=o.length,s=n.length,u=0;u<a&&u<s;u++){if(o[u]!==(f=n[u]))break;A.push(i[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(o[l],i[l]);for(var g=u;g<s;g++){var f=n[g],p=c.get(f);void 0===p?A.push(e(f)):A.push(p)}}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(233)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(3),o=r(208),i=r(139),A=r(1068),a=r(1072),s=r(233),u=r(487),c=r(134),l=r(11),g=r(87);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 p={fpsDetectorEnabled:!0},h=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new o.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)({},p),t),this.started=!0;var o=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),o();var h=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(h.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return h.logger.fpsMerged(e)}}),h.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),h.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,i.config)({onError:h.logger.error}),h.stateManager.document.start(),h.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=h.getLayout();d=y&&l.createElement(y,null),I={logger:h.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:h.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=h}).call(this,r(82))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(3),o=r(134),i=r(2),A=r(11),a=r(87),s=r(505),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,i.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,o.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(3),o=r(208),i=r(1070),A=r(688),a=r(671),s=r(676),u=r(275),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 i.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}(o.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(343),o=r(3),i=r(229),A=r(1066),a=r(681),s=r(11),u=r(233),c=r(1073),l=r(1074);r(2022);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,o.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var p=null;try{p=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===p||null===p&&(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,o.__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,o=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",o.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,o=(0,l.profiler)().dump(),i=Object.values(o.costs);e=[];for(var A=0,a=i.length;A<a;++A)n=i[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(o.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=o.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:o.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 i.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 i.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 h=g;t.default=h}).call(this,r(82))},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 o.default}});var n=r(2024),o=r(2029)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),o=r(136),i=r(79),A=r(1075),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)([o.default],t)}(i.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(8),o=r(12),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,o=t.opacity,i=e.NORMAL_BOX;this.opacity=o,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:o||1});var A=new n.Mesh(i,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),o&&o<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,o=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:o,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,i=t.scale,A=void 0===i?o.SCALE_ONE:i,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=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2027),o=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=o},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(3),o=r(8),i=r(88),A=r(4),a=r(228),s=r(79);function u(e){var t=e.size,r=new o.BoxBufferGeometry(t.x,t.y,t.z),n=new o.EdgesBufferGeometry(r,1),i=new o.LineBasicMaterial({color:16722688,depthTest:!1});return new o.LineSegments(n,i)}function c(e,t){var r=t.position,n=t.pivot,o=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)(o)),e.rotation.copy((0,a.eulerToThree)((new i.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(3),o=r(34),i=r(1075),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new i.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)([o.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(3),o=r(134),i=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,o.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),i);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1086);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2033);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(2034);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[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__(1086),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 o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(78),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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2036);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1081);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(693);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1082);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1083);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(692);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1084);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1085);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,o=r(322),i=r(693);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(5)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return o.tci.enabled?i.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(5)).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(5)).leaveModule)&&u(e)}).call(this,r(23)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2038);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2039);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1087);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(1088);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2040);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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(694),_util=__webpack_require__(78),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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(694),_util=__webpack_require__(78),_ServiceFramework=__webpack_require__(1088),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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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 o=t.serviceDescs.get(r);if(o||(o=[],t.serviceDescs.set(r,o)),o.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");o.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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1089);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2042);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1090);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(1091);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){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(870),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1089),_PerfLog=__webpack_require__(1090),_TimeLog=__webpack_require__(1091),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 o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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,o=e.timeLogConfig,i=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),o&&this.timeLog.addConfig(o),i&&i.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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(5)).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,o=e.description,i=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:o,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:i||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,o=e.description,i=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:o,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:i,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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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 o={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 i=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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var A=o?Object.getOwnPropertyDescriptor(e,i):null;A&&(A.get||A.set)?Object.defineProperty(r,i,A):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(30));t.interceptors=i;var A,a=(A=r(2046))&&A.__esModule?A:{default:A},s=r(1092),u=r(1093),c=r(2047);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2049);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(o,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=o,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=o(r)))}return function(t,r){var i,A,a;(0,n.isBoolean)(e)?(A=t[r],i=e):e.axios?(A=e.axios,i=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=o(A,i,a))}};var n=r(2);function o(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=i(r(1)),o=i(r(660));function i(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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw i}}}}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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 o.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return o.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),i=0;i<e;i++)r[i]=arguments[i];return u(t,void 0,void 0,n.default.mark((function e(){var t,i,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(o.default.wasmLoaded||!(i<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),i++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},i=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 o.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return o.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return o.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,i;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),i&&s(t,i),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(2048)},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 i(this,void 0,void 0,o.default.mark((function t(){var r,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,i=e.createStatusOptions,t.abrupt("return",r.then((function(e){return i(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return i(this,void 0,void 0,o.default.mark((function r(){var i,s,u,c,l,g,f;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},i=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(i,{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,o=(n=r(1))&&n.__esModule?n:{default:n};var i=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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,o=(n=r(1))&&n.__esModule?n:{default:n},i=r(99),A=r(348),a=r(2051),s=r(2052),u=r(2056),c=r(2058);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 p=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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())}))},h=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 p(this,void 0,void 0,o.default.mark((function r(){var n,A,a,s;return o.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 i.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof i.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 p(this,void 0,void 0,o.default.mark((function r(){return o.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 p(this,void 0,void 0,o.default.mark((function r(){return o.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=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=p(r(1)),o=p(r(574)),i=p(r(205)),A=r(1094),a=r(982),s=r(2),u=p(r(157)),c=r(696),l=r(695),g=r(1095),f=r(348);function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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=[],o=[],i=0,A=0,a=r.length;A<a;A++){var s=r[A];i+s.nodeNumber<=t?(i+=s.nodeNumber,o.push(s.model)):(n.push(o),o=[s.model],i=s.nodeNumber)}return o.length>0&&n.push(o),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 o=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 o.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(o,void 0,void 0,n.default.mark((function r(){var o,A,a,s,u,c,l,g,f,p,h,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 o=r.sent,A=o.isNew,a=o.nodeLimit,s=new i.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 o,i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return o=r.sent,r.next=5,e;case 5:return(i=r.sent).attachedModels.push(o.attachedModels),o.paramModelTasks.length>0&&(A=i.paramModelTasks).push.apply(A,I(o.paramModelTasks)),r.abrupt("return",i);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 p=r.sent,h=p.result,d=p.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(h),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(o,void 0,void 0,n.default.mark((function t(){var r,o,i,A,a,u,g,p,h,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,o=e.context,i=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,i);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:p=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:p=t.sent;case 15:return h=(0,s.map)(p.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(p,o);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:o,params:i,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:h});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 o.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,p;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,i,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,p,h,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 o(){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),i.push.apply(i,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),o,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,p=g.paramModelTasks,o.push.apply(o,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&p.length>0)){r.next=16;break}return A++,h=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,h;case 12:return r.next=14,u(p);case 14:r.next=17;break;case 16:i.push.apply(i,I((0,s.map)(p,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},o=[],i=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:o,errorParamModelIds:i});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,o,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/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,o=r.data,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(o).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);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,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-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);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 o;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 o=r.sent,t.addCustomResources(o),r.abrupt("return",o);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 i,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.getRootOrAccessory(),A=i.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},i=1;i<t.paramModelPath.length;i++){var A=n(i);if("object"===h(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 o.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),p&&d(t,p),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)),o=A(r(2053)),i=r(348);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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 p=new o.default({maxAge:36e5,max:200}),h=function(e,t,r){var n,o=u(e.keys());try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.split("_")[0]===t)if(i.split("_")[1].split(",").includes(r.toString())&&e.get(i))return i}}catch(e){o.e(e)}finally{o.f()}return""},d=function(e,t){return function(r,o,i){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=i===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var i,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=f.value,A=h(p,o,i),u=void 0,A?(s=A,u=p.get(s)):(s="".concat(o,"_").concat(c.toString()),u=e(c),p.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]===i})))&&a.push(g):l[i]&&(a[i]=l[i]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),p.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 o,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 o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return o=r.sent,A=o.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 o=r.sent,r.abrupt("return",o);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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,o=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(o,void 0,void 0,n.default.mark((function t(){var o,i,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.targetField,i=e.idField,A=e.handler,s=e.dataType,!(u=r[i]||[]).length){t.next=7;break}return t.next=5,A(u,o,s);case 5:c=t.sent,s===g.Array?r[o]=r[o]?[].concat(a(r[o]),a(c)):c:r[o]=r[o]?Object.assign(Object.assign({},r[o]),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),o&&s(t,o),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 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)}}var i=r(2054),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),h=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[h]=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[p]=new Map,this[f]=new i,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,o=this[s](t,e);if(this[p].has(e)){if(o>this[A])return B(this,this[p].get(e)),!1;var i=this[p].get(e).value;return this[l]&&(this[g]||this[l](e,i.value)),i.now=n,i.maxAge=r,i.value=t,this[a]+=o-i.length,i.length=o,this.get(e),E(this),!0}var u=new v(e,t,o,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[p].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1;var t=this[p].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[p].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],o=n.e||0;if(0===o)this.set(n.k,n.v);else{var i=o-t;i>0&&this.set(n.k,n.v,i)}}}},{key:"prune",value:function(){var e=this;this[p].forEach((function(t,r){return y(e,r,!1)}))}}])&&o(t.prototype,r),I&&o(t,I),e}(),y=function(e,t,r){var n=e[p].get(t);if(n){var o=n.value;if(C(e,o)){if(B(e,n),!e[u])return}else r&&(e[h]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return o.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[p].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,o,i,A){n(this,e),this.key=t,this.value=r,this.length=o,this.now=i,this.maxAge=A||0},m=function(e,t,r,n){var o=r.value;C(e,o)&&(B(e,r),e[u]||(o=void 0)),o&&t.call(n,o.value,o.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,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(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 i(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++)i(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,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.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 o=0;null!==n;o++)r=e(r,n.value,o),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 o=this.length-1;null!==n;o--)r=e(r,n.value,o),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 o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.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 o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.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 i=[];for(r=0;n&&r<t;r++)i.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=o(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return i},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(2055)(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(873)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,o=(n=r(205))&&n.__esModule?n:{default:n},i=r(114),A=r(2),a=r(348),s=r(2057);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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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),o=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(o)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var o=[];return n.length>0&&o.push(this.updateInstanceAttacheds(n,t)),r.length>0&&o.push(this.updateTemplateAttacheds(r,t)),Promise.all(o)}},{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,o=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return i.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&o.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(o)}},{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 o.default;n.addCustomResources(t);var i=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(i,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,o.default.mark((function n(){var A,a,s;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[i.__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[i.__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,o=(n=r(1))&&n.__esModule?n:{default:n},i=r(348);var A=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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(114),o=r(348),i=r(2059);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,o=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),o.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,i.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[o.__INTERNAL__getDefaultParams]()),r),i=this.config[o.__INTERNAL__chunkParamModels](e,n),A=i.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,i=this.config[o.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=i.find((function(t){return t.filter(e)})),o=t?t.attachHandler:r.modelHandler,A=n.get(o);void 0===A&&(A=[],n.set(o,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,i=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 o.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!i||!A)return;e.setPosition(i),e.setRotation(A)}};var n=i(r(115)),o=i(r(46));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(89);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2061);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(2066);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=h(r(1)),o=r(99),i=r(10),A=r(1094),a=h(r(4)),s=h(r(157)),u=r(2062),c=r(1096),l=r(696),g=r(695),f=r(1095),p=r(89);function h(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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 o,i,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 o=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 i=r.sent,a=A.dcs_model.PBParamModelViewData.decode(i.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=o,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,h;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(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.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,i=(new this.config.paramModelConstructor).parse(r.paramModelData,(new o.CoreCustomContext).addProduct(e)),(0,p.attach)(i,(0,p.toAttachedMap)(r)),i.setSize(this.calcSizeByProduct(i,e)),i.assignUniqueId(),(0,c.updatePositionByOffGround)(i,0),t.abrupt("return",i);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(i.ParamName.WIDTH),r&&r.y||e.getParsedValue(i.ParamName.DEPTH),r&&r.z||e.getParsedValue(i.ParamName.HEIGHT))}}])&&d(t.prototype,r),h&&d(t,h),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(390)),o=s(r(138)),i=s(r(88)),A=s(r(46)),a=s(r(4));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 i.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new o.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(99)},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 o.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,o=r(99),i=(n=r(4))&&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,o=r(99),i=r(836),A=r(459),a=(n=r(157))&&n.__esModule?n:{default:n},s=r(1096),u=r(696),c=r(89);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,i.parseAssembly)(a,new o.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 o=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,o=[];try{for(var i=n(this.intersections),A=i.next();!A.done;A=i.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&&o.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o},e}();t.default=o},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return WC})),r.d(t,"IntersectedService",(function(){return SE})),r.d(t,"CustomModelService",(function(){return kE})),r.d(t,"FittingModelService",(function(){return zE})),r.d(t,"ECameraMode",(function(){return qE})),r.d(t,"ECameraMoveDirection",(function(){return WE})),r.d(t,"ModelCameraService",(function(){return oB})),r.d(t,"ModelHintService",(function(){return gB})),r.d(t,"ModelService",(function(){return BB})),r.d(t,"ESelectedType",(function(){return DB})),r.d(t,"ESetSelectType",(function(){return RB})),r.d(t,"ModelViewerSelectionService",(function(){return xB})),r.d(t,"ModelViewerService",(function(){return jB})),r.d(t,"SceneService",(function(){return zB})),r.d(t,"Application",(function(){return Gv})),r.d(t,"EFittingType",(function(){return n})),r.d(t,"EIntersectedType",(function(){return o})),r.d(t,"EIntersectedCreatedType",(function(){return i})),r.d(t,"ELanguage",(function(){return A})),r.d(t,"EPointType",(function(){return a})),r.d(t,"ELineType",(function(){return s})),r.d(t,"EDesignMode",(function(){return u})),r.d(t,"ETriggerType",(function(){return c})),r.d(t,"EModelType",(function(){return l})),r.d(t,"KEYBOARD_KEY",(function(){return d})),r.d(t,"EToolType",(function(){return Su}));r(714),r(1319);var n,o,i,A,a,s,u,c,l,g=r(1),f=r.n(g),p=r(114),h=r(7);!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"}(n||(n={})),function(e){e.SHELL="1",e.FACE="2"}(o||(o={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(i||(i={})),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"}(A||(A={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(a||(a={})),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.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(u||(u={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(c||(c={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly"}(l||(l={}));var d=["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","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"],I=r(88),y=r.n(I),C=r(46),E=r.n(C),B=r(279),v=r.n(B),m=r(4),Q=r.n(m),b=r(99);function _(e){return(_="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 w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(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 o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return R(this,r)}}function R(e,t){return!t||"object"!==_(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 x=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&&S(e,t)}(r,e);var t=D(r);function r(){return w(this,r),t.apply(this,arguments)}return r}(b.CoreCustom),P=r(353),F=r(98),O=r.n(F),L=r(1098);function k(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,r){return(N="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=Y(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(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=Y(e);if(t){var o=Y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){return!t||"object"!==V(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 Y(e){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e){return(V="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 H,K=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":V(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},J=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":V(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},q=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&&G(e,t)}(i,e);var t,r,n,o=U(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).doc=new P.CDoc,e.versionStore=new L.VersionStore,e.setCustom(new x),e.setContextProvider(e.doc.getElementContext),e}return t=i,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return N(Y(i.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(),N(Y(i.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}}])&&k(t.prototype,r),n&&k(t,n),i}(O.a);K([Object(F.property)(),J("design:type","function"==typeof(H=void 0!==x&&x)?H:Object)],q.prototype,"custom",void 0);var W=r(123);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(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 Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(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=te(e);if(t){var o=te(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ee(this,r)}}function ee(e,t){return!t||"object"!==re(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 te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e){return(re="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 ne=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":re(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},oe=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":re(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ie=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&&Z(e,t)}(i,e);var t,r,n,o=$(i);function i(){var e;return z(this,i),(e=o.apply(this,arguments)).linkedIds=[],e}return t=i,(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}}])&&X(t.prototype,r),n&&X(t,n),i}(r.n(W).a);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)}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(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 o=ge(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return le(this,r)}}function le(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 ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ne([Object(F.property)(),oe("design:type",Boolean)],ie.prototype,"isAppendHardware",void 0);var 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&&ue(e,t)}(i,e);var t,r,n,o=ce(i);function i(){return ae(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"paramModelConstructor",get:function(){return ie}}])&&se(t.prototype,r),n&&se(t,n),i}(b.CoreParamModelAssembly),pe=r(34),he=r(2),de=r(509),Ie=Object(de.createKElementBaseClass)(),ye=pe.advanced.reportObserved,Ce=pe.advanced.reportChanged;function Ee(e){return function(e){if(Array.isArray(e))return Be(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 Be(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 Be(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 Be(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 ve(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 me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(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 o=_e(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return be(this,r)}}function be(e,t){return!t||"object"!==we(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 we(e){return(we="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)}Ie.onGet=function(e){ye(e)},Ie.addSetHook((function(e){Ce(e)}));var Se=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":we(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},De=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":we(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Re=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&&me(e,t)}(i,e);var t,r,n,o=Qe(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e}return t=i,(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(Ee(e),Ee(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(he.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(Ee(this.grooveFittings),Ee(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}}])&&ve(t.prototype,r),n&&ve(t,n),i}(Ie);Se([pe.observable,De("design:type",Array)],Re.prototype,"fittings",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"intersects",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"grooveFittings",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"plankFaceHintModels",void 0);var Me=r(49),xe=r.n(Me),Pe=r(280),Fe=r.n(Pe);function Oe(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 Te(e,t){return(Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(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=Ne(e);if(t){var o=Ne(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ke(this,r)}}function ke(e,t){return!t||"object"!==Ge(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 Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ge(e){return(Ge="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 Ue,je,Ye,Ve,He=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ge(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ke=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ge(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=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&&Te(e,t)}(A,e);var t,r,o,i=Le(A);function A(e,t,r,o){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(a=i.call(this)).fittingData=o,a.visible=!1,a.viewColor=0;var s=r.position,u=r.size,c=r.rotate,l=r.height;return a.id=e||Fe()(),a.position=s instanceof Q.a?s:new Q.a(s),a.size=u instanceof Q.a?u:new Q.a(u),a.rotate=c instanceof Q.a?c:new Q.a(u),a.height=l,a.type="fittingType"in o?o.fittingType:n.INTERSECTED,a.visible=a.type!==n.INTERSECTED,a.linkParamModelId=t,a}return t=A,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}}])&&Oe(t.prototype,r),o&&Oe(t,o),A}(Ie);He([xe.a,Ke("design:type",String)],Je.prototype,"id",void 0),He([xe.a,Ke("design:type","function"==typeof(Ue=void 0!==Q.a&&Q.a)?Ue:Object)],Je.prototype,"position",void 0),He([xe.a,Ke("design:type","function"==typeof(je=void 0!==Q.a&&Q.a)?je:Object)],Je.prototype,"size",void 0),He([xe.a,Ke("design:type",Number)],Je.prototype,"height",void 0),He([xe.a,Ke("design:type","function"==typeof(Ye=void 0!==n&&n)?Ye:Object)],Je.prototype,"type",void 0),He([xe.a,Ke("design:type","function"==typeof(Ve=void 0!==Q.a&&Q.a)?Ve:Object)],Je.prototype,"rotate",void 0),He([xe.a,Ke("design:type",Number)],Je.prototype,"radius",void 0),He([xe.a,Ke("design:type",Object)],Je.prototype,"visible",void 0),He([xe.a,Ke("design:type",Object)],Je.prototype,"viewColor",void 0);var qe=r(183),We=r.n(qe);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 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 o=et(this).constructor;r=Reflect.construct(n,arguments,o)}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,ot,it,At,at=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},st=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ut=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)}(i,e);var t,r,n,o=Ze(i);function i(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,i),(u=o.call(this)).viewColor=0,u.id=e||Fe()(),u.position=r instanceof Q.a?r:new Q.a(r),u.size=A instanceof Q.a?A:new Q.a(A),u.rotate=n instanceof Q.a?n:new Q.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=i,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&ze(t.prototype,r),n&&ze(t,n),i}(Ie);at([xe.a,st("design:type",String)],ut.prototype,"id",void 0),at([xe.a,st("design:type","function"==typeof(rt=void 0!==o&&o)?rt:Object)],ut.prototype,"type",void 0),at([xe.a,st("design:type","function"==typeof(nt=void 0!==Q.a&&Q.a)?nt:Object)],ut.prototype,"position",void 0),at([xe.a,st("design:type","function"==typeof(ot=void 0!==Q.a&&Q.a)?ot:Object)],ut.prototype,"size",void 0),at([xe.a,st("design:type","function"==typeof(it=void 0!==Q.a&&Q.a)?it:Object)],ut.prototype,"rotate",void 0),at([xe.a,st("design:type","function"==typeof(At=void 0!==We.a&&We.a)?At:Object)],ut.prototype,"geometryModel",void 0),at([xe.a,st("design:type",Array)],ut.prototype,"originPoints",void 0),at([xe.a,st("design:type",Object)],ut.prototype,"viewColor",void 0);var ct=r(15),lt=r.n(ct);function gt(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||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,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 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 pt(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 ht=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.path=r}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 h.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new h.Vector2d}},{key:"getRealLine",value:function(){var e=gt(this.start.getPointsForRender(),2)[1],t=gt(this.end.getPointsForRender(),1)[0];return this.getType()===s.SEGMENT?new h.LineSeg2d(e,t):this.getCurveLine()}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==s.CIRCLE_ARC)return new h.LineSeg2d(e.getPosition(),t.getPosition());var r,n,o,i,A,a,u,c,l,g,f,p=this.getVector().length/2;return this.radius<p&&(this.radius=p),r=this.radius,n=e.getPosition(),o=t.getPosition(),i=this.minorArc,A=this.clockwise,a=new h.LineSeg2d(n,o),u=a.length/2,c=a.getPoint(u),l=Math.sqrt(r*r-u*u),g=(A?i?a.rightNormal:a.leftNormal:i?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),h.Arc2d.makeArcByStartEndPoints(f,n,o,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new h.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}}])&&pt(t.prototype,r),n&&pt(t,n),e}();function dt(e){return function(e){if(Array.isArray(e))return Ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||yt(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 It(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=yt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function yt(e,t){if(e){if("string"==typeof e)return Ct(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)?Ct(e,t):void 0}}function Ct(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 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)}}var Bt=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()===a.NONE&&(e=e.concat(t.getPosition())),t.getType()===a.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==a.CIRCLE&&t.getType()!==a.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===s.CIRCLE_ARC){var o=n.getCurveLine().getApproximatePoints();e=e.concat(o.slice(1,o.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),o=[],i=It(t);try{for(i.s();!(e=i.n()).done;){var A=e.value;A.getType()!==a.NONE&&o.push(A.getCurveLineAndPoints().curveLine)}}catch(e){i.e(e)}finally{i.f()}var s,u=It(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;o.push(c.getRealLine())}}catch(e){u.e(e)}finally{u.f()}return o},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new h.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new h.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.points,o=void 0===n?[]:n,i=t.lines,A=void 0===i?[]:i,u=t.forceCCW,c=void 0===u||u,l=t.depth,g=t.matrix4;if(this.depth=l,this.matrix4=g,this.setPoints(o),this.setLines(A),this.linkPointsAndLines(),c){var f=h.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));f.isSelfIntersect()||f.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,o){n.start=void 0,n.end=void 0;var i,A=r[o];i=o===t.length-1&&e.isClosedPath()?r[0]:r[o+1],n.path=e,A.path=e,i.path=e,A.nextLine=n,i.prevLine=n,n.start=A,n.end=i}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==a.NONE?e.push.apply(e,dt(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())!==a.NONE){var o=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;o&&e.push(o)}var i=t.getRealLine();e.push(i)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new h.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new h.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==a.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=h.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,o){var i;n.getType()!==a.NONE&&(i={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=i?[i]:[];return e.concat(t[o]?[].concat(A,[r(t[o])]):[].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 o=this.getPoints().indexOf(e);if(-1===o)return[];var i=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(o+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==s.SEGMENT?i.push(e):i.push(a))})),i}}])&&Et(t.prototype,r),n&&Et(t,n),e}();function vt(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mt(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 mt(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 mt(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 Qt(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 bt=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 h.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r}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()===a.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new h.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,o=void 0===n?new h.Vector2d(0,0):n,i=this.getType(),A=this.getPosition(),s=this.getPointsForRender(),u=vt(s,2),c=u[0],l=u[1];if(i===a.CIRCLE||i===a.CUT_CIRCLE){if(i===a.CIRCLE){var g=t.getVector().getPerpVector(),f=r.getVector().getPerpVector();if(g.isParallel(f))return{curveLine:h.Arc2d.makeArcByStartEndPoints(c,c,l,!0),renderPoints:s};var p=new h.Line2d(c,g),d=new h.Line2d(l,f),I=vt(p.intersectCurve(d),1)[0];if(!I)return{curveLine:new h.LineSeg2d(c,l),renderPoints:s};var y=h.Arc2d.makeArcByStartEndPoints(I.point,c,l,!1);return this.radius=void 0===this.radius?y.radius:this.radius,Math.abs(y.arcAngle)>Math.PI&&(y=h.Arc2d.makeArcByStartEndPoints(I.point,c,l,!0)),{curveLine:y,renderPoints:s}}return{curveLine:h.Arc2d.makeArcByStartEndPoints(A.added(o),c,l,!e),renderPoints:s}}return{curveLine:new h.LineSeg2d(c,l),renderPoints:s}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,o=void 0===n?[0,0]:n,i=this.offset,A=void 0===i?new h.Vector2d(0,0):i,s=this.getType(),u=this.getPosition();if(s===a.NONE)return[u,u];if(!t||!r)return[u,u];var c=new h.Ray2d(t.end.getPosition(),t.getVector().reversed()),l=new h.Ray2d(r.start.getPosition(),r.getVector());if(s===a.LINE)return[c.getPoint(o[0]),l.getPoint(o[1])];if(s===a.CIRCLE){if(void 0!==e){var g=c.direction,f=l.direction,p=g.angleTo(f),d=Math.abs(e/Math.tan(p/2));return[c.getPoint(d),l.getPoint(d)]}if(o)return[c.getPoint(o[0]),l.getPoint(o[0])]}if(s===a.CUT_CIRCLE){var I=u.added(A),y=new h.Circle2d(I,e),C=y.intersectCurve(c),E=y.intersectCurve(l);if(C.length&&E.length)return[C[0].point,E[0].point]}return[u,u]}}])&&Qt(t.prototype,r),n&&Qt(t,n),e}();function _t(e){return function(e){if(Array.isArray(e))return wt(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 wt(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 wt(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 wt(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 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 Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rt(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=xt(e);if(t){var o=xt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mt(this,r)}}function Mt(e,t){return!t||"object"!==Pt(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 xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e){return(Pt="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 Ft,Ot,Tt=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Lt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&Dt(e,t)}(A,e);var t,r,o,i=Rt(A);function A(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,o=e.path,a=e.model;return t.id=r.id,t.type=n.HARDWARE_GROOVE,t.path=o,t.depth=r.depth,t.model=a,t.linkParamModelId=a.id,t.fittingData=r,t}return t=A,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new h.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 h.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new h.Matrix4,t=this.model.getSize();return e.fromArray(_t(this.model.getConcatenatedMatrix().multiply((new E.a).makeTranslation(new Q.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:"setVisible",value:function(e){this.visible=e}}])&&St(t.prototype,r),o&&St(t,o),A}(Ie);function Nt(e,t){return(Nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gt(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=jt(e);if(t){var o=jt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ut(this,r)}}function Ut(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 jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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)}Tt([xe.a,Lt("design:type",String)],kt.prototype,"id",void 0),Tt([xe.a,Lt("design:type",Object)],kt.prototype,"viewColor",void 0),Tt([xe.a,Lt("design:type",Object)],kt.prototype,"visible",void 0),Tt([xe.a,Lt("design:type","function"==typeof(Ft=void 0!==n&&n)?Ft:Object)],kt.prototype,"type",void 0),Tt([xe.a,Lt("design:type","function"==typeof(Ot=void 0!==Bt&&Bt)?Ot:Object)],kt.prototype,"path",void 0),Tt([xe.a,Lt("design:type",Number)],kt.prototype,"depth",void 0);var Vt=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Yt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ht=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Yt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&Nt(e,t)}(r,e);var t=Gt(r);function r(e){var n,o;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!==(o=e.id)&&void 0!==o?o:Fe()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(Ie);function Jt(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]}}Vt([xe.a,Ht("design:type",String)],Kt.prototype,"id",void 0);var qt=[new h.Vector3d({x:1,y:0,z:0}),new h.Vector3d({x:0,y:1,z:0}),new h.Vector3d({x:0,y:0,z:1})];function Wt(e,t){var r,o,i,A=new h.BBox3d,a=function(e){A.addPoint(e)},s=t.getSize(),u=(new E.a).makeTranslation(new Q.a(-s.x/2,s.y/2,-s.z/2)),c=t.getConcatenatedMatrix().multiply(u),l=(new y.a).setFromRotationMatrix(c),g=new Q.a(l);if(!A)throw new Error("fitting is not validated!");if((i=e)&&i.fittingType===n.GROOVE)(function(e){var t=e.start,r=e.end,n=e.plankFaceId,o=e.depth,i=e.width,A=new h.Point3d(t),a=new h.Point3d(r),s=Jt(n,h.Vector3d).multiplied(o/2),u=s.cross(a.subtracted(A)).normalized().multiplied(i/2).added(s),c=u.reversed();return[A.added(u),A.added(c),a.added(u),a.added(c)]})(e).forEach(a),o=A.center;else if(function(e){return!(!e||e.fittingType!==n.HOLE)}(e)){(function(e){var t=e.start,r=e.end,n=e.plankFaceId,o=e.diameter,i=new h.Point3d(t),A=new h.Point3d(r),a=Jt(n,h.Vector3d).multiplied(o/2),s=a.cross(A.subtracted(i)).normalized().multiplied(o/2).added(a),u=s.reversed();return[i.added(s),i.added(u),A.added(s),A.added(u)]})(e).forEach(a);var f=new Q.a(e.start),p=new Q.a(e.end);o=f.clone().add(p).div(2);var d=p.sub(f);r=d.length();var I=(new v.a).setFromTwoVectors(Q.a.Y_AXIS,d.normalize()),C=c.clone().multiply((new E.a).makeRotationFromQuaternion(I));g=new Q.a((new y.a).setFromRotationMatrix(C))}var B=new Q.a(o).applyMatrix4(c),m=new Q.a(A.width,A.height,A.depth),b=new Je(e.id,t.id,{position:B,size:m,rotate:g,height:r},e);return b.setVisible(!0),b}function zt(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Xt(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 Xt(e,t){if(e){if("string"==typeof e)return Zt(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)?Zt(e,t):void 0}}function Zt(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 $t(e,t){var r,n=[],o=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Xt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}(Object(he.castArray)(e));try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i.id===t)return i;n.push.apply(n,zt(i.getChildNodes()))}}catch(e){o.e(e)}finally{o.f()}return n.length?$t(n,t):null}var er=r(703),tr=r(704),rr=r(10),nr=r(115),or=r.n(nr),ir=r(138),Ar=r.n(ir),ar=r(206),sr=r.n(ar),ur=r(113),cr=r.n(ur),lr=r(207),gr=r.n(lr),fr=r(421),pr=r.n(fr),hr=r(72),dr=r.n(hr),Ir=r(181),yr=r.n(Ir);function Cr(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&dr.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return dr.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new Q.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 yr.a).includePoints(e);t=new lt.a(r.min.x,r.max.y)}return e.map((function(e){return lt.a.sub(e,t)}))}(r,e.pivot),indices:n}}var Er=new Q.a(0,0,0);function Br(e){var t=e.planeTransform;return function(e){try{var t=Cr(e),r=new We.a;return r.vertices=new Float32Array(Q.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(Q.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(lt.a.toFloatArray(t.textures)),r.indices=new Uint16Array(Q.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 Er.set(e.x,e.y,0),t.localToWorld(Er)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function vr(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 mr(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 mr(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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}var Qr,br=new Q.a(0,0,0);function _r(e,t,r){for(var n,i=e.id,A=r.getConcatenatedMatrix(),a=r.getSize(),s=(new E.a).makeTranslation(new Q.a(-a.x/2,a.y/2,-a.z/2)),u=A.clone().multiply(s),c=t["@type"],l=(n=c===o.SHELL?function(e,t){var r,n=e.shell,o=er.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return tr.triangulate2(e)})),i=new We.a,A=0,a=[],s=[],u=[],c=[],l=vr(o);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return br.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 i.vertices=new Float32Array(a.flat()),i.normals=new Float32Array(s.flat()),i.textures=new Float32Array(u.flat()),i.indices=new Float32Array(c.flat()),i}(t,u):wr(t,u)).getBoundingBox3().getCenter(),g=or.a.decompose(u).rotation,f=or.a.compose(l,g,Q.a.ONE),p=(new E.a).getInverse(f),h=new Float32Array(n.vertices),d=new Ar.a,I=0;I<h.length;I+=3)br.set(h[I],h[I+1],h[I+2]).applyMatrix4(p),d.includePoint(br);return new ut(i,c,l,g,d.getSize(),n,t.points.map((function(e){return new Q.a(e).applyMatrix4(u)})))}function wr(e,t){var r=e.points.map((function(e){return new Q.a(e).applyMatrix4(t)})),n=(new sr.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,o=r[1].clone().sub(r[0]).normalize(),i=n.clone().cross(o).normalize(),A=new pr.a(o,i,n,r[0]),a=r.map((function(e){return new lt.a(A.worldToLocal(e))})),s=new cr.a(a);return Br({planeTransform:A,shapes:[new gr.a(s)]})}function Sr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(r),!0).forEach((function(t){Rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mr(e,t){var r=t.clone().inversed(),n=new Bt({id:e.id,points:e.points.map((function(e){return Dr(Dr({},e),{},{position:(t=e.position,n=new h.Point3d(t).appliedMatrix4(r),new h.Point2d(n))});var t,n})).map(xr),lines:e.lines.map(Pr),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function xr(e){return new bt(e)}function Pr(e){return new ht(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(Qr||(Qr={}));var Fr,Or,Tr,Lr=new h.Tolerance.Tolerance(.01,.01,.01);function kr(e){if(e.getType()===a.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 Nr(e){return e.type===s.SEGMENT||(!(e.type!==s.CIRCLE_ARC||!h.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==s.CIRCLE_ARC||!h.Num.isBigger(e.getVector().length,2*e.radius)))}function Gr(e){return e.type===Qr.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===Qr.LINE?e.val.getRealLine():void 0}function Ur(e,t){if(e.type===Qr.POINT&&e.val.getType()===a.NONE)return!0;if(t.type===Qr.POINT&&t.val.getType()===a.NONE)return!0;var r=Gr(e),n=Gr(t);if(!r||!n)return!1;var o=h.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Lr);return!(1===o.length&&!o[0].point.isEqual(r.startPoint,.01)&&!o[0].point.isEqual(r.endPoint,.01))&&(!(o.length>1)||o.every((function(e){return e.point.isEqual(o[0].point,.01)})))}function jr(e,t){var r=function(e,t){var r=Jt(e,h.Vector3d),n=qt.find((function(e){return 0===e.dot(r)})),o=r.clone().cross(n).normalized(),i=h.Matrix4.makeBasis(n,o,r);return t&&i.setTranslation(new h.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))),i}(e.plankFaceId,t.getSize()),n=new kt({data:e,path:Mr(e,r),model:t});return n.setVisible(!0),n}function Yr(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 Vr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hr(e,t){var r=t.findRelativeModel,n=t.transformModel,o=t.color;return Object(he.map)(e,(function(e,t){var i=r(t);return i?Object(he.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?Yr(Object(r),!0).forEach((function(t){Vr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),i);return o&&t.setViewColor(o),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}!function(e){e[e.willExit=0]="willExit"}(Fr||(Fr={})),function(e){e[e.exit=0]="exit"}(Or||(Or={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Tr||(Tr={}));var Kr,Jr,qr=r(59),Wr=r(22),zr=r(702),Xr=r(420);function Zr(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function $r(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Zr(i,n,o,A,a,"next",e)}function a(e){Zr(i,n,o,A,a,"throw",e)}A(void 0)}))}}function en(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||rn(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 tn(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=rn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function rn(e,t){if(e){if("string"==typeof e)return nn(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)?nn(e,t):void 0}}function nn(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 on(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"}(Kr||(Kr={})),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"}(Jr||(Jr={}));var An=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 zr.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(qr.throttleInRaf)((function(){Wr.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(Xr.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;Wr.Util.safeExec((function(){var t,r=tn(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;Wr.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;Wr.Util.safeExec((function(){var t,r=tn(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;Wr.Util.safeExec((function(){var t,r=tn(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];Wr.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(Kr.autoBackup)&&Wr.Util.safeExec((function(){n[Kr.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[Kr.autoBackup])}),!1),t.includes(Kr.transaction)&&Wr.Util.safeExec((function(){n[Kr.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(Kr.version)&&Wr.Util.safeExec((function(){n[Kr.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(Kr.modelBinding)&&Wr.Util.safeExec((function(){n[Kr.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(Kr.autoSave)&&Wr.Util.safeExec((function(){n[Kr.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,o={},i=tn(this.docs);try{for(i.s();!(r=i.n()).done;){var A=r.value;o[A.getId()]=this.interruptSingle(A,e)}}catch(e){i.e(e)}finally{i.f()}return this.keyCache.add(o),t&&setTimeout((function(){return n.resume(o)}),t),o}},{key:"resumeSingle",value:function(e,t){var r=this;t[Kr.autoBackup]&&Wr.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[Kr.autoBackup])}),!1),t[Kr.transaction]&&Wr.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[Kr.transaction])})),t[Kr.version]&&Wr.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[Kr.version])})),t[Kr.modelBinding]&&Wr.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[Kr.modelBinding])})),t[Kr.autoSave]&&Wr.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[Kr.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=tn(this.docs);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o.getId()];i&&this.resumeSingle(o,i)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;en(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]:[Kr.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Jr.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return function(){var i={};try{i=o.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{o.resume(i,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Kr.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Jr.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return $r(f.a.mark((function i(){var A,a,s,u,c,l=arguments;return f.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(A={},i.prev=1,A=o.interrupt(t,n),a=l.length,s=new Array(a),u=0;u<a;u++)s[u]=l[u];return i.next=6,e.apply(this,s);case 6:return c=i.sent,i.abrupt("return",c);case 8:return i.prev=8,o.resume(A,r),i.finish(8);case 11:case"end":return i.stop()}}),i,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(Jr.mergeRecorder)&&this.mergeRecorder(),e.includes(Jr.requestBackup)?this.requestBackup():e.includes(Jr.forceBackup)?this.forceBackup():e.includes(Jr.revert)&&this.revert(),e.includes(Jr.notifyModelChange)&&this.notifyModelChange(),e.includes(Jr.autoSave)?this.save(!0):e.includes(Jr.save)&&this.save()}}])&&on(t.prototype,r),n&&on(t,n),e}(),an=r(510),sn=r.n(an),un=r(12),cn=r(281);function ln(e){return(ln="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 gn(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 fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pn(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=dn(e);if(t){var o=dn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hn(this,r)}}function hn(e,t){return!t||"object"!==ln(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 dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var In=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&&fn(e,t)}(i,e);var t,r,n,o=pn(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).model=e,t}return t=i,(r=[{key:"toModel",value:function(){return this.model}}])&&gn(t.prototype,r),n&&gn(t,n),i}(un.BackupItem);var yn=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=In,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===cn.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===cn.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===cn.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 Cn(e){return(Cn="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 En(e){return function(e){if(Array.isArray(e))return mn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||vn(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 Bn(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=vn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function vn(e,t){if(e){if("string"==typeof e)return mn(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)?mn(e,t):void 0}}function mn(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 Qn(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function bn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _n(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 wn(e,t,r){return t&&_n(e.prototype,t),r&&_n(e,r),e}function Sn(e,t){return(Sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dn(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 o=Mn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rn(this,r)}}function Rn(e,t){return!t||"object"!==Cn(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)}var xn=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&&Sn(e,t)}(r,e);var t=Dn(r);function r(){var e;return bn(this,r),(e=t.apply(this,arguments)).doc=new P.CDoc,e}return wn(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(sn()(Object)),Pn=new(function(){function e(){bn(this,e),this.stacks=[{documentAction:new An}]}var t,r;return wn(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=f.a.mark((function e(){var t,r,n,o,i,A,a,s,u,c,l,g,p,h,d,I=arguments;return f.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([Kr.autoBackup]),o=new An,i=new xn,A=new un.DocumentStateManager,a=Bn(this.stacks);try{for(a.s();!(s=a.n()).done;){u=s.value,c=Bn(u.documentAction.docs);try{for(c.s();!(l=c.n()).done;)l.value.getDoc().addTransactionHook(i.getDoc().onTrackTransaction)}catch(e){c.e(e)}finally{c.f()}}}catch(e){a.e(e)}finally{a.f()}o.docs=[i].concat(En(t)),o.kafDocument=A,g=new yn(i.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(g),p=Bn(t);try{for(p.s();!(h=p.n()).done;)d=h.value,A.addDocumentSource(new yn(d.getDoc(),d.getId()))}catch(e){p.e(e)}finally{p.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:o,interruptKey:n,tempDoc:i,tempDocumentSource:g}),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,o){var i=t.apply(e,r);function A(e){Qn(i,n,o,A,a,"next",e)}function a(e){Qn(i,n,o,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,o=t.interruptKey,i=Bn(this.stacks);try{for(i.s();!(e=i.n()).done;){var A,a=Bn(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){i.e(e)}finally{i.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(o,[Jr.requestBackup])}}]),e}());function Fn(e){return(Fn="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 On(e,t){return(On=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tn(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=kn(e);if(t){var o=kn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ln(this,r)}}function Ln(e,t){return!t||"object"!==Fn(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 kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nn,Gn,Un=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&&On(e,t)}(r,e);var t=Tn(r);function r(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(o=t.call(this,e.getDoc(),n)).key=n,o}return r}(yn);function jn(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 Yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hn(e,t){!function(e){Nn.log(Kn(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};Gn&&Object.assign(r.labels,Gn()),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){Nn.logByKtracker(e)}(r)}function Kn(e){return Yn(Yn({},e),{},{pluginName:"customPad"})}var Jn=r(156),qn=r(11),Wn=r.n(qn);function zn(e){return(zn="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 Xn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(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 eo(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=ro(e);if(t){var o=ro(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return to(this,r)}}function to(e,t){return!t||"object"!==zn(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 ro(e){return(ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var no=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&&$n(e,t)}(i,e);var t,r,n,o=eo(i);function i(){return Xn(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){return null}}])&&Zn(t.prototype,r),n&&Zn(t,n),i}(Wn.a.PureComponent);function oo(e){return(oo="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 io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ao(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 ao(e,t){return(ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function so(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=co(e);if(t){var o=co(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uo(this,r)}}function uo(e,t){return!t||"object"!==oo(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 co(e){return(co=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lo,go=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&&ao(e,t)}(i,e);var t,r,n,o=so(i);function i(){return io(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"module",value:function(){return"entry"}}])&&Ao(t.prototype,r),n&&Ao(t,n),i}(Wr.AXR);lo||(lo={});var fo,po=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(fo||(fo={}));var ho={};function Io(e){return(Io="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 yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Co(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=Qo(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function Bo(e,t){return(Bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vo(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=Qo(e);if(t){var o=Qo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mo(this,r)}}function mo(e,t){return!t||"object"!==Io(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 Qo(e){return(Qo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bo={entry:go,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&&Bo(e,t)}(i,e);var t,r,n,o=vo(i);function i(){return yo(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"init",value:function(){Eo(Qo(i.prototype),"init",this).call(this),this.addConfig({sendLog:Hn,perfLogConfig:po,timeLogConfig:ho})}}])&&Co(t.prototype,r),n&&Co(t,n),i}(Wr.Monitor)};function _o(e){return(_o="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 wo(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 So(e,t){return(So=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Do(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=Mo(e);if(t){var o=Mo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ro(this,r)}}function Ro(e,t){return!t||"object"!==_o(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 Mo(e){return(Mo=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&&So(e,t)}(i,e);var t,r,n,o=Do(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).model=e,t}return t=i,(r=[{key:"toModel",value:function(){return this.model}}])&&wo(t.prototype,r),n&&wo(t,n),i}(un.BackupItem);var Po,Fo=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=he.noop,this.BackupItemImpl=xo,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){Ie.addSetHook(e)},this.beforeDispose=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(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(Po||(Po={}));var To=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=Wr.ERequest.GET),e.method===Wr.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)&&Oo(t.prototype,r),n&&Oo(t,n),e}();function Lo(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 ko=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(Po.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(Po.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(Po.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(Po.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(Po.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(Po.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=To.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(Po.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(Po.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(Po.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(Po.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=To.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=To.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var o=To.toNetParams(t,n,r);return this.net.post(o,{mode:e})}},{key:"_put",value:function(e,t,r,n){var o=To.toNetParams(t,n,r);return o.method="PUT",this.net.request(o,{mode:e})}}])&&Lo(t.prototype,r),n&&Lo(t,n),e}();function No(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 Go(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){Uo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Uo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jo(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Yo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){jo(i,n,o,A,a,"next",e)}function a(e){jo(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Vo(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 Ho=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=Yo(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.get(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.delete(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.post(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.put(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Yo(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.encryptedGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Yo(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.gzipGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.gzipPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.gzipPut(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Yo(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(Go(Go({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Yo(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(Go(Go({},o),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,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}}}])&&Vo(t.prototype,r),n&&Vo(t,n),e}(),Ko=r(1101),Jo=r(30),qo=r(210),Wo=r(158),zo=r(91);function Xo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zo(e,t){return(Zo=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=ti(e);if(t){var o=ti(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ei(this,r)}}function ei(e,t){return!t||"object"!==ri(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)}function ri(e){return(ri="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 ni,oi,ii,Ai,ai,si,ui,ci,li=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ri(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},gi=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ri(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&Zo(e,t)}(r,e);var t=$o(r);function r(){var e;return Xo(this,r),(e=t.apply(this,arguments)).client=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.encryptedClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.encryptInterceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.gzipEncryptBase64Interceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.pbEncryptedClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.encryptInterceptorWithArrayBuffer,Jo.encryptInterceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.gzipEncryptInterceptorWithArrayBuffer,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.gzipEncryptBase64Interceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.ossDegradedEncryptInterceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Wo.getClient)([Jo.interceptor,qo.errorCodeInterceptor,Jo.ossDegradedGzipEncryptBase64Interceptor,Jo.parseCDNInterceptor,Jo.parseJSONInterceptor]),e}return r}(Ko.RequestClient);li([Jo.retryRequest,gi("design:type","function"==typeof(ni=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?ni:Object)],fi.prototype,"client",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(oi=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?oi:Object)],fi.prototype,"encryptedClient",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(ii=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?ii:Object)],fi.prototype,"gzippedEncryptClient",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(Ai=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?Ai:Object)],fi.prototype,"pbEncryptedClient",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(ai=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?ai:Object)],fi.prototype,"pbGzippedEncryptClient",void 0),li([Object(Jo.retryRequest)(!0),gi("design:type","function"==typeof(si=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?si:Object)],fi.prototype,"ossGzippedEncryptClient",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(ui=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?ui:Object)],fi.prototype,"ossDegradedEncryptedClient",void 0),li([Jo.retryRequest,gi("design:type","function"==typeof(ci=void 0!==zo.AxiosInstance&&zo.AxiosInstance)?ci:Object)],fi.prototype,"ossDegradedGzippedEncryptClient",void 0);var pi=Object(he.once)((function(){return new fi})),hi=Object(he.once)((function(){return new Ho}));function di(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}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)}var t,r,n,o,i;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return pi().addClientInterceptors(e)}},{key:"send",value:(o=f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=pi(),o=To.toAxiosConfig(t),r.mode!==Po.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(o));case 6:if(r.mode!==Po.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(o));case 10:return e.abrupt("return",n.request(o));case 11:case"end":return e.stop()}}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){di(i,r,n,A,a,"next",e)}function a(e){di(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return i.apply(this,arguments)})}])&&Ii(t.prototype,r),n&&Ii(t,n),e}();function Ci(e){return(Ci="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 Ei(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 Bi(e,t,r){return(Bi="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=bi(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function vi(e,t){return(vi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mi(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=bi(e);if(t){var o=bi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Qi(this,r)}}function Qi(e,t){return!t||"object"!==Ci(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 bi(e){return(bi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _i=new Wr.SingletonRef,wi=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&&vi(e,t)}(i,e);var t,r,n,o=mi(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.core",name:"cCoreApp",Component:no,axrs:bo,singleton:_i},e)).stateManager=t,r}return t=i,(r=[{key:"init",value:function(){Bi(bi(i.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(un.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Pn.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new Un(r,"custom-pad-document")),e.addDocumentSource(new Fo(n,"fitting-document"));var o=r.getDoc().getElementContext();o.getterEmitter.on((function(e){pe.advanced.reportObserved(e.instance)})),o.setterEmitter.on((function(e){pe.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Nn=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),qA(this.stateManager)}},{key:"initNet",value:function(){Bi(bi(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new yi),this.client=new ko(this.net)}}])&&Ei(t.prototype,r),n&&Ei(t,n),i}(Wr.PluginApplication),Si=_i.instance,Di=r(351),Ri=r.n(Di),Mi=r(711);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 Fi(e,t,r){return t&&Pi(e.prototype,t),r&&Pi(e,r),e}function Oi(e){return(Oi="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 Ti,Li,ki,Ni,Gi=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Oi(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ui=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Oi(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function ji(e){var t=this;if(t===ki.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(Ni){if(o!==Ni)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(Ni=o,O.a.begGetDeps(o));try{e=n.apply(this,arguments)}catch(e){r=e}if(o&&(Ni=void 0,O.a.endGetDeps(o)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,o){if(r){var i="get"+o[0].toLocaleUpperCase()+o.slice(1);e=function(e){return e[i]()}}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(he.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===ki.LAZY?(n.__lazyKeys.push(o),Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[o])return t[o];var r=e;if(Object(he.isFunction)(e)){var n=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(Ni){if(i!==Ni)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(Ni=i,O.a.begGetDeps(i));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(i&&(Ni=void 0,O.a.endGetDeps(i)),n)throw n.message="CUSTOM: ["+o+"] "+n.message,n}return t[o]=r,t.__keys[o]=!0,r}})):(n.__immeKeys.push(o),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(ki||(ki={}));var Yi={lazy:ji.bind(ki.LAZY),imme:ji.bind(ki.IMMEDIATE),guard:ji.bind(ki.GUARD),castTo:void 0};Yi.castTo=function(){return Yi};var Vi=function(){function e(t){xi(this,e),this.__DONT_USE_ME=t,Ni&&(this.__TRANSFORM_CONTEXT_ADD_DEP=Ni),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return Fi(e,[{key:"asStub",value:function(){var e=P.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),o=0,i=n.length;o<i;++o)(r=n[o]).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}();Gi([Yi.imme(),Ui("design:type",String)],Vi.prototype,"id",void 0),Gi([Yi.imme((function(e){return e.constructor})),Ui("design:type","function"==typeof(Ti=void 0!==Mi.ConstructorOf&&Mi.ConstructorOf)?Ti:Object)],Vi.prototype,"kType",void 0),Gi([Yi.lazy((function(e){return e})),Ui("design:type",Boolean)],Vi.prototype,"$model",void 0),Gi([Yi.guard(),Ui("design:type",Function),Ui("design:paramtypes",[Function]),Ui("design:returntype","function"==typeof(Li="undefined"!=typeof T&&T)?Li:Object)],Vi.prototype,"guard",null);var Hi=function(){function e(){xi(this,e)}return Fi(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}();Hi.creators=new Map;var Ki=r(237),Ji=r(66),qi=r.n(Ji);function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zi(e,t){return(zi=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=$i(e);if(t){var o=$i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zi(this,r)}}function Zi(e,t){return!t||"object"!==eA(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 $i(e){return($i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eA(e){return(eA="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,rA,nA,oA,iA,AA=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},aA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":eA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sA=Symbol("baseParamModel"),uA=Yi.castTo(),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&&zi(e,t)}(r,e);var t=Xi(r);function r(){return Wi(this,r),t.apply(this,arguments)}return r}(Vi);function lA(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 fA(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 o=hA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pA(this,r)}}function pA(e,t){return!t||"object"!==dA(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 dA(e){return(dA="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)}AA([uA.lazy(),aA("design:type",String)],cA.prototype,"modelInstanceId",void 0),AA([uA.imme(sA),aA("design:type",Symbol)],cA.prototype,"type",void 0),AA([uA.lazy((function(e){return e.getType()})),aA("design:type","function"==typeof(tA=void 0!==rr.ParamModelType&&rr.ParamModelType)?tA:Object)],cA.prototype,"modelType",void 0),AA([uA.lazy(),aA("design:type",String)],cA.prototype,"name",void 0),AA([uA.lazy(),aA("design:type","function"==typeof(rA=void 0!==Q.a&&Q.a)?rA:Object)],cA.prototype,"size",void 0),AA([uA.lazy(),aA("design:type","function"==typeof(nA=void 0!==qi.a&&qi.a)?nA:Object)],cA.prototype,"box3",void 0),AA([uA.lazy(),aA("design:type","function"==typeof(oA=void 0!==Ki.ParamStore&&Ki.ParamStore)?oA:Object)],cA.prototype,"paramStore",void 0),AA([uA.lazy(),aA("design:type","function"==typeof(iA=void 0!==rr.ParamModelCategory&&rr.ParamModelCategory)?iA:Object)],cA.prototype,"category",void 0),AA([uA.lazy(),aA("design:type",Boolean)],cA.prototype,"legal",void 0),AA([uA.lazy((function(e){return e.getHasAttached()})),aA("design:type",Boolean)],cA.prototype,"attached",void 0),AA([uA.lazy(),aA("design:type",Boolean)],cA.prototype,"deletable",void 0),AA([uA.lazy(),aA("design:type",Boolean)],cA.prototype,"replaceable",void 0),AA([uA.lazy(),aA("design:type",Number)],cA.prototype,"attachedVersion",void 0),AA([uA.lazy(),aA("design:type",Boolean)],cA.prototype,"paramOverride",void 0);var IA,yA,CA=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},EA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},BA=Symbol("paramModel"),vA=Yi.castTo(),mA=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)}(i,e);var t,r,n,o=fA(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,e)).parent=t,r}return t=i,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&lA(t.prototype,r),n&&lA(t,n),i}(cA);function QA(e){return(QA="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 bA(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 _A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bA(Object(r),!0).forEach((function(t){wA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}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}function SA(e){return function(e){if(Array.isArray(e))return DA(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 DA(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 DA(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 DA(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 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(MA="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=OA(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function xA(e,t){return(xA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PA(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=OA(e);if(t){var o=OA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FA(this,r)}}function FA(e,t){return!t||"object"!==QA(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 OA(e){return(OA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function TA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}CA([vA.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),EA("design:type",mA)],mA.prototype,"root",void 0),CA([vA.imme(BA),EA("design:type",Symbol)],mA.prototype,"type",void 0),CA([vA.lazy((function(e){return e.isRoot()})),EA("design:type",Boolean)],mA.prototype,"isRoot",void 0),CA([vA.lazy((function(e){return e.isAccessory()})),EA("design:type",Boolean)],mA.prototype,"isAccessory",void 0),CA([vA.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),EA("design:type",String)],mA.prototype,"assemblyId",void 0),CA([vA.lazy((function(e,t){return e.getChildren().map((function(e){return Hi.get(e)}))})),EA("design:type",Array)],mA.prototype,"children",void 0),CA([vA.lazy((function(e,t){return e.getAccessories().map((function(e){return Hi.get(e)}))})),EA("design:type",Array)],mA.prototype,"accessories",void 0),CA([vA.lazy((function(e,t){return t.children.concat(t.accessories)})),EA("design:type",Array)],mA.prototype,"childNodes",void 0),CA([vA.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),EA("design:type",Boolean)],mA.prototype,"belongsToTemplateAssembly",void 0),CA([vA.guard(),EA("design:type",Function),EA("design:paramtypes",["function"==typeof(IA=void 0!==W.ParamModelVisitor&&W.ParamModelVisitor)?IA:Object,Boolean]),EA("design:returntype",void 0)],mA.prototype,"visit",null),CA([vA.guard(),EA("design:type",Function),EA("design:paramtypes",["function"==typeof(yA=void 0!==W.ParamModelVisitor&&W.ParamModelVisitor)?yA:Object,Boolean]),EA("design:returntype",void 0)],mA.prototype,"upVisit",null),Hi.registeCreator(ie,(function(e){return e.isRoot()?new mA(e):Hi.get(e.getParent()).guard((function(t){return new mA(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var LA=function e(){TA(this,e),this.paramModels=[]},kA=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},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&&xA(e,t)}(i,e);var t,r,n,o=PA(i);function i(e){var t;return TA(this,i),(t=o.call(this,e)).modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=i,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[];MA(OA(i.prototype),"updateState",this).call(this,e);var r=this.state.paramModels;this.updateParamModelsMap(t,r),t!==r&&this.emit(i.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=Wr.Util.diffArray(e,t),n=this.modelsMap.paramsMap,o=r.removed;o.push.apply(o,SA(r.updatedOld));var i,A,a=r.added;a.push.apply(a,SA(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=o.length;c<l;++c){if(delete n[A=o[c].id],(i=s[A])&&i.length>0)for(var g=0,f=i.length;g<f;++g)delete u[i[g]];delete s[A]}for(var p=0,h=a.length;p<h;++p)n[A=a[p].id]=a[p].$model,i=[],a[p].visit((function(e){A=e.getId(),i.push(A),u[A]=e,Hi.put(e)}),!0),s[A]=i}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(_A(_A({},e),new LA)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(Ri.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===BA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(Di.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=Hi.get(e,!0);return t.asStub(),t}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,kA);return t?Hi.get(t):void 0}}])&&RA(t.prototype,r),n&&RA(t,n),i}(un.KafBaseStateManager);function GA(e){return(GA="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 UA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jA(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 YA(e,t,r){return(YA="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=JA(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function VA(e,t){return(VA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HA(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=JA(e);if(t){var o=JA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KA(this,r)}}function KA(e,t){return!t||"object"!==GA(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 JA(e){return(JA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}NA.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var qA=Object(Jn.getConnector)().setRootState,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)}(i,e);var t,r,n,o=HA(i);function i(){var e;return UA(this,i),(e=o.apply(this,arguments)).design=new q,e.fittingDesign=new Re,e}return t=i,(r=[{key:"initState",value:function(){YA(JA(i.prototype),"initState",this).call(this);var e=Si().getDependentPlugin(un.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&jA(t.prototype,r),n&&jA(t,n),i}(un.types.combine({pad:NA})),zA=r(236),XA=r.n(zA),ZA=r(698),$A=r(701),ea=r.n($A),ta=r(8),ra=r.n(ta),na=r(278),oa=r.n(na),ia=r(1102),Aa=r.n(ia),aa=r(349),sa=r.n(aa),ua=r(700),ca=r.n(ua),la=r(1103),ga=r.n(la),fa=r(707),pa=r.n(fa),ha=r(708),da=r.n(ha),Ia=r(204),ya=r.n(Ia),Ca=r(112),Ea=r.n(Ca),Ba=r(180),va=r.n(Ba),ma=r(511),Qa=r.n(ma),ba=r(1104),_a=r.n(ba),wa=r(706),Sa=r.n(wa),Da=r(705),Ra=r.n(Da),Ma=r(350),xa=r.n(Ma),Pa=r(235),Fa=r.n(Pa),Oa=r(712),Ta=r.n(Oa),La=r(699),ka=r.n(La),Na=r(1105),Ga=r.n(Na),Ua=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[yr.a,Ar.a,sa.a,qi.a,ca.a,y.a,ga.a,ya.a,Ea.a,va.a,Qa.a,E.a,sr.a,cr.a,gr.a,_a.a,Sa.a,Ra.a,v.a,xa.a,Fa.a,Ta.a,Oa.LineIndex,pr.a,ka.a,Ga.a,lt.a,Q.a,ArrayBuffer,ta.Vector3,oa.a,Aa.a,Ki.ParamStore,pa.a,da.a,ea.a,We.a,ZA.FurnitureModel,Map,ta.SkyBackground]:[];Object(zA.inject)({isKnownImmutableInstance:function(e){return Ua.some((function(t){return e instanceof t}))}});XA.a;var ja=r(208);function Ya(e){return(Ya="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 Va(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ha(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 Ka(e,t){return(Ka=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=Wa(e);if(t){var o=Wa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qa(this,r)}}function qa(e,t){return!t||"object"!==Ya(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 Wa(e){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var za=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&&Ka(e,t)}(i,e);var t,r,n,o=Ja(i);function i(){var e;return Va(this,i),(e=o.apply(this,arguments)).rootState=new WA,e}return t=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new wi(this,this.rootState);e.init(),e.run()}}])&&Ha(t.prototype,r),n&&Ha(t,n),i}(ja.BasePlugin);function Xa(e){return(Xa="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 Za(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}}function es(e,t){return(es=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ts(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=ns(e);if(t){var o=ns(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rs(this,r)}}function rs(e,t){return!t||"object"!==Xa(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 ns(e){return(ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}za.dependencies=[un.AppServicePlugin];new(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&&es(e,t)}(i,e);var t,r,n,o=ts(i);function i(){return Za(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"name",value:function(){return"commonEnvSetting"}},{key:"envItems",value:function(){return[]}}])&&$a(t.prototype,r),n&&$a(t,n),i}(Wr.Env));function os(e,t){var r=new Map;return function(){var n,o=t.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=e.apply(void 0,arguments),Object(he.isObject)(n)&&Object(he.isFunction)(n.then)&&Object(he.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function is(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function As(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){is(i,n,o,A,a,"next",e)}function a(e){is(i,n,o,A,a,"throw",e)}A(void 0)}))}}var as=new Map;function ss(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var us,cs,ls=os(function(){var e=As(f.a.mark((function e(t){var r,n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=hi(),n=ss(t),!as.has(n)){e.next=4;break}return e.abrupt("return",as.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return o=e.sent,as.set(n,o.data.d),e.abrupt("return",o.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ss),gs=function(){var e=As(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=hi(),o=ss(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:as.set(o,t),e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(2),e.t0;case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t,r){return e.apply(this,arguments)}}(),fs=function(){var e=As(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hi(),n=ss(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:as.has(n)&&as.delete(n),e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(2),e.t0;case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();function ps(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}!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"}(us||(us={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(cs||(cs={}));var hs=function(){var e,t=(e=f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hi(),e.next=3,r.gzipGet(t,{params:{_time:Date.now()}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){ps(i,n,o,A,a,"next",e)}function a(e){ps(i,n,o,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),ds=r(240),Is=r(0);function ys(e){return(ys="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)}
66
+ */A=function(){return function e(t,r,n){function o(A,a){if(!r[A]){if(!t[A]){if(i)return i(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 o(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var i=!1,A=0;A<n.length;A++)o(n[A]);return o}({1:[function(e,t,n){(function(e){"use strict";var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,A=new o(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=i=++i%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 o(){}var i={},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!==o&&p(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 i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.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 p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var A=h((function(){t(o,n)}));"error"===A.status&&n(A.value)}function h(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(o);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){i.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){i.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=h(f,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=s,e.outcome=t;for(var o=-1,A=e.queue.length;++o<A;)e.queue[o].callFulfilled(t)}return e},i.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:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.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(o);++s<r;)c(e[s],s);return u;function c(e,o){t.resolve(e).then((function(e){A[o]=e,++a!==r||n||(n=!0,i.resolve(u,A))}),(function(e){n||(n=!0,i.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(o);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,i.resolve(s,e))}),(function(e){n||(n=!0,i.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)},o=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 i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;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={},p=Object.prototype.toString;function h(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=i([""]);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 i=[e.name];t&&i.push(e.version);var A=o.open.apply(o,i);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,o=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),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function m(e){return i([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),o=0;o<t;o++)n[o]=e.charCodeAt(o);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 o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===o.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 o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._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 o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(o)}}var w={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var o=f[r.name];o||(o={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var i=[];function a(){return A.resolve()}for(var s=0;s<o.forages.length;s++){var u=o.forages[s];u!==t&&i.push(u._initReady().catch(a))}var c=o.forages.slice(0);return A.all(i).then((function(){return r.db=o.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=o.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var i=c[n];i!==t&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}}))},_support:function(){try{if(!o||!o.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(o,i){if(o)return n(o);try{var A=i.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 o=e(n,r.key,a++);void 0!==o?t(o):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(o,i){if(o)return n(o);try{var A=i.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 o=new A((function(r,o){var i;n.ready().then((function(){return i=n._dbInfo,"[object Blob]"===p.call(t)?h(i.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(i,A){if(i)return o(i);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;o(e)}}catch(e){o(e)}}))})).catch(o)}));return s(o,r),o},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(o,i){if(o)return n(o);try{var A=i.objectStore(r._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){n(A.error)},i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){r(i.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(o,i){if(o)return n(o);try{var A=i.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,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];i.onsuccess=function(){var t=i.result;t?(A.push(t.key),t.continue()):e(A)},i.onerror=function(){r(i.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,i=this;if(e.name){var a=e.name===r.name&&i._dbInfo.db,u=a?A.resolve(i._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var o=0;o<n.length;o++)n[o]._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],i=n.forages;t.close();for(var a=0;a<i.length;a++){var s=i[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var i=o.open(e.name,r);i.onerror=function(e){i.result.close(),n(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<i.length;t++){var r=i[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 i=0;i<n.length;i++)n[i]._dbInfo.db=null;return new A((function(t,r){var n=o.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}},S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,o,i,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=S.indexOf(e[t]),n=S.indexOf(e[t+1]),o=S.indexOf(e[t+2]),i=S.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|o>>2,c[s++]=(3&o)<<6|63&i;return u}function F(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=S[r[t]>>2],n+=S[(3&r[t])<<4|r[t+1]>>4],n+=S[(15&r[t+1])<<2|r[t+2]>>6],n+=S[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 O={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,o="__lfsc__:";e instanceof ArrayBuffer?(n=e,o+="arbf"):(n=e.buffer,"[object Int8Array]"===r?o+="si08":"[object Uint8Array]"===r?o+="ui08":"[object Uint8ClampedArray]"===r?o+="uic8":"[object Int16Array]"===r?o+="si16":"[object Uint16Array]"===r?o+="ur16":"[object Int32Array]"===r?o+="si32":"[object Uint32Array]"===r?o+="ui32":"[object Float32Array]"===r?o+="fl32":"[object Float64Array]"===r?o+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(o+F(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+F(this.result);t("__lfsc__:blob"+r)},i.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 o=r.match(D);t=o[1],r=r.substring(o[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return i([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:F};function T(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,o,i){e.executeSql(r,n,o,(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?i(e,A):T(e,t,(function(){e.executeSql(r,n,o,i)}),i)}),i):i(e,A)}),i)}function k(e,t,r,n){var o=this;e=c(e);var i=new A((function(i,A){o.ready().then((function(){void 0===t&&(t=null);var a=t,s=o._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(k.apply(o,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(i,r),i}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 o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);t({db:e,storeNames:o})}),(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 o=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(o){T(o,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=O,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,A=i.length,a=0;a<A;a++){var s=i.item(a),u=s.value;if(u&&(u=o.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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"DELETE FROM "+o.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){L(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){L(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 o=r._dbInfo;o.db.transaction((function(r){L(r,o,"SELECT key FROM "+o.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){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).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,o=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?o._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 o(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var i=[],a=0,s=e.storeNames.length;a<s;a++)i.push(o(e.storeNames[a]));A.all(i).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 Y={_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=O,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,o=n.length,i=localStorage.length,A=1,a=0;a<i;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(o),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 o=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(o,i){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)i(n);else try{localStorage.setItem(A.keyPrefix+e,t),o(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return s(o,r),o},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=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&n.push(i.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,o=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,o._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}},V=function(e,t){for(var r,n,o=e.length,i=0;i<o;){if((r=e[i])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;i++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},J={},q={INDEXEDDB:w,WEBSQL:G,LOCALSTORAGE:Y},W=[q.INDEXEDDB._driver,q.WEBSQL._driver,q.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),q)if(q.hasOwnProperty(r)){var n=q[r],o=n._driver;this[r]=o,K[o]||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,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(o);for(var i=X.concat("_initStorage"),a=0,u=i.length;a<u;a++){var c=i[a];if((!V(z,c)||e[c])&&"function"!=typeof e[c])return void r(o)}!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 o=z[r];e[o]||(e[o]=t(o))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,J[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(O);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 o=this._getSupportedDrivers(e);function i(){n._config.driver=n.driver()}function a(e){return n._extend(e),i(),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=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var o=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(o).then(a).catch(r)}i();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(o)}))})).catch((function(){i();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!!J[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 o=e[r];this.supports(o)&&t.push(o)}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():(o=[],void 0===(i="function"==typeof(n=A)?n.apply(t,o):n)||(e.exports=i))}).call(this,r(140))},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(3),o=r(134),i=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}(o.default);t.default=i},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(966)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return o.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(3),o=r(281),i=r(1990),A=r(658),a=r(2),s=r(1033);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}(o.BackupItem);function l(e,t,r){var o=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)o.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=i.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var o=e+r;return n.monitoredRequestedKeySet.has(o)?t:(n.monitoredRequestedKeySet.add(o),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,o=this.getDocumentsSortedByPriority(t.getDocFetchPriority),i=new Map;return o.reduce((function(t,o){return t.then((function(){var t=[];return o.documents.forEach((function(o){if(void 0!==o.fetch){var A=n.monitorSourceFetch(o.key,o.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),i.set(o.key,A)}})),Promise.all(t)}))}),Promise.resolve()),i},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=i.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 o=e.reload;return o?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,o(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(),o={actionId:r};return t&&(o=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,o)})))}))},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,o={};return t=this.documentSources,r=function(t,r){var n=e(t);o[n]||(o[n]=[]),o[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(o).map((function(e){var t=parseFloat(e);return{priority:t,documents:o[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}(o.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1991),o=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=o},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,i){return(0,o.__assign)((0,o.__assign)({},i),{value:function(){for(var t,r,o=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=i.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(o,A)}))};try{var c=null===(r=i.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 o=r(3);var i=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 i=this.changeStack[this.changeStack.length-1];if(i.scope.alive)break;this.changeStack.pop(),n.push(i)}try{for(var A=(0,o.__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 i(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,i.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(3),o=r(2),i=r(1064),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,o.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(1021)},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(1065)},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(230)},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(1998)},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(1040)},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(2e3)},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,o.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!(o=this.props,A=e,a=t,s=Object.keys(o),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||i)(o[e],A[e])}))&&(0,n.default)(this.state,r));var o,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,o.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 i(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,o.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]})),o=Object.keys(t).filter((function(e){return!r[e]}));return n.length===o.length&&n.every((function(r){return i(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(255),o=r(179);function i(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 o.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return o.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return i.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(230),o=r(415),i=r(176),A=r(202)},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 o.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return i.Feature}});var n=r(412),o=r(669),i=r(1002)},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(1066)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),o=r(507),i=r(2009),A=r(690),a=r(691),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,i){var A;if(void 0===r&&(r=!1),i){if(i.customUnitInfo){if((0,a.getQuantityTypeForUnit)(i.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)(i.customUnitInfo.unitType),n=i.customUnitInfo.precision}if(i.customBaseUnit){if((0,a.getQuantityTypeForUnit)(i.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,i.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&&o.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&o.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 o;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}o=(0,a.getUnitInstance)(n.customUnit)}if(!o){var i=this.getGlobalUnitInfo(t);i&&(o=i.unit)}if(o){var A=o.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=i.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=i.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=i.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 o.LengthUnitType.mm:t=i.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case o.LengthUnitType.m:t=i.globalLengthUnitInfoMaps.metricSystem.meter;break;case o.LengthUnitType.ft:t=i.globalLengthUnitInfoMaps.imperialSystem.foot;break;case o.LengthUnitType.in:t=i.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 o.AreaUnitType.sqMm:t=i.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case o.AreaUnitType.sqM:t=i.globalAreaUnitInfoMaps.metricSystem.meter;break;case o.AreaUnitType.sqFt:t=i.globalAreaUnitInfoMaps.imperialSystem.foot;break;case o.AreaUnitType.mats:t=i.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case o.AreaUnitType.tsubo:t=i.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(203);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 o=n(r(2007)),i=r(508),A=n(r(2008)),a=new o.default("m",i.FACTORS.m2mm,i.regexMap.number,i.regexMap.meterText);t.meter=a;var s=new o.default("mm",i.FACTORS.mm2mm,i.regexMap.number,i.regexMap.millimeterText);t.millimeter=s;var u=new o.default("''",i.FACTORS.inch2mm,i.regexMap.number,i.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new o.default("ft²",i.FACTORS.sqft2sqmm,i.regexMap.number,i.regexMap.squareFootText);t.squareFoot=l;var g=new o.default("m²",i.FACTORS.sqm2sqmm,i.regexMap.number,i.regexMap.squareMeterText);t.squareMeter=g;var f=new o.default("mm²",i.FACTORS.sqmm2sqmm,i.regexMap.number,i.regexMap.squareMillimeterText);t.squareMillimeter=f;var p=new o.default("mats",i.FACTORS.mats2sqmm,i.regexMap.number,i.regexMap.matsText);t.mats=p;var h=new o.default("tsubo",i.FACTORS.tsubo2sqmm,i.regexMap.number,i.regexMap.tsuboText);t.tsubo=h},function(e,t,r){"use strict";var n=r(203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(73)),i=n(r(74)),A=r(1067),a=function(){function e(t,r,n,i){(0,o.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=i}return(0,i.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(203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(73)),i=n(r(74)),A=r(508),a=r(1067),s=function(){function e(){(0,o.default)(this,e),this.factor=0}return(0,i.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(507),o={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=o;var i={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=i;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 o.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return i.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(2011),o=r(415),i=r(2015),A=r(494)},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(2012)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2013),o=r(2014),i=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=o.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==o.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===o.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=o.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=o.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=o.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=o.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=o.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=o.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=i},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 o=t,i=r;if(n!==o){for(var A=[],a=o.length,s=n.length,u=0;u<a&&u<s;u++){if(o[u]!==(f=n[u]))break;A.push(i[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(o[l],i[l]);for(var g=u;g<s;g++){var f=n[g],p=c.get(f);void 0===p?A.push(e(f)):A.push(p)}}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(233)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(3),o=r(208),i=r(139),A=r(1068),a=r(1072),s=r(233),u=r(487),c=r(134),l=r(11),g=r(87);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 p={fpsDetectorEnabled:!0},h=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new o.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)({},p),t),this.started=!0;var o=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),o();var h=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(h.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return h.logger.fpsMerged(e)}}),h.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),h.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,i.config)({onError:h.logger.error}),h.stateManager.document.start(),h.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=h.getLayout();d=y&&l.createElement(y,null),I={logger:h.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:h.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=h}).call(this,r(82))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(3),o=r(134),i=r(2),A=r(11),a=r(87),s=r(505),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,i.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,o.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(3),o=r(208),i=r(1070),A=r(688),a=r(671),s=r(676),u=r(275),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 i.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}(o.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(343),o=r(3),i=r(229),A=r(1066),a=r(681),s=r(11),u=r(233),c=r(1073),l=r(1074);r(2022);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,o.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var p=null;try{p=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===p||null===p&&(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,o.__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,o=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",o.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,o=(0,l.profiler)().dump(),i=Object.values(o.costs);e=[];for(var A=0,a=i.length;A<a;++A)n=i[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(o.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=o.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:o.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 i.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 i.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 h=g;t.default=h}).call(this,r(82))},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 o.default}});var n=r(2024),o=r(2029)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),o=r(136),i=r(79),A=r(1075),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)([o.default],t)}(i.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(8),o=r(12),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,o=t.opacity,i=e.NORMAL_BOX;this.opacity=o,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:o||1});var A=new n.Mesh(i,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),o&&o<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,o=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:o,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,i=t.scale,A=void 0===i?o.SCALE_ONE:i,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=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2027),o=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=o},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(3),o=r(8),i=r(88),A=r(4),a=r(228),s=r(79);function u(e){var t=e.size,r=new o.BoxBufferGeometry(t.x,t.y,t.z),n=new o.EdgesBufferGeometry(r,1),i=new o.LineBasicMaterial({color:16722688,depthTest:!1});return new o.LineSegments(n,i)}function c(e,t){var r=t.position,n=t.pivot,o=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)(o)),e.rotation.copy((0,a.eulerToThree)((new i.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(3),o=r(34),i=r(1075),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new i.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)([o.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(3),o=r(134),i=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,o.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),i);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1086);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2033);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(2034);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[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__(1086),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 o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(78),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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2036);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1081);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(693);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1082);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1083);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(692);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1084);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1085);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,o=r(322),i=r(693);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(5)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return o.tci.enabled?i.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(5)).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(5)).leaveModule)&&u(e)}).call(this,r(23)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2038);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2039);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1087);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(1088);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2040);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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(694),_util=__webpack_require__(78),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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(694),_util=__webpack_require__(78),_ServiceFramework=__webpack_require__(1088),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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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 o=t.serviceDescs.get(r);if(o||(o=[],t.serviceDescs.set(r,o)),o.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");o.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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1089);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2042);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(1090);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var A=r(1091);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){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(870),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1089),_PerfLog=__webpack_require__(1090),_TimeLog=__webpack_require__(1091),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 o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.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 o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}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__(5)).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,o=e.timeLogConfig,i=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),o&&this.timeLog.addConfig(o),i&&i.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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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__(5)).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,o=e.description,i=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:o,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:i||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,o=e.description,i=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:o,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:i,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__(5)).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__(5)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(23)(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 o={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 i=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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var A=o?Object.getOwnPropertyDescriptor(e,i):null;A&&(A.get||A.set)?Object.defineProperty(r,i,A):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(30));t.interceptors=i;var A,a=(A=r(2046))&&A.__esModule?A:{default:A},s=r(1092),u=r(1093),c=r(2047);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2049);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(o,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=o,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=o(r)))}return function(t,r){var i,A,a;(0,n.isBoolean)(e)?(A=t[r],i=e):e.axios?(A=e.axios,i=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=o(A,i,a))}};var n=r(2);function o(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=i(r(1)),o=i(r(660));function i(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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw i}}}}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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 o.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return o.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),i=0;i<e;i++)r[i]=arguments[i];return u(t,void 0,void 0,n.default.mark((function e(){var t,i,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(o.default.wasmLoaded||!(i<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),i++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},i=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 o.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return o.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return o.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return o.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,i;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),i&&s(t,i),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(2048)},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 i(this,void 0,void 0,o.default.mark((function t(){var r,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,i=e.createStatusOptions,t.abrupt("return",r.then((function(e){return i(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return i(this,void 0,void 0,o.default.mark((function r(){var i,s,u,c,l,g,f;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},i=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(i,{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,o=(n=r(1))&&n.__esModule?n:{default:n};var i=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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,o=(n=r(1))&&n.__esModule?n:{default:n},i=r(99),A=r(348),a=r(2051),s=r(2052),u=r(2056),c=r(2058);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 p=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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())}))},h=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 p(this,void 0,void 0,o.default.mark((function r(){var n,A,a,s;return o.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 i.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof i.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 p(this,void 0,void 0,o.default.mark((function r(){return o.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 p(this,void 0,void 0,o.default.mark((function r(){return o.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=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=p(r(1)),o=p(r(574)),i=p(r(205)),A=r(1094),a=r(982),s=r(2),u=p(r(157)),c=r(696),l=r(695),g=r(1095),f=r(348);function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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=[],o=[],i=0,A=0,a=r.length;A<a;A++){var s=r[A];i+s.nodeNumber<=t?(i+=s.nodeNumber,o.push(s.model)):(n.push(o),o=[s.model],i=s.nodeNumber)}return o.length>0&&n.push(o),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 o=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 o.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(o,void 0,void 0,n.default.mark((function r(){var o,A,a,s,u,c,l,g,f,p,h,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 o=r.sent,A=o.isNew,a=o.nodeLimit,s=new i.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 o,i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return o=r.sent,r.next=5,e;case 5:return(i=r.sent).attachedModels.push(o.attachedModels),o.paramModelTasks.length>0&&(A=i.paramModelTasks).push.apply(A,I(o.paramModelTasks)),r.abrupt("return",i);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 p=r.sent,h=p.result,d=p.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(h),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(o,void 0,void 0,n.default.mark((function t(){var r,o,i,A,a,u,g,p,h,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,o=e.context,i=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,i);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:p=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:p=t.sent;case 15:return h=(0,s.map)(p.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(p,o);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:o,params:i,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:h});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 o.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,p;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,i,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,p,h,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 o(){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),i.push.apply(i,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),o,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,p=g.paramModelTasks,o.push.apply(o,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&p.length>0)){r.next=16;break}return A++,h=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,h;case 12:return r.next=14,u(p);case 14:r.next=17;break;case 16:i.push.apply(i,I((0,s.map)(p,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},o=[],i=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:o,errorParamModelIds:i});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,o,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/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,o=r.data,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(o).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);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,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-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);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 o;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 o=r.sent,t.addCustomResources(o),r.abrupt("return",o);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 i,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.getRootOrAccessory(),A=i.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},i=1;i<t.paramModelPath.length;i++){var A=n(i);if("object"===h(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 o.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),p&&d(t,p),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)),o=A(r(2053)),i=r(348);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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 p=new o.default({maxAge:36e5,max:200}),h=function(e,t,r){var n,o=u(e.keys());try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.split("_")[0]===t)if(i.split("_")[1].split(",").includes(r.toString())&&e.get(i))return i}}catch(e){o.e(e)}finally{o.f()}return""},d=function(e,t){return function(r,o,i){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=i===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var i,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=f.value,A=h(p,o,i),u=void 0,A?(s=A,u=p.get(s)):(s="".concat(o,"_").concat(c.toString()),u=e(c),p.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]===i})))&&a.push(g):l[i]&&(a[i]=l[i]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),p.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 o,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 o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return o=r.sent,A=o.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 o=r.sent,r.abrupt("return",o);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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;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[i.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,o=r.data,t.abrupt("return",null==o?void 0:o.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,o;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,o=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(o,void 0,void 0,n.default.mark((function t(){var o,i,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.targetField,i=e.idField,A=e.handler,s=e.dataType,!(u=r[i]||[]).length){t.next=7;break}return t.next=5,A(u,o,s);case 5:c=t.sent,s===g.Array?r[o]=r[o]?[].concat(a(r[o]),a(c)):c:r[o]=r[o]?Object.assign(Object.assign({},r[o]),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),o&&s(t,o),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 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)}}var i=r(2054),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),h=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[h]=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[p]=new Map,this[f]=new i,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,o=this[s](t,e);if(this[p].has(e)){if(o>this[A])return B(this,this[p].get(e)),!1;var i=this[p].get(e).value;return this[l]&&(this[g]||this[l](e,i.value)),i.now=n,i.maxAge=r,i.value=t,this[a]+=o-i.length,i.length=o,this.get(e),E(this),!0}var u=new v(e,t,o,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[p].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1;var t=this[p].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[p].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],o=n.e||0;if(0===o)this.set(n.k,n.v);else{var i=o-t;i>0&&this.set(n.k,n.v,i)}}}},{key:"prune",value:function(){var e=this;this[p].forEach((function(t,r){return y(e,r,!1)}))}}])&&o(t.prototype,r),I&&o(t,I),e}(),y=function(e,t,r){var n=e[p].get(t);if(n){var o=n.value;if(C(e,o)){if(B(e,n),!e[u])return}else r&&(e[h]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return o.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[p].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,o,i,A){n(this,e),this.key=t,this.value=r,this.length=o,this.now=i,this.maxAge=A||0},m=function(e,t,r,n){var o=r.value;C(e,o)&&(B(e,r),e[u]||(o=void 0)),o&&t.call(n,o.value,o.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,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(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 i(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++)i(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,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.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 o=0;null!==n;o++)r=e(r,n.value,o),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 o=this.length-1;null!==n;o--)r=e(r,n.value,o),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 o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.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 o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.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 i=[];for(r=0;n&&r<t;r++)i.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=o(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return i},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(2055)(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(873)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,o=(n=r(205))&&n.__esModule?n:{default:n},i=r(114),A=r(2),a=r(348),s=r(2057);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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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),o=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(o)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var o=[];return n.length>0&&o.push(this.updateInstanceAttacheds(n,t)),r.length>0&&o.push(this.updateTemplateAttacheds(r,t)),Promise.all(o)}},{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,o=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return i.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&o.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(o)}},{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 o.default;n.addCustomResources(t);var i=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(i,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,o.default.mark((function n(){var A,a,s;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[i.__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[i.__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,o=(n=r(1))&&n.__esModule?n:{default:n},i=r(348);var A=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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(114),o=r(348),i=r(2059);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,o=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),o.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,i.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[o.__INTERNAL__getDefaultParams]()),r),i=this.config[o.__INTERNAL__chunkParamModels](e,n),A=i.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,i=this.config[o.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=i.find((function(t){return t.filter(e)})),o=t?t.attachHandler:r.modelHandler,A=n.get(o);void 0===A&&(A=[],n.set(o,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,i=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 o.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!i||!A)return;e.setPosition(i),e.setRotation(A)}};var n=i(r(115)),o=i(r(46));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(89);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(2061);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(2066);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=h(r(1)),o=r(99),i=r(10),A=r(1094),a=h(r(4)),s=h(r(157)),u=r(2062),c=r(1096),l=r(696),g=r(695),f=r(1095),p=r(89);function h(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(o,i){function A(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(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 o,i,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 o=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 i=r.sent,a=A.dcs_model.PBParamModelViewData.decode(i.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=o,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,h;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(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.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,i=(new this.config.paramModelConstructor).parse(r.paramModelData,(new o.CoreCustomContext).addProduct(e)),(0,p.attach)(i,(0,p.toAttachedMap)(r)),i.setSize(this.calcSizeByProduct(i,e)),i.assignUniqueId(),(0,c.updatePositionByOffGround)(i,0),t.abrupt("return",i);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(i.ParamName.WIDTH),r&&r.y||e.getParsedValue(i.ParamName.DEPTH),r&&r.z||e.getParsedValue(i.ParamName.HEIGHT))}}])&&d(t.prototype,r),h&&d(t,h),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(390)),o=s(r(138)),i=s(r(88)),A=s(r(46)),a=s(r(4));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 i.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new o.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(99)},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 o.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new i.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,o=r(99),i=(n=r(4))&&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,o=r(99),i=r(836),A=r(459),a=(n=r(157))&&n.__esModule?n:{default:n},s=r(1096),u=r(696),c=r(89);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,i.parseAssembly)(a,new o.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 o=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,o=[];try{for(var i=n(this.intersections),A=i.next();!A.done;A=i.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&&o.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o},e}();t.default=o},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return rE})),r.d(t,"IntersectedService",(function(){return OE})),r.d(t,"CustomModelService",(function(){return HE})),r.d(t,"FittingModelService",(function(){return nB})),r.d(t,"ECameraMode",(function(){return tB})),r.d(t,"ECameraMoveDirection",(function(){return rB})),r.d(t,"ModelCameraService",(function(){return lB})),r.d(t,"ModelHintService",(function(){return CB})),r.d(t,"ModelService",(function(){return SB})),r.d(t,"ESelectedType",(function(){return TB})),r.d(t,"ESetSelectType",(function(){return LB})),r.d(t,"ModelViewerSelectionService",(function(){return NB})),r.d(t,"ModelViewerService",(function(){return WB})),r.d(t,"SceneService",(function(){return nv})),r.d(t,"Application",(function(){return Zv})),r.d(t,"EFittingType",(function(){return n})),r.d(t,"EIntersectedType",(function(){return o})),r.d(t,"EIntersectedCreatedType",(function(){return i})),r.d(t,"ELanguage",(function(){return A})),r.d(t,"EPointType",(function(){return a})),r.d(t,"ELineType",(function(){return s})),r.d(t,"EDesignMode",(function(){return u})),r.d(t,"ETriggerType",(function(){return c})),r.d(t,"EModelType",(function(){return l})),r.d(t,"KEYBOARD_KEY",(function(){return d})),r.d(t,"EToolType",(function(){return oo}));r(714),r(1319);var n,o,i,A,a,s,u,c,l,g=r(1),f=r.n(g),p=r(114),h=r(7);!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"}(n||(n={})),function(e){e.SHELL="1",e.FACE="2"}(o||(o={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(i||(i={})),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"}(A||(A={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(a||(a={})),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.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(u||(u={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(c||(c={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly"}(l||(l={}));var d=["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","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"],I=r(88),y=r.n(I),C=r(46),E=r.n(C),B=r(279),v=r.n(B),m=r(4),Q=r.n(m),b=r(99);function _(e){return(_="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 w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(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 o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return R(this,r)}}function R(e,t){return!t||"object"!==_(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 x=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&&S(e,t)}(r,e);var t=D(r);function r(){return w(this,r),t.apply(this,arguments)}return r}(b.CoreCustom),P=r(353),F=r(98),O=r.n(F),L=r(1098);function k(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,r){return(N="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=Y(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(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=Y(e);if(t){var o=Y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){return!t||"object"!==V(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 Y(e){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e){return(V="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 H,K=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":V(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},J=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":V(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},q=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&&G(e,t)}(i,e);var t,r,n,o=U(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).doc=new P.CDoc,e.versionStore=new L.VersionStore,e.setCustom(new x),e.setContextProvider(e.doc.getElementContext),e}return t=i,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return N(Y(i.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(),N(Y(i.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}}])&&k(t.prototype,r),n&&k(t,n),i}(O.a);K([Object(F.property)(),J("design:type","function"==typeof(H=void 0!==x&&x)?H:Object)],q.prototype,"custom",void 0);var W=r(123);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(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 Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(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=te(e);if(t){var o=te(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ee(this,r)}}function ee(e,t){return!t||"object"!==re(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 te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e){return(re="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 ne=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":re(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},oe=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":re(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ie=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&&Z(e,t)}(i,e);var t,r,n,o=$(i);function i(){var e;return z(this,i),(e=o.apply(this,arguments)).linkedIds=[],e}return t=i,(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}}])&&X(t.prototype,r),n&&X(t,n),i}(r.n(W).a);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)}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(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 o=ge(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return le(this,r)}}function le(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 ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ne([Object(F.property)(),oe("design:type",Boolean)],ie.prototype,"isAppendHardware",void 0);var 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&&ue(e,t)}(i,e);var t,r,n,o=ce(i);function i(){return ae(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"paramModelConstructor",get:function(){return ie}}])&&se(t.prototype,r),n&&se(t,n),i}(b.CoreParamModelAssembly),pe=r(34),he=r(2),de=r(509),Ie=Object(de.createKElementBaseClass)(),ye=pe.advanced.reportObserved,Ce=pe.advanced.reportChanged;function Ee(e){return function(e){if(Array.isArray(e))return Be(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 Be(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 Be(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 Be(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 ve(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 me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(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 o=_e(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return be(this,r)}}function be(e,t){return!t||"object"!==we(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 we(e){return(we="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)}Ie.onGet=function(e){ye(e)},Ie.addSetHook((function(e){Ce(e)}));var Se=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":we(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},De=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":we(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Re=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&&me(e,t)}(i,e);var t,r,n,o=Qe(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e}return t=i,(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(Ee(e),Ee(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(he.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(Ee(this.grooveFittings),Ee(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}}])&&ve(t.prototype,r),n&&ve(t,n),i}(Ie);Se([pe.observable,De("design:type",Array)],Re.prototype,"fittings",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"intersects",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"grooveFittings",void 0),Se([pe.observable,De("design:type",Array)],Re.prototype,"plankFaceHintModels",void 0);var Me=r(49),xe=r.n(Me),Pe=r(280),Fe=r.n(Pe);function Oe(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 Te(e,t){return(Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(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=Ne(e);if(t){var o=Ne(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ke(this,r)}}function ke(e,t){return!t||"object"!==Ge(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 Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ge(e){return(Ge="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 Ue,je,Ye,Ve,He=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ge(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ke=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ge(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=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&&Te(e,t)}(A,e);var t,r,o,i=Le(A);function A(e,t,r,o){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(a=i.call(this)).fittingData=o,a.visible=!1,a.viewColor=0;var s=r.position,u=r.size,c=r.rotate,l=r.height;return a.id=e||Fe()(),a.position=s instanceof Q.a?s:new Q.a(s),a.size=u instanceof Q.a?u:new Q.a(u),a.rotate=c instanceof Q.a?c:new Q.a(u),a.height=l,a.type="fittingType"in o?o.fittingType:n.INTERSECTED,a.visible=a.type!==n.INTERSECTED,a.linkParamModelId=t,a}return t=A,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}}])&&Oe(t.prototype,r),o&&Oe(t,o),A}(Ie);He([xe.a,Ke("design:type",String)],Je.prototype,"id",void 0),He([xe.a,Ke("design:type","function"==typeof(Ue=void 0!==Q.a&&Q.a)?Ue:Object)],Je.prototype,"position",void 0),He([xe.a,Ke("design:type","function"==typeof(je=void 0!==Q.a&&Q.a)?je:Object)],Je.prototype,"size",void 0),He([xe.a,Ke("design:type",Number)],Je.prototype,"height",void 0),He([xe.a,Ke("design:type","function"==typeof(Ye=void 0!==n&&n)?Ye:Object)],Je.prototype,"type",void 0),He([xe.a,Ke("design:type","function"==typeof(Ve=void 0!==Q.a&&Q.a)?Ve:Object)],Je.prototype,"rotate",void 0),He([xe.a,Ke("design:type",Number)],Je.prototype,"radius",void 0),He([xe.a,Ke("design:type",Object)],Je.prototype,"visible",void 0),He([xe.a,Ke("design:type",Object)],Je.prototype,"viewColor",void 0);var qe=r(183),We=r.n(qe);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 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 o=et(this).constructor;r=Reflect.construct(n,arguments,o)}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,ot,it,At,at=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},st=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ut=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)}(i,e);var t,r,n,o=Ze(i);function i(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,i),(u=o.call(this)).viewColor=0,u.id=e||Fe()(),u.position=r instanceof Q.a?r:new Q.a(r),u.size=A instanceof Q.a?A:new Q.a(A),u.rotate=n instanceof Q.a?n:new Q.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=i,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&ze(t.prototype,r),n&&ze(t,n),i}(Ie);at([xe.a,st("design:type",String)],ut.prototype,"id",void 0),at([xe.a,st("design:type","function"==typeof(rt=void 0!==o&&o)?rt:Object)],ut.prototype,"type",void 0),at([xe.a,st("design:type","function"==typeof(nt=void 0!==Q.a&&Q.a)?nt:Object)],ut.prototype,"position",void 0),at([xe.a,st("design:type","function"==typeof(ot=void 0!==Q.a&&Q.a)?ot:Object)],ut.prototype,"size",void 0),at([xe.a,st("design:type","function"==typeof(it=void 0!==Q.a&&Q.a)?it:Object)],ut.prototype,"rotate",void 0),at([xe.a,st("design:type","function"==typeof(At=void 0!==We.a&&We.a)?At:Object)],ut.prototype,"geometryModel",void 0),at([xe.a,st("design:type",Array)],ut.prototype,"originPoints",void 0),at([xe.a,st("design:type",Object)],ut.prototype,"viewColor",void 0);var ct=r(15),lt=r.n(ct);function gt(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||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,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 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 pt(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 ht=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.path=r}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 h.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new h.Vector2d}},{key:"getRealLine",value:function(){var e=gt(this.start.getPointsForRender(),2)[1],t=gt(this.end.getPointsForRender(),1)[0];return this.getType()===s.SEGMENT?new h.LineSeg2d(e,t):this.getCurveLine()}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==s.CIRCLE_ARC)return new h.LineSeg2d(e.getPosition(),t.getPosition());var r,n,o,i,A,a,u,c,l,g,f,p=this.getVector().length/2;return this.radius<p&&(this.radius=p),r=this.radius,n=e.getPosition(),o=t.getPosition(),i=this.minorArc,A=this.clockwise,a=new h.LineSeg2d(n,o),u=a.length/2,c=a.getPoint(u),l=Math.sqrt(r*r-u*u),g=(A?i?a.rightNormal:a.leftNormal:i?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),h.Arc2d.makeArcByStartEndPoints(f,n,o,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new h.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}}])&&pt(t.prototype,r),n&&pt(t,n),e}();function dt(e){return function(e){if(Array.isArray(e))return Ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||yt(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 It(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=yt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function yt(e,t){if(e){if("string"==typeof e)return Ct(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)?Ct(e,t):void 0}}function Ct(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 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)}}var Bt=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()===a.NONE&&(e=e.concat(t.getPosition())),t.getType()===a.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==a.CIRCLE&&t.getType()!==a.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===s.CIRCLE_ARC){var o=n.getCurveLine().getApproximatePoints();e=e.concat(o.slice(1,o.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),o=[],i=It(t);try{for(i.s();!(e=i.n()).done;){var A=e.value;A.getType()!==a.NONE&&o.push(A.getCurveLineAndPoints().curveLine)}}catch(e){i.e(e)}finally{i.f()}var s,u=It(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;o.push(c.getRealLine())}}catch(e){u.e(e)}finally{u.f()}return o},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new h.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new h.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.points,o=void 0===n?[]:n,i=t.lines,A=void 0===i?[]:i,u=t.forceCCW,c=void 0===u||u,l=t.depth,g=t.matrix4;if(this.depth=l,this.matrix4=g,this.setPoints(o),this.setLines(A),this.linkPointsAndLines(),c){var f=h.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));f.isSelfIntersect()||f.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,o){n.start=void 0,n.end=void 0;var i,A=r[o];i=o===t.length-1&&e.isClosedPath()?r[0]:r[o+1],n.path=e,A.path=e,i.path=e,A.nextLine=n,i.prevLine=n,n.start=A,n.end=i}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==a.NONE?e.push.apply(e,dt(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())!==a.NONE){var o=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;o&&e.push(o)}var i=t.getRealLine();e.push(i)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new h.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new h.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==a.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=h.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,o){var i;n.getType()!==a.NONE&&(i={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=i?[i]:[];return e.concat(t[o]?[].concat(A,[r(t[o])]):[].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 o=this.getPoints().indexOf(e);if(-1===o)return[];var i=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(o+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==s.SEGMENT?i.push(e):i.push(a))})),i}}])&&Et(t.prototype,r),n&&Et(t,n),e}();function vt(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mt(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 mt(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 mt(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 Qt(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 bt=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 h.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r}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()===a.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new h.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,o=void 0===n?new h.Vector2d(0,0):n,i=this.getType(),A=this.getPosition(),s=this.getPointsForRender(),u=vt(s,2),c=u[0],l=u[1];if(i===a.CIRCLE||i===a.CUT_CIRCLE){if(i===a.CIRCLE){var g=t.getVector().getPerpVector(),f=r.getVector().getPerpVector();if(g.isParallel(f))return{curveLine:h.Arc2d.makeArcByStartEndPoints(c,c,l,!0),renderPoints:s};var p=new h.Line2d(c,g),d=new h.Line2d(l,f),I=vt(p.intersectCurve(d),1)[0];if(!I)return{curveLine:new h.LineSeg2d(c,l),renderPoints:s};var y=h.Arc2d.makeArcByStartEndPoints(I.point,c,l,!1);return this.radius=void 0===this.radius?y.radius:this.radius,Math.abs(y.arcAngle)>Math.PI&&(y=h.Arc2d.makeArcByStartEndPoints(I.point,c,l,!0)),{curveLine:y,renderPoints:s}}return{curveLine:h.Arc2d.makeArcByStartEndPoints(A.added(o),c,l,!e),renderPoints:s}}return{curveLine:new h.LineSeg2d(c,l),renderPoints:s}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,o=void 0===n?[0,0]:n,i=this.offset,A=void 0===i?new h.Vector2d(0,0):i,s=this.getType(),u=this.getPosition();if(s===a.NONE)return[u,u];if(!t||!r)return[u,u];var c=new h.Ray2d(t.end.getPosition(),t.getVector().reversed()),l=new h.Ray2d(r.start.getPosition(),r.getVector());if(s===a.LINE)return[c.getPoint(o[0]),l.getPoint(o[1])];if(s===a.CIRCLE){if(void 0!==e){var g=c.direction,f=l.direction,p=g.angleTo(f),d=Math.abs(e/Math.tan(p/2));return[c.getPoint(d),l.getPoint(d)]}if(o)return[c.getPoint(o[0]),l.getPoint(o[0])]}if(s===a.CUT_CIRCLE){var I=u.added(A),y=new h.Circle2d(I,e),C=y.intersectCurve(c),E=y.intersectCurve(l);if(C.length&&E.length)return[C[0].point,E[0].point]}return[u,u]}}])&&Qt(t.prototype,r),n&&Qt(t,n),e}();function _t(e){return function(e){if(Array.isArray(e))return wt(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 wt(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 wt(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 wt(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 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 Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rt(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=xt(e);if(t){var o=xt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mt(this,r)}}function Mt(e,t){return!t||"object"!==Pt(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 xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e){return(Pt="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 Ft,Ot,Tt=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Lt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&Dt(e,t)}(A,e);var t,r,o,i=Rt(A);function A(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,o=e.path,a=e.model;return t.id=r.id,t.type=n.HARDWARE_GROOVE,t.path=o,t.depth=r.depth,t.model=a,t.linkParamModelId=a.id,t.fittingData=r,t}return t=A,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new h.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 h.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new h.Matrix4,t=this.model.getSize();return e.fromArray(_t(this.model.getConcatenatedMatrix().multiply((new E.a).makeTranslation(new Q.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:"setVisible",value:function(e){this.visible=e}}])&&St(t.prototype,r),o&&St(t,o),A}(Ie);function Nt(e,t){return(Nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gt(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=jt(e);if(t){var o=jt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ut(this,r)}}function Ut(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 jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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)}Tt([xe.a,Lt("design:type",String)],kt.prototype,"id",void 0),Tt([xe.a,Lt("design:type",Object)],kt.prototype,"viewColor",void 0),Tt([xe.a,Lt("design:type",Object)],kt.prototype,"visible",void 0),Tt([xe.a,Lt("design:type","function"==typeof(Ft=void 0!==n&&n)?Ft:Object)],kt.prototype,"type",void 0),Tt([xe.a,Lt("design:type","function"==typeof(Ot=void 0!==Bt&&Bt)?Ot:Object)],kt.prototype,"path",void 0),Tt([xe.a,Lt("design:type",Number)],kt.prototype,"depth",void 0);var Vt=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Yt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ht=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Yt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&Nt(e,t)}(r,e);var t=Gt(r);function r(e){var n,o;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!==(o=e.id)&&void 0!==o?o:Fe()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(Ie);function Jt(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]}}Vt([xe.a,Ht("design:type",String)],Kt.prototype,"id",void 0);var qt=[new h.Vector3d({x:1,y:0,z:0}),new h.Vector3d({x:0,y:1,z:0}),new h.Vector3d({x:0,y:0,z:1})];function Wt(e,t){var r,o,i,A=new h.BBox3d,a=function(e){A.addPoint(e)},s=t.getSize(),u=(new E.a).makeTranslation(new Q.a(-s.x/2,s.y/2,-s.z/2)),c=t.getConcatenatedMatrix().multiply(u),l=(new y.a).setFromRotationMatrix(c),g=new Q.a(l);if(!A)throw new Error("fitting is not validated!");if((i=e)&&i.fittingType===n.GROOVE)(function(e){var t=e.start,r=e.end,n=e.plankFaceId,o=e.depth,i=e.width,A=new h.Point3d(t),a=new h.Point3d(r),s=Jt(n,h.Vector3d).multiplied(o/2),u=s.cross(a.subtracted(A)).normalized().multiplied(i/2).added(s),c=u.reversed();return[A.added(u),A.added(c),a.added(u),a.added(c)]})(e).forEach(a),o=A.center;else if(function(e){return!(!e||e.fittingType!==n.HOLE)}(e)){(function(e){var t=e.start,r=e.end,n=e.plankFaceId,o=e.diameter,i=new h.Point3d(t),A=new h.Point3d(r),a=Jt(n,h.Vector3d).multiplied(o/2),s=a.cross(A.subtracted(i)).normalized().multiplied(o/2).added(a),u=s.reversed();return[i.added(s),i.added(u),A.added(s),A.added(u)]})(e).forEach(a);var f=new Q.a(e.start),p=new Q.a(e.end);o=f.clone().add(p).div(2);var d=p.sub(f);r=d.length();var I=(new v.a).setFromTwoVectors(Q.a.Y_AXIS,d.normalize()),C=c.clone().multiply((new E.a).makeRotationFromQuaternion(I));g=new Q.a((new y.a).setFromRotationMatrix(C))}var B=new Q.a(o).applyMatrix4(c),m=new Q.a(A.width,A.height,A.depth),b=new Je(e.id,t.id,{position:B,size:m,rotate:g,height:r},e);return b.setVisible(!0),b}function zt(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Xt(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 Xt(e,t){if(e){if("string"==typeof e)return Zt(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)?Zt(e,t):void 0}}function Zt(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 $t(e,t){var r,n=[],o=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Xt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}(Object(he.castArray)(e));try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i.id===t)return i;n.push.apply(n,zt(i.getChildNodes()))}}catch(e){o.e(e)}finally{o.f()}return n.length?$t(n,t):null}var er=r(703),tr=r(704),rr=r(10),nr=r(115),or=r.n(nr),ir=r(138),Ar=r.n(ir),ar=r(206),sr=r.n(ar),ur=r(113),cr=r.n(ur),lr=r(207),gr=r.n(lr),fr=r(421),pr=r.n(fr),hr=r(72),dr=r.n(hr),Ir=r(181),yr=r.n(Ir);function Cr(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&dr.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return dr.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new Q.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 yr.a).includePoints(e);t=new lt.a(r.min.x,r.max.y)}return e.map((function(e){return lt.a.sub(e,t)}))}(r,e.pivot),indices:n}}var Er=new Q.a(0,0,0);function Br(e){var t=e.planeTransform;return function(e){try{var t=Cr(e),r=new We.a;return r.vertices=new Float32Array(Q.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(Q.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(lt.a.toFloatArray(t.textures)),r.indices=new Uint16Array(Q.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 Er.set(e.x,e.y,0),t.localToWorld(Er)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function vr(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 mr(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 mr(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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}var Qr,br=new Q.a(0,0,0);function _r(e,t,r){for(var n,i=e.id,A=r.getConcatenatedMatrix(),a=r.getSize(),s=(new E.a).makeTranslation(new Q.a(-a.x/2,a.y/2,-a.z/2)),u=A.clone().multiply(s),c=t["@type"],l=(n=c===o.SHELL?function(e,t){var r,n=e.shell,o=er.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return tr.triangulate2(e)})),i=new We.a,A=0,a=[],s=[],u=[],c=[],l=vr(o);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return br.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 i.vertices=new Float32Array(a.flat()),i.normals=new Float32Array(s.flat()),i.textures=new Float32Array(u.flat()),i.indices=new Float32Array(c.flat()),i}(t,u):wr(t,u)).getBoundingBox3().getCenter(),g=or.a.decompose(u).rotation,f=or.a.compose(l,g,Q.a.ONE),p=(new E.a).getInverse(f),h=new Float32Array(n.vertices),d=new Ar.a,I=0;I<h.length;I+=3)br.set(h[I],h[I+1],h[I+2]).applyMatrix4(p),d.includePoint(br);return new ut(i,c,l,g,d.getSize(),n,t.points.map((function(e){return new Q.a(e).applyMatrix4(u)})))}function wr(e,t){var r=e.points.map((function(e){return new Q.a(e).applyMatrix4(t)})),n=(new sr.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,o=r[1].clone().sub(r[0]).normalize(),i=n.clone().cross(o).normalize(),A=new pr.a(o,i,n,r[0]),a=r.map((function(e){return new lt.a(A.worldToLocal(e))})),s=new cr.a(a);return Br({planeTransform:A,shapes:[new gr.a(s)]})}function Sr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(r),!0).forEach((function(t){Rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mr(e,t){var r=t.clone().inversed(),n=new Bt({id:e.id,points:e.points.map((function(e){return Dr(Dr({},e),{},{position:(t=e.position,n=new h.Point3d(t).appliedMatrix4(r),new h.Point2d(n))});var t,n})).map(xr),lines:e.lines.map(Pr),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function xr(e){return new bt(e)}function Pr(e){return new ht(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(Qr||(Qr={}));var Fr=new h.Tolerance.Tolerance(.01,.01,.01);function Or(e){if(e.getType()===a.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 Tr(e){return e.type===s.SEGMENT||(!(e.type!==s.CIRCLE_ARC||!h.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==s.CIRCLE_ARC||!h.Num.isBigger(e.getVector().length,2*e.radius)))}function Lr(e){return e.type===Qr.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===Qr.LINE?e.val.getRealLine():void 0}function kr(e,t){if(e.type===Qr.POINT&&e.val.getType()===a.NONE)return!0;if(t.type===Qr.POINT&&t.val.getType()===a.NONE)return!0;var r=Lr(e),n=Lr(t);if(!r||!n)return!1;var o=h.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Fr);return!(1===o.length&&!o[0].point.isEqual(r.startPoint,.01)&&!o[0].point.isEqual(r.endPoint,.01))&&(!(o.length>1)||o.every((function(e){return e.point.isEqual(o[0].point,.01)})))}function Nr(e,t){var r=function(e,t){var r=Jt(e,h.Vector3d),n=qt.find((function(e){return 0===e.dot(r)})),o=r.clone().cross(n).normalized(),i=h.Matrix4.makeBasis(n,o,r);return t&&i.setTranslation(new h.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))),i}(e.plankFaceId,t.getSize()),n=new kt({data:e,path:Mr(e,r),model:t});return n.setVisible(!0),n}function Gr(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 Ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jr(e,t){var r=t.findRelativeModel,n=t.transformModel,o=t.color;return Object(he.map)(e,(function(e,t){var i=r(t);return i?Object(he.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?Gr(Object(r),!0).forEach((function(t){Ur(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),i);return o&&t.setViewColor(o),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}var Yr=r(0);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)}
67
67
  /*!
68
- * @qunhe/custom-miniapp-outer-sdk v0.11.1
68
+ * @qunhe/custom-miniapp-outer-sdk v0.17.1-alpha.1
69
69
  * (c) 2021
70
70
  * @license MIT
71
- */var Cs,Es,Bs,vs,ms,Qs,bs;
71
+ */var Hr,Kr,Jr,qr,Wr,zr,Xr;
72
72
  /*!
73
73
  * @qunhe/custom-apass-api v0.11.0
74
74
  * (c) 2021 yuanlin <yuanlin@qunhemail.com>
75
75
  * @license ISC
76
- */!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Cs||(Cs={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Es||(Es={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE"}(Bs||(Bs={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(vs||(vs={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(ms||(ms={})),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"}(Qs||(Qs={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(bs||(bs={})),new Map([[bs.Cabinet,0],[bs.Wardrobe,1],[bs.DoorWindow,2],[bs.CabinetCopy,4],[bs.WardrobeCopy,5],[bs.DoorWindowCopy,6]]);
76
+ */!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Hr||(Hr={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Kr||(Kr={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE"}(Jr||(Jr={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(qr||(qr={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Wr||(Wr={})),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"}(zr||(zr={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(Xr||(Xr={})),new Map([[Xr.Cabinet,0],[Xr.Wardrobe,1],[Xr.DoorWindow,2],[Xr.CabinetCopy,4],[Xr.WardrobeCopy,5],[Xr.DoorWindowCopy,6]]);
77
77
  /*! *****************************************************************************
78
78
  Copyright (c) Microsoft Corporation.
79
79
 
@@ -88,7 +88,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
88
88
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
89
89
  PERFORMANCE OF THIS SOFTWARE.
90
90
  ***************************************************************************** */
91
- var _s=function(){return(_s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ws="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Ss=new Array(36);var Ds,Rs=function(){function e(){this.data={name:"",displayName:"",type:Qs.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:Bs.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:Bs.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 Ms(e){var t=new Rs;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(Ds||(Ds={}));var xs,Ps,Fs,Os,Ts,Ls,ks,Ns=function(){function e(){this._changeMap={}}return e.prototype.getRoot=function(){return this.root},e.prototype.clone=function(){var t=this.toJSON();t._changeMap=_s(_s({},t._changeMap),{cloned:!0});var r=e.deserialize(JSON.stringify(t));return 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)Ss[t]="-";else if(14===t)Ss[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Ss[t]=ws[19===t?3&r|8:r]}return Ss.join("")}(),r},e.prototype.setRotate=function(e){this.__trackUpdateField({type:Bs.ATTRIBUTE,attr:"rotate"},this.rotate,e),this.rotate=e},e.prototype.getRotate=function(){return this.rotate},e.prototype.setRotation=function(e){this.__trackUpdateField({type:Bs.ATTRIBUTE,attr:"rotation"},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){this.__trackUpdateField({type:Bs.ATTRIBUTE,attr:"position"},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.dispose=function(){this._changeMap.deleted=!0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(!this.children.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:vs.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(!this.accessories.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:vs.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.toJSON=function(e){void 0===e&&(e=!0);var t=this.isRoot,r=e&&!t?this.root:this,n={id:r.id,position:r.position,rotate:r.rotate,rotation:r.rotation,size:r.size,params:Array.from(r.params).map((function(e){return[e[0],e[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(!1)})),accessories:r.accessories.map((function(e){return e.toJSON(!1)})),_changeMap:r._changeMap,_origin:r._origin};return e&&!t&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(e){var t=function e(t,r,n){void 0===r&&(r=new Map);var o=new Ns;o.id=t.id,o.position=t.position,o.rotate=t.rotate,o.rotation=t.rotation,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],Ms(e[1])]}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);if(r.set(o.id,o),o.children=t.children.map((function(t){return e(t,r,n||o)})),o.accessories=t.accessories.map((function(t){return e(t,r,n||o)})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(JSON.parse(e));return this.id=t.id,this.position=t.position,this.rotate=t.rotate,this.rotation=t.rotation,this.size=t.size,this.params=t.params,this.productId=t.productId,this.category=t.category,this.isRoot=t.isRoot,this.modelType=t.modelType,this.isHidden=t.isHidden,this._origin=t._origin,this._changeMap=t._changeMap,this.root=t.root,this.children=t.children,this.accessories=t.accessories,this},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=[],this._changeMap.update=n),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&n.push(e)},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 o=n.getChild(),i=n.getAccessory();if(o.some(t)||i.some(t))return this._parent=n,n;r.push.apply(r,o),r.push.apply(r,i)}},e}();!function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(xs||(xs={})),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"}(Ps||(Ps={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(Fs||(Fs={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(Os||(Os={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(Ts||(Ts={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(Ls||(Ls={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(ks||(ks={}));
91
+ var Zr=function(){return(Zr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),en=new Array(36);var tn,rn=function(){function e(){this.data={name:"",displayName:"",type:zr.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:Jr.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:Jr.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 nn(e){var t=new rn;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(tn||(tn={}));var on,An,an,sn,un,cn,ln,gn=function(){function e(){this._changeMap={}}return e.prototype.getRoot=function(){return this.root},e.prototype.clone=function(){var t=this.toJSON();t._changeMap=Zr(Zr({},t._changeMap),{cloned:!0});var r=e.deserialize(JSON.stringify(t));return 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)en[t]="-";else if(14===t)en[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,en[t]=$r[19===t?3&r|8:r]}return en.join("")}(),r},e.prototype.setRotate=function(e){this.__trackUpdateField({type:Jr.ATTRIBUTE,attr:"rotate"},this.rotate,e),this.rotate=e},e.prototype.getRotate=function(){return this.rotate},e.prototype.setRotation=function(e){this.__trackUpdateField({type:Jr.ATTRIBUTE,attr:"rotation"},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){this.__trackUpdateField({type:Jr.ATTRIBUTE,attr:"position"},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.dispose=function(){this._changeMap.deleted=!0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(!this.children.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:qr.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(!this.accessories.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:qr.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.toJSON=function(e){void 0===e&&(e=!0);var t=this.isRoot,r=e&&!t?this.root:this,n={id:r.id,position:r.position,rotate:r.rotate,rotation:r.rotation,size:r.size,params:Array.from(r.params).map((function(e){return[e[0],e[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(!1)})),accessories:r.accessories.map((function(e){return e.toJSON(!1)})),_changeMap:r._changeMap,_origin:r._origin};return e&&!t&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(e){var t=function e(t,r,n){void 0===r&&(r=new Map);var o=new gn;o.id=t.id,o.position=t.position,o.rotate=t.rotate,o.rotation=t.rotation,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],nn(e[1])]}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);if(r.set(o.id,o),o.children=t.children.map((function(t){return e(t,r,n||o)})),o.accessories=t.accessories.map((function(t){return e(t,r,n||o)})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(JSON.parse(e));return this.id=t.id,this.position=t.position,this.rotate=t.rotate,this.rotation=t.rotation,this.size=t.size,this.params=t.params,this.productId=t.productId,this.category=t.category,this.isRoot=t.isRoot,this.modelType=t.modelType,this.isHidden=t.isHidden,this._origin=t._origin,this._changeMap=t._changeMap,this.root=t.root,this.children=t.children,this.accessories=t.accessories,this},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=[],this._changeMap.update=n),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&n.push(e)},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 o=n.getChild(),i=n.getAccessory();if(o.some(t)||i.some(t))return this._parent=n,n;r.push.apply(r,o),r.push.apply(r,i)}},e}();!function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(on||(on={})),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"}(An||(An={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(an||(an={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(sn||(sn={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(un||(un={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(cn||(cn={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(ln||(ln={}));
92
92
  /*! *****************************************************************************
93
93
  Copyright (c) Microsoft Corporation.
94
94
 
@@ -103,9 +103,9 @@ 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
- var Gs=function(e,t){return(Gs=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 Us(e,t){function r(){this.constructor=e}Gs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var js,Ys,Vs=function(){return(Vs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Hs(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ys(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(js||(js={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(Ys||(Ys={}));var Ks,Js,qs,Ws;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getAvailableMiniApp=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(Ks||(Ks={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(Js||(Js={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(qs||(qs={})),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"}(Ws||(Ws={}));var zs;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.loadMode=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"loadMode"),Hs([Is.anno.decl.api()],t.prototype,"isOpened"),Hs([Is.anno.decl.api()],t.prototype,"close"),Hs([Is.anno.decl.event()],t.prototype,"loaded"),Hs([Is.anno.decl.api({ACL:Ts.PROTECTED})],t.prototype,"bootstrap"),Hs([Is.anno.decl.api({ACL:Ts.PRIVATE})],t.prototype,"bootstrapDev"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(Is.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(zs||(zs={}));var Xs;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getDesignBaseInfo=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api({ACL:Ts.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:Ts.PROTECTED})],t)}(Is.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(Xs||(Xs={}));var Zs;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getDocStackState=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"docStackState"),Hs([Is.anno.decl.api()],t.prototype,"getDocStackState"),Hs([Is.anno.decl.event()],t.prototype,"undo"),Hs([Is.anno.decl.api()],t.prototype,"doUndo"),Hs([Is.anno.decl.event()],t.prototype,"redo"),Hs([Is.anno.decl.api()],t.prototype,"doRedo"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.confirm=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"confirm"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(Is.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(Zs||(Zs={}));var $s;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.open=function(e,t){return Object(Is.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"whenSelected"),Hs([Is.anno.decl.api()],t.prototype,"open"),Hs([Is.anno.decl.api()],t.prototype,"close"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.success=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"success"),Hs([Is.anno.decl.api()],t.prototype,"error"),Hs([Is.anno.decl.api()],t.prototype,"info"),Hs([Is.anno.decl.api()],t.prototype,"warn"),Hs([Is.anno.decl.api()],t.prototype,"loading"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(Is.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"}($s||($s={}));var eu;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.hideAllMenuItems=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.notify()],t.prototype,"hideAllMenuItems"),Hs([Is.anno.decl.notify()],t.prototype,"showAllMenuItems"),Hs([Is.anno.decl.notify()],t.prototype,"hidePanel"),Hs([Is.anno.decl.notify()],t.prototype,"showPanel"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(Is.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(eu||(eu={}));var tu,ru,nu,ou,iu;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.currentMainView=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watchMainViewSense"),Hs([Is.anno.decl.api()],t.prototype,"currentMainView"),Hs([Is.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelected=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watcher"),Hs([Is.anno.decl.api()],t.prototype,"getSelected"),Hs([Is.anno.decl.api()],t.prototype,"unSelected"),Hs([Is.anno.decl.api()],t.prototype,"select"),Hs([Is.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),Hs([Is.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(Is.ServService);!function(e){e.TopToBottom="TopToBottom",e.LeftToRight="LeftToRight",e.FrontToBack="FrontToBack"}(tu||(tu={})),function(e){e.LeftFront="LeftFront",e.LeftBack="LeftBack",e.RightFront="RightFront",e.RightBack="RightBack"}(ru||(ru={})),function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(nu||(nu={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront"}(ou||(ou={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(iu||(iu={}));var Au,au,su,uu;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.highlightCornerCut=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"highlightCornerCut"),Hs([Is.anno.decl.api()],t.prototype,"getStructures"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:Ts.PRIVATE})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),Hs([Is.anno.decl.event()],t.prototype,"onRequestReceived"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelectedWalls=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watcher"),Hs([Is.anno.decl.api()],t.prototype,"getSelectedWalls"),Hs([Is.anno.decl.api()],t.prototype,"unSelected"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(Is.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(Au||(Au={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(au||(au={})),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"}(su||(su={})),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"}(uu||(uu={}));var cu;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watcher"),Hs([Is.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),Hs([Is.anno.decl.api()],t.prototype,"generatePartitionWalls"),Hs([Is.anno.decl.api()],t.prototype,"editPartitionWalls"),Hs([Is.anno.decl.api()],t.prototype,"setIWallPavingDirection"),Hs([Is.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),Hs([Is.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.undo=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"undo"),Hs([Is.anno.decl.api()],t.prototype,"redo"),Hs([Is.anno.decl.api()],t.prototype,"clear"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(Is.ServService);!function(e){e.style="style",e.material="material"}(cu||(cu={}));var lu,gu,fu;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelectedLConnectors=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watcher"),Hs([Is.anno.decl.api()],t.prototype,"getSelectedLConnectors"),Hs([Is.anno.decl.api()],t.prototype,"editSelectedLConnectors"),Hs([Is.anno.decl.api()],t.prototype,"unSelected"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t=Hs([Is.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 Us(t,e),t.prototype.getKeys=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getKeys"),Hs([Is.anno.decl.api()],t.prototype,"getItem"),Hs([Is.anno.decl.api()],t.prototype,"getItems"),Hs([Is.anno.decl.api()],t.prototype,"setItem"),Hs([Is.anno.decl.api()],t.prototype,"removeItem"),Hs([Is.anno.decl.api()],t.prototype,"removeItems"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(Is.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(Is.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),Hs([Is.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.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"}(lu||(lu={})),function(e){e.TRUE="true",e.FALSE="false"}(gu||(gu={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(fu||(fu={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getDesignRoomList=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getDesignRoomList"),Hs([Is.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(Is.ServService);var pu,hu,du=function(e){return e&&"object"===ys(e)?e.toJSON():e},Iu=function(e){return e&&"object"===ys(e)?Ns.deserialize(JSON.stringify(e)):e},yu={onRetnTransform:{recv:Iu,send:du}},Cu={onCallTransform:{recv:function(e){return Vs(Vs({},e),{models:e.models.map(Iu)})},send:function(e){return Vs(Vs({},e),{models:e.models.map(du)})}}},Eu=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.newParamModelByCategory=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api(yu)],t.prototype,"newParamModelByCategory"),Hs([Is.anno.decl.api(yu)],t.prototype,"newParamModelByBrandGoodId"),Hs([Is.anno.decl.api(yu)],t.prototype,"getParamModelByModelId"),Hs([Is.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Iu)}:Vs(Vs({},e),{data:e.data.map(Iu)})},send:function(e){return Array.isArray(e)?e.map(Iu):Vs(Vs({},e),{data:e.data.map(Iu)})}}})],t.prototype,"listTopModels"),Hs([Is.anno.decl.api(Cu)],t.prototype,"save"),Hs([Is.anno.decl.api(Cu)],t.prototype,"remove"),t=Hs([Is.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getDesignJson=function(e){throw Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"getDesignJson"),t=Hs([Is.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(Is.ServService),function(e){return e&&"object"===ys(e)?Vs(Vs({},e),{parent:e.parent.toJSON()}):e}),Bu=function(e){return e&&"object"===ys(e)?Vs(Vs({},e),{parent:Ns.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelected=function(){throw Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event({transform:{recv:Bu,send:Eu}})],t.prototype,"selection"),Hs([Is.anno.decl.api({onRetnTransform:{send:Eu,recv:Bu}})],t.prototype,"getSelected"),t=Hs([Is.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.current=function(){throw Object(Is.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(Is.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"current"),Hs([Is.anno.decl.api()],t.prototype,"enter"),Hs([Is.anno.decl.api()],t.prototype,"exit"),t=Hs([Is.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(Is.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"}(pu||(pu={})),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"}(hu||(hu={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var vu;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.createHandsFree=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"createHandsFree"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.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"}(vu||(vu={}));var mu;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.createWineCell=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"createWineCell"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(mu||(mu={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.showModelByCateId=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"showModelByCateId"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.remove=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.api()],t.prototype,"remove"),Hs([Is.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),Hs([Is.anno.decl.api()],t.prototype,"updateAttacheds"),Hs([Is.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),Hs([Is.anno.decl.api()],t.prototype,"getParamModelRootList"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Us(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(Is.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Is.API_UNSUPPORT)()},Hs([Is.anno.decl.event()],t.prototype,"watcher"),Hs([Is.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),Hs([Is.anno.decl.api()],t.prototype,"unSelected"),t=Hs([Is.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(Is.ServService);function Qu(e){return(Qu="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)}
106
+ var fn=function(e,t){return(fn=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 pn(e,t){function r(){this.constructor=e}fn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var hn,dn,In=function(){return(In=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function yn(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(hn||(hn={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(dn||(dn={}));var Cn,En,Bn,vn;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getAvailableMiniApp=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(Cn||(Cn={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(En||(En={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(Bn||(Bn={})),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"}(vn||(vn={}));var mn;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.loadMode=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"loadMode"),yn([Yr.anno.decl.api()],t.prototype,"isOpened"),yn([Yr.anno.decl.api()],t.prototype,"close"),yn([Yr.anno.decl.event()],t.prototype,"loaded"),yn([Yr.anno.decl.api({ACL:un.PROTECTED})],t.prototype,"bootstrap"),yn([Yr.anno.decl.api({ACL:un.PRIVATE})],t.prototype,"bootstrapDev"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(mn||(mn={}));var Qn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getDesignBaseInfo=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api({ACL:un.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:un.PROTECTED})],t)}(Yr.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(Qn||(Qn={}));var bn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getDocStackState=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"docStackState"),yn([Yr.anno.decl.api()],t.prototype,"getDocStackState"),yn([Yr.anno.decl.event()],t.prototype,"undo"),yn([Yr.anno.decl.api()],t.prototype,"doUndo"),yn([Yr.anno.decl.event()],t.prototype,"redo"),yn([Yr.anno.decl.api()],t.prototype,"doRedo"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.confirm=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"confirm"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(bn||(bn={}));var _n;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.open=function(e,t){return Object(Yr.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"whenSelected"),yn([Yr.anno.decl.api()],t.prototype,"open"),yn([Yr.anno.decl.api()],t.prototype,"close"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.success=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"success"),yn([Yr.anno.decl.api()],t.prototype,"error"),yn([Yr.anno.decl.api()],t.prototype,"info"),yn([Yr.anno.decl.api()],t.prototype,"warn"),yn([Yr.anno.decl.api()],t.prototype,"loading"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(Yr.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"}(_n||(_n={}));var wn;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.hideAllMenuItems=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.notify()],t.prototype,"hideAllMenuItems"),yn([Yr.anno.decl.notify()],t.prototype,"showAllMenuItems"),yn([Yr.anno.decl.notify()],t.prototype,"hidePanel"),yn([Yr.anno.decl.notify()],t.prototype,"showPanel"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(wn||(wn={}));var Sn,Dn,Rn,Mn,xn,Pn,Fn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.currentMainView=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watchMainViewSense"),yn([Yr.anno.decl.api()],t.prototype,"currentMainView"),yn([Yr.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelected=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelected"),yn([Yr.anno.decl.api()],t.prototype,"unSelected"),yn([Yr.anno.decl.api()],t.prototype,"select"),yn([Yr.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),yn([Yr.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e.TopToBottom="TopToBottom",e.LeftToRight="LeftToRight",e.FrontToBack="FrontToBack"}(Sn||(Sn={})),function(e){e.LeftFront="LeftFront",e.LeftBack="LeftBack",e.RightFront="RightFront",e.RightBack="RightBack"}(Dn||(Dn={})),function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Rn||(Rn={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront"}(Mn||(Mn={})),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"}(xn||(xn={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(Pn||(Pn={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(Fn||(Fn={}));var On,Tn,Ln,kn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.highlightCornerCut=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.fitModule=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"highlightCornerCut"),yn([Yr.anno.decl.api()],t.prototype,"getStructures"),yn([Yr.anno.decl.api()],t.prototype,"fitModule"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:un.PRIVATE})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),yn([Yr.anno.decl.event()],t.prototype,"onRequestReceived"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedWalls=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedWalls"),yn([Yr.anno.decl.api()],t.prototype,"unSelected"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(On||(On={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(Tn||(Tn={})),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"}(Ln||(Ln={})),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"}(kn||(kn={}));var Nn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),yn([Yr.anno.decl.api()],t.prototype,"generatePartitionWalls"),yn([Yr.anno.decl.api()],t.prototype,"editPartitionWalls"),yn([Yr.anno.decl.api()],t.prototype,"setIWallPavingDirection"),yn([Yr.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.undo=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"undo"),yn([Yr.anno.decl.api()],t.prototype,"redo"),yn([Yr.anno.decl.api()],t.prototype,"clear"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(Yr.ServService);!function(e){e.style="style",e.material="material"}(Nn||(Nn={}));var Gn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedLConnectors=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedLConnectors"),yn([Yr.anno.decl.api()],t.prototype,"editSelectedLConnectors"),yn([Yr.anno.decl.api()],t.prototype,"unSelected"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedColumns=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedColumns"),yn([Yr.anno.decl.api()],t.prototype,"unSelected"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(Gn||(Gn={}));var Un,jn,Yn;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.generateColumns=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"generateColumns"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:un.PRIVATE})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t=yn([Yr.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 pn(t,e),t.prototype.getKeys=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getKeys"),yn([Yr.anno.decl.api()],t.prototype,"getItem"),yn([Yr.anno.decl.api()],t.prototype,"getItems"),yn([Yr.anno.decl.api()],t.prototype,"setItem"),yn([Yr.anno.decl.api()],t.prototype,"removeItem"),yn([Yr.anno.decl.api()],t.prototype,"removeItems"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(Yr.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(Yr.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),yn([Yr.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.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"}(Un||(Un={})),function(e){e.TRUE="true",e.FALSE="false"}(jn||(jn={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Yn||(Yn={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getDesignRoomList=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getDesignRoomList"),yn([Yr.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(Yr.ServService);var Vn,Hn,Kn=function(e){return e&&"object"===Vr(e)?e.toJSON():e},Jn=function(e){return e&&"object"===Vr(e)?gn.deserialize(JSON.stringify(e)):e},qn={onRetnTransform:{recv:Jn,send:Kn}},Wn={onCallTransform:{recv:function(e){return In(In({},e),{models:e.models.map(Jn)})},send:function(e){return In(In({},e),{models:e.models.map(Kn)})}}},zn=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.newParamModelByCategory=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api(qn)],t.prototype,"newParamModelByCategory"),yn([Yr.anno.decl.api(qn)],t.prototype,"newParamModelByBrandGoodId"),yn([Yr.anno.decl.api(qn)],t.prototype,"getParamModelByModelId"),yn([Yr.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Jn)}:In(In({},e),{data:e.data.map(Jn)})},send:function(e){return Array.isArray(e)?e.map(Jn):In(In({},e),{data:e.data.map(Jn)})}}})],t.prototype,"listTopModels"),yn([Yr.anno.decl.api(Wn)],t.prototype,"save"),yn([Yr.anno.decl.api(Wn)],t.prototype,"remove"),t=yn([Yr.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getDesignJson=function(e){throw Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"getDesignJson"),t=yn([Yr.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(Yr.ServService),function(e){return e&&"object"===Vr(e)?In(In({},e),{parent:e.parent.toJSON()}):e}),Xn=function(e){return e&&"object"===Vr(e)?In(In({},e),{parent:gn.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelected=function(){throw Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event({transform:{recv:Xn,send:zn}})],t.prototype,"selection"),yn([Yr.anno.decl.api({onRetnTransform:{send:zn,recv:Xn}})],t.prototype,"getSelected"),t=yn([Yr.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.current=function(){throw Object(Yr.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(Yr.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"current"),yn([Yr.anno.decl.api()],t.prototype,"enter"),yn([Yr.anno.decl.api()],t.prototype,"exit"),t=yn([Yr.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(Yr.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"}(Vn||(Vn={})),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"}(Hn||(Hn={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Zn;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.createHandsFree=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"createHandsFree"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.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"}(Zn||(Zn={}));var $n;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.createWineCell=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"createWineCell"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}($n||($n={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.showModelByCateId=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"showModelByCateId"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.remove=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.api()],t.prototype,"remove"),yn([Yr.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),yn([Yr.anno.decl.api()],t.prototype,"updateAttacheds"),yn([Yr.anno.decl.api()],t.prototype,"updateAttachedsNew"),yn([Yr.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),yn([Yr.anno.decl.api()],t.prototype,"getParamModelRootList"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pn(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Yr.API_UNSUPPORT)()},yn([Yr.anno.decl.event()],t.prototype,"watcher"),yn([Yr.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),yn([Yr.anno.decl.api()],t.prototype,"unSelected"),t=yn([Yr.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(Yr.ServService);function eo(e){return(eo="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)}
107
107
  /*!
108
- * @qunhe/custom-miniapp-sdk v0.7.0
108
+ * @qunhe/custom-miniapp-sdk v0.9.0
109
109
  * (c) 2021
110
110
  * @license MIT
111
111
  */
@@ -122,12 +122,12 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
122
122
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
123
123
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
124
124
  PERFORMANCE OF THIS SOFTWARE.
125
- ***************************************************************************** */var bu=function(e,t){return(bu=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 _u(e,t){function r(){this.constructor=e}bu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function wu(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Qu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A}var Su,Du=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _u(t,e),t.prototype.request=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(Is.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(Is.API_UNSUPPORT)()},wu([Is.anno.decl.api()],t.prototype,"request"),wu([Is.anno.decl.api()],t.prototype,"get"),wu([Is.anno.decl.api()],t.prototype,"delete"),wu([Is.anno.decl.api()],t.prototype,"post"),wu([Is.anno.decl.api()],t.prototype,"put"),wu([Is.anno.decl.api()],t.prototype,"encryptedRequest"),wu([Is.anno.decl.api()],t.prototype,"encryptedGet"),wu([Is.anno.decl.api()],t.prototype,"encryptedDelete"),wu([Is.anno.decl.api()],t.prototype,"encryptedPost"),wu([Is.anno.decl.api()],t.prototype,"encryptedPut"),wu([Is.anno.decl.api()],t.prototype,"gzipRequest"),wu([Is.anno.decl.api()],t.prototype,"gzipGet"),wu([Is.anno.decl.api()],t.prototype,"gzipPost"),wu([Is.anno.decl.api()],t.prototype,"gzipPut"),wu([Is.anno.decl.api()],t.prototype,"pbGzipGet"),wu([Is.anno.decl.api()],t.prototype,"pbGzipPost"),t=wu([Is.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:Ts.INNER})],t)}(Is.ServService);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}_u(t,e),t.prototype.getAllAvailableService=function(){return Object(Is.API_UNSUPPORT)()},wu([Is.anno.decl.api()],t.prototype,"getAllAvailableService"),t=wu([Is.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:Ts.INNER})],t)}(Is.ServService);!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"}(Su||(Su={}));var Ru=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _u(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(Is.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(Is.API_UNSUPPORT)()},wu([Is.anno.decl.api()],t.prototype,"getParamModelDataByIds"),wu([Is.anno.decl.api()],t.prototype,"getTopParamModels"),t=wu([Is.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:Ts.INNER})],t)}(Is.ServService),Mu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _u(t,e),t.prototype.lockModelBySplit=function(){return Object(Is.API_UNSUPPORT)()},wu([Is.anno.decl.api()],t.prototype,"lockModelBySplit"),t=wu([Is.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:Ts.INNER})],t)}(Is.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}_u(t,e),t.prototype.getPackageInfo=function(){return Object(Is.API_UNSUPPORT)()},wu([Is.anno.decl.event()],t.prototype,"onRequestReceived"),wu([Is.anno.decl.api()],t.prototype,"getPackageInfo"),t=wu([Is.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:Ts.PRIVATE})],t)})(Is.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}_u(t,e),wu([Is.anno.decl.event()],t.prototype,"onBorderResultReceived"),t=wu([Is.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:Ts.PRIVATE})],t)}(Is.ServService);function xu(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Pu(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){xu(i,n,o,A,a,"next",e)}function a(e){xu(i,n,o,A,a,"throw",e)}A(void 0)}))}}var Fu,Ou,Tu,Lu,ku,Nu,Gu,Uu,ju=function(){var e=Pu(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(he.castArray)(t),n=Is.sappSDK.getServiceUnsafe(Ru),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Yu=os(function(){var e=Pu(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Is.sappSDK.getServiceUnsafe(ds.MiniAppParamModelJsonDataService),e.abrupt("return",r.getCachedModelJsonDataByModelId(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){return e})),Vu=os(function(){var e=Pu(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Is.sappSDK.getServiceUnsafe(ds.MiniAppParamModelJsonDataService),e.abrupt("return",r.getModelJsonDataByModelId(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){return e})),Hu=r(157),Ku=r.n(Hu);!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(Fu||(Fu={})),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"}(Ou||(Ou={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Tu||(Tu={})),function(e){e.SCENE_ID="cp"}(Lu||(Lu={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(ku||(ku={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Nu||(Nu={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(Gu||(Gu={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Uu||(Uu={}));Uu.SHADING,Uu.OUTLINE_WITH_SHADING,Uu.TRANSLUCENT,Uu.OUTLINE_AND_TRANSLUCENT;var Ju={maxAge:6e5,max:20};function qu(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,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zu(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Xu(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){zu(i,n,o,A,a,"next",e)}function a(e){zu(i,n,o,A,a,"throw",e)}A(void 0)}))}}var Zu,$u,ec=Ku()(function(){var e=Xu(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hi(),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?qu(Object(r),!0).forEach((function(t){Wu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},Ju)),tc=Ku()(function(){var e=Xu(f.a.mark((function e(t){var r,n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=hi(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return o=e.sent,e.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(he.mapValues)(o.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)}}());!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Zu||(Zu={})),function(e){e.SELECTED="SELECTED"}($u||($u={}));var rc=r(97),nc=r.n(rc);function oc(e,t){return(oc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(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=ac(e);if(t){var o=ac(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ac(this,r)}}function Ac(e,t){return!t||"object"!==sc(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 ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sc(e){return(sc="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 uc,cc=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":sc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},lc=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":sc(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},gc=Symbol("paramModelAssembly"),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=ic(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=gc,n.entityId=e.getId(),n}return r}(un.Entity),pc=fc=cc([Object(un.provideEntityAPIs)([new un.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),lc("design:paramtypes",["function"==typeof(uc=void 0!==b.CoreParamModelAssembly&&b.CoreParamModelAssembly)?uc:Object])],fc);function hc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dc(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&&Ic(e,t)}function Ic(e,t){return(Ic=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=Ec(e);if(t){var o=Ec(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cc(this,r)}}function Cc(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 Ec(e){return(Ec=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 vc=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},mc=function(e){dc(r,e);var t=yc(r);function r(e,n){var o;return hc(this,r),(o=t.call(this)).model=e,o.context=n,o._parent=void 0,o._children=[],o.entityType=n.type,o.entityId=e.getId(),o}return r}(un.Entity),Qc=function(e){dc(r,e);var t=yc(r);function r(){return hc(this,r),t.apply(this,arguments)}return r}(mc);Qc=vc([Object(un.provideEntityAPIs)([new un.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Qc);var bc=r(184);function _c(e){return(_c="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 wc=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_c(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Sc=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":_c(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Dc=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 Rc(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,o=e.texture,i=e.opacity;if(!(r&&r.length||n&&n.length||o))return t.getMesh()+(1!==i?String(i):"")+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 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)}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 Fc(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 o=Tc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oc(this,r)}}function Oc(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 Tc(e){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}wc([pe.observable,Sc("design:type",Number)],Dc.prototype,"opacity",void 0),wc([pe.observable,Sc("design:type",Boolean)],Dc.prototype,"visible",void 0);var Lc=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)}(i,e);var t,r,n,o=Fc(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).props=e,t.material=new ta.LineBasicMaterial({color:Zu.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=i,(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 o=(t=n,(r=new ta.BufferGeometry).addAttribute("position",new ta.Float32BufferAttribute(t,3)),r);this.geometry=o,this.computeLineDistances()}var i=this.props,A=i.color,a=void 0===A?Zu.outline:A,s=i.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&xc(t.prototype,r),n&&xc(t,n),i}(ta.LineSegments),kc=r(352),Nc=r(80);function Gc(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 Uc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jc=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gc(Object(r),!0).forEach((function(t){Uc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:ta.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});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 Vc(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){Hc(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}function Hc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kc(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Jc(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Kc(i,n,o,A,a,"next",e)}function a(e){Kc(i,n,o,A,a,"throw",e)}A(void 0)}))}}function qc(e){return Wc.apply(this,arguments)}function Wc(){return(Wc=Jc(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g,p,h;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,o=t.opacity,i=void 0===o?1:o,A=t.textureUrl,a=t.textureSize,s=null==n?void 0:n.getRefractColor(),u=Vc({},jc),s&&(c=Object(Nc.clamp)(Math.max(s.x,s.y,s.z),0,1),r.transparent=c>.01,u.opacity=Math.max(1-c,.1)),i<1&&(u.transparent=!0,u.opacity=i),l=A||(null==n?void 0:n.getDiffuseTexture()),!Object(he.isEmpty)(l)){e.next=12;break}(g=null==n?void 0:n.getDiffuseColor())&&(u.color=new ta.Color(g.x,g.y,g.z).getHex()),u.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=l,a){e.next=18;break}return e.next=16,Object(kc.loadImage)(l);case 16:p=e.sent,a={x:p.naturalWidth,y:p.naturalHeight};case 18:return e.next=20,Object(kc.loadTexture)(l,{wrapS:ta.WebGLTextureWrap.Repeat,wrapT:ta.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(h=e.sent).repeat=new ta.Vector2(1/a.x,1/a.y),h.updateMatrix(),u.uvTransform=h.matrix,u.texture=h;case 25:r.setValues(u);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zc(e){return(zc="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 Xc(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Zc(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Xc(i,n,o,A,a,"next",e)}function a(e){Xc(i,n,o,A,a,"throw",e)}A(void 0)}))}}function $c(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 el(e,t){return(el=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tl(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=nl(e);if(t){var o=nl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rl(this,r)}}function rl(e,t){return!t||"object"!==zc(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 nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ol=new ta.BufferGeometry;var il=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&&el(e,t)}(a,e);var t,r,n,o,i,A=tl(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=Wr.EDCCountCategory.PHONG,t.material=new ta.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:(i=Zc(f.a.mark((function e(t){var r,n;return f.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 i.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,o,i,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new ta.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),o=new Float32Array(e.normals),i=new Float32Array(e.textures),t.index=new ta.BufferAttribute(r,1),t.addAttribute("position",new ta.BufferAttribute(n,3)),t.addAttribute("uv",new ta.BufferAttribute(i,2)),o&&o.length?t.addAttribute("normal",new ta.BufferAttribute(o,3)):t.computeVertexNormals(),t):ol}},{key:"updateMaterial",value:(o=Zc(f.a.mark((function e(){var t,r,n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,o=t.tiledImgUrl,i=t.textureSize,e.next=3,qc({material:this.material,materialInfo:r,opacity:n,textureUrl:o,textureSize:i});case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})}])&&$c(t.prototype,r),n&&$c(t,n),a}(ta.Mesh);function Al(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 al(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 al(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function al(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 sl(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 ul(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cl(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 ll={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var gl=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?sl(Object(r),!0).forEach((function(t){ul(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},ll),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new Dc,this.id=t.model.getId(),this.type=r.type;var n,o=Al(r.stateReducers);try{for(o.s();!(n=o.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){o.e(e)}finally{o.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)}},{key:"create",value:function(e){var t,r=this.props.model,n=new ta.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,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(),o=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(o.x,o.y,o.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(bc.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(bc.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(bc.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(bc.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(bc.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,o,i,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 il({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(o=g.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var p,h=this.meshes,d=s.length;d--;)p=s[d],h[d].updateProps({geometry:p.geometry,tiledImgUrl:p.texture&&(p.texture.hdTiledImageUrl||p.texture.tiledImgUrl),textureSize:null===(i=p.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:p.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,o=(n=t).getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories());if(Object(he.isEqual)(this.modelDepProps.renderChildNodes,o))for(var i=0;i<this.childNodeDrawables.length;i++){var A=this.childNodeDrawables[i],a=this.childNodeMeshes[i];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=o,this.disposeChildNodeMeshes(e),this.childNodeDrawables=o.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=Al(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 un.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||Q.a.ZERO,size:n.size.clone().div(n.scale),scale:Q.a.ONE,rotation:Q.a.ZERO,generateComponentInstanceKey:Rc(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 un.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:Rc(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var o,i=Al(this.displayInfoMeshs);try{for(i.s();!(o=i.n()).done;){var A=o.value;e.add(A)}}catch(e){i.e(e)}finally{i.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(),o=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new Lc({points:n||[],visible:o}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:o})}}])&&cl(t.prototype,r),n&&cl(t,n),e}();function fl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pl(e,t){return(pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hl(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=Il(e);if(t){var o=Il(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dl(this,r)}}function dl(e,t){return!t||"object"!==yl(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 Il(e){return(Il=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yl(e){return(yl="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 Cl=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":yl(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},El=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&&pl(e,t)}(r,e);var t=hl(r);function r(){var e;return fl(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(mc);function Bl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vl(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 ml(e,t,r){return t&&vl(e.prototype,t),r&&vl(e,r),e}function Ql(e,t,r){var n=r.getEntity(e)||function(e,t){return e.isRoot()?new El(e,t):new Qc(e,t)}(e,t);r.registerEntity(e,n);var o=e.getParent();return o&&(n._parent=r.getEntity(o)),n._children=e.getChildNodes().map((function(e){return Ql(e,t,r)})),n}El=Cl([Object(un.provideEntityAPIs)([new un.EntityAPIs.DrawableAPI3D((function(){var e=this;return new gl({model:this.model,renderChild:function t(r){return new gl({model:r,renderChild:t},e.context)}},this.context)})),new un.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],El);var bl=function(){function e(t){var r=this;Bl(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 ml(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++)Ql(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new pc(e)}))}}]),e}(),_l=function(){function e(t,r){Bl(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new bl(r)}return ml(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 wl(e){return(wl="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 Sl=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wl(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Dl=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":wl(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rl=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 Ml(e){return function(e){if(Array.isArray(e))return xl(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 xl(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 xl(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 xl(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 Pl(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)}}Sl([pe.observable,Dl("design:type",Object)],Rl.prototype,"showOutline",void 0),Sl([pe.observable,Dl("design:type",Array)],Rl.prototype,"selected",void 0);var Fl=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),this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof ta.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return Ml(this.idMap.entries())}}])&&Pl(t.prototype,r),n&&Pl(t,n),e}(),Ol=r(182);function Tl(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 Ll=function(){function e(t,r,n){var o=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(){o.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(Ol.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Ol.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),o=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=0,A=o.length;i<A;++i)if(n[i]!==o[i])return!0;return!1}}])&&Tl(t.prototype,r),n&&Tl(t,n),e}();function kl(e){return(kl="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 Nl(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||Ul(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 Gl(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Ul(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function Ul(e,t){if(e){if("string"==typeof e)return jl(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)?jl(e,t):void 0}}function jl(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 Yl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vl(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 Hl(e,t){return(Hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kl(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=ql(e);if(t){var o=ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jl(this,r)}}function Jl(e,t){return!t||"object"!==kl(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 ql(e){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ll.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var Wl=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&&Hl(e,t)}(i,e);var t,r,n,o=Kl(i);function i(){var e;return Yl(this,i),(e=o.apply(this,arguments)).store=new Rl,e.objectManager=new Fl,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),o=e.selectManager.isSelected(t);r(n.drawableState,o)},e.updateModelsState=function(t){var r,n=Gl(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var o=Nl(r.value,2),i=o[0],A=o[1],a=e.selectManager.isSelected(i);t(i,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=i,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,o=t.paramModelSymbol,i=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a;this.selectManager=new Ll(n.selection,[o],(function(e,t){r.store.selected=e,r.emit($u.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new _l(A,{store:this.store,type:o,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers}));var u=i().getElementContext();return u.getterEmitter.on((function(e){pe.advanced.reportObserved(e.instance)})),u.setterEmitter.on((function(e){pe.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=Gl(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=Nl(t.value,2),o=n[0],i=n[1];if(!e||e.includes(o)){var A,a=this.selectManager.isSelected(o),s=Gl(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(i.model,a,i.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&Vl(t.prototype,r),n&&Vl(t,n),i}(rc.EventEmitter),zl=Object(Jn.getConnector)(),Xl=zl.connect,Zl=zl.setRootState;function $l(e,t,r){return Xl((function(){return e(FC(),xh().getStateManager())}),t,r)}var eg=r(1106),tg=r.n(eg);function rg(e){return(rg="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 ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function og(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 ig(e,t,r){return t&&og(e.prototype,t),r&&og(e,r),e}function Ag(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&&ag(e,t)}function ag(e,t){return(ag=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sg(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=cg(e);if(t){var o=cg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ug(this,r)}}function ug(e,t){return!t||"object"!==rg(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 cg(e){return(cg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lg=Symbol("layout"),gg=$l((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){Ag(r,e);var t=sg(r);function r(){return ng(this,r),t.apply(this,arguments)}return ig(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(un.MountPoint)),fg=function(e){Ag(r,e);var t=sg(r);function r(){return ng(this,r),t.apply(this,arguments)}return ig(r,[{key:"render",value:function(){return Wn.a.createElement(gg,{mountPointId:lg})}}]),r}(Wn.a.PureComponent);function pg(e){return(pg="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 hg(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 dg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ig(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&&yg(e,t)}function yg(e,t){return(yg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cg(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=Bg(e);if(t){var o=Bg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Eg(this,r)}}function Eg(e,t){return!t||"object"!==pg(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 Bg(e){return(Bg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}fg.contextType=un.AppContext;var vg=$l((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}}),function(e){Ig(r,e);var t=Cg(r);function r(){return dg(this,r),t.apply(this,arguments)}return r}(un.Scene3D)),mg=$l((function(){return{}}),(function(){return{}}),function(e){Ig(i,e);var t,r,n,o=Cg(i);function i(){var e;return dg(this,i),(e=o.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(ta.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new ta.Color(ku.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),xh().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=i,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return Wn.a.createElement(vg,{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})}}])&&hg(t.prototype,r),n&&hg(t,n),i}(Wn.a.PureComponent));function Qg(e){return(Qg="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 bg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(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 wg(e,t){return(wg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sg(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=Rg(e);if(t){var o=Rg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dg(this,r)}}function Dg(e,t){return!t||"object"!==Qg(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 Rg(e){return(Rg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mg=$l((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&&wg(e,t)}(i,e);var t,r,n,o=Sg(i);function i(){var e;return bg(this,i),(e=o.apply(this,arguments)).rootRef=Wn.a.createRef(),e.updateLayout=Object(he.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new lt.a(r.width,r.height))}}),200),e}return t=i,(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 Wn.a.createElement("div",{ref:this.rootRef,id:Lu.SCENE_ID,className:r},Wn.a.createElement(mg,{containerId:Lu.SCENE_ID,size:new h.Vector2d(t.x,t.y)}))}}])&&_g(t.prototype,r),n&&_g(t,n),i}(Wn.a.PureComponent));r(2070);function xg(e){return(xg="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 Pg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fg(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 Og(e,t){return(Og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tg(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=kg(e);if(t){var o=kg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lg(this,r)}}function Lg(e,t){return!t||"object"!==xg(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 kg(e){return(kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ng=$l((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&&Og(e,t)}(i,e);var t,r,n,o=Tg(i);function i(){return Pg(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){return Wn.a.createElement(un.ViewMounter,{mountPointId:lg},Wn.a.createElement(Mg,{key:"s3",className:tg.a.scene3D}))}}])&&Fg(t.prototype,r),n&&Fg(t,n),i}(Wn.a.PureComponent)),Gg=Symbol("fitting-data"),Ug=Symbol("groove-fitting-entity"),jg=Symbol("intersect-data"),Yg=Symbol("param-model-hint-entity");function Vg(e,t){return(Vg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hg(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=Jg(e);if(t){var o=Jg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Kg(this,r)}}function Kg(e,t){return!t||"object"!==qg(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 Jg(e){return(Jg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qg(e){return(qg="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 Wg,zg=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":qg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Xg=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":qg(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Zg=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&&Vg(e,t)}(r,e);var t=Hg(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=Gg,n.entityId=e.id,n}return r}(un.Entity);Zg=zg([Object(un.provideEntityAPIs)([new un.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===n.GROOVE)return $g(e);if(t===n.HOLE)return ef(e)}(e)},update:function(t){var r=e.$model,n=r.position,o=r.visible;t.position.set(n.x,n.y,n.z),t.visible=o,t.material&&(t.material.visible=o)}}})),new un.EntityAPIs.HighlightGeometryAPI3D((function(){var e=this.$model,t=e.position,r=e.size,n=e.rotate;return{geometry:new qi.a(r,t,n)}}))]),Xg("design:paramtypes",["function"==typeof(Wg=void 0!==Je&&Je)?Wg:Object])],Zg);var $g=function(e){var t=e.$model,r=t.position,n=t.size,o=t.rotate,i=t.visible,A=t.viewColor,a=new ta.BoxGeometry(n.x,n.y,n.z),s=new ta.MeshBasicMaterial({color:A,visible:i}),u=new ta.Mesh(a,s);return u.position.set(r.x,r.y,r.z),u.rotation.set(o.x,o.y,o.z),u.visible=i,u},ef=function(e){var t=e.$model,r=t.position,n=t.visible,o=t.rotate,i=t.height,A=t.viewColor,a=t.fittingData.diameter/2,s=new ta.CylinderGeometry(a,a,i),u=new ta.MeshBasicMaterial({color:A,visible:n}),c=new ta.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(o.x,o.y,o.z),c};function tf(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 nf(e,t){return(nf=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=af(e);if(t){var o=af(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Af(this,r)}}function Af(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 af(e){return(af=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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)}var uf,cf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":sf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},lf=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":sf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&nf(e,t)}(r,e);var t=of(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=Ug,n.entityId=e.id,n}return r}(un.Entity);function ff(e){var t=e.matrix,r=e.points,n=e.depth,o=e.color,i=e.side,A=e.position,a=new ta.LineBasicMaterial,s=new ta.MeshBasicMaterial,u=new ta.Mesh(void 0,s),c=new ta.Line(void 0,a),l=new ta.Group;return u.setAttribute("transparent-line-origin",!1),c.setAttribute("transparent-line-origin",!1),l.add(u),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),s.setValues({color:o,side:i}),l.applyMatrix(t),l.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,o=e.height,i=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new ta.Shape,u=A?new ta.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new ta.Vector3(e.x,e.y,o))})),s.lineTo(a.x,a.y),i&&(s.holes=i);A&&(u.vertices.push(new ta.Vector3(a.x,a.y,o)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new ta.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,o)}({area:u,points:r,height:n}),l}function pf(e){var t=new h.BBox3d;return[].concat(tf(e.getTopRenderPoints()),tf(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new h.Point3d(e))})),new qi.a(new Q.a({x:t.width,y:t.height,z:t.depth}),new Q.a(t.center),new Q.a({x:0,y:0,z:0}))}function hf(e){var t=new ta.BufferGeometry;if(t.index=new ta.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new ta.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new ta.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new ta.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function df(e,t){return(df=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function If(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=Cf(e);if(t){var o=Cf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yf(this,r)}}function yf(e,t){return!t||"object"!==Ef(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 Cf(e){return(Cf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ef(e){return(Ef="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)}gf=cf([Object(un.provideEntityAPIs)([new un.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new ta.Group,r=e.pointToGlobalMatrix(),n=e.depth,o=e.viewColor,i=void 0===o?1735416:o,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),u=new E.a;u.fromString(r.toArray().join(","));var c=function(e){var t=e.elements;return(new ra.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])}(u),l=or.a.decompose(u).position,g=ff({matrix:c,depth:0,points:s,color:i,side:ta.Side.FrontSide,position:l}),f=ff({matrix:c,depth:-n,points:s,color:i,side:ta.Side.BackSide,position:l}),p=[].concat(tf(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,o=e.color,i=new ta.MeshBasicMaterial,A=new ta.Mesh(new ta.BufferGeometry,i);if(i.setValues({side:r,color:o}),A.setAttribute("transparent-line-origin",!0),A.setAttribute("outline",!1),A.setAttribute("shadowCaster",!1),A.geometry instanceof ta.BufferGeometry){var a=function(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],o=0;o<r-1;o++)n.push(e[o].x,e[o].y,e[o].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z),n.push(t[o].x,t[o].y,t[o].z),n.push(t[o].x,t[o].y,t[o].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z);return n}(e.topPoints,e.bottomPoints);A.geometry.addAttribute("position",new ta.Float32BufferAttribute(a,3)),A.geometry.dispose()}return A.applyMatrix(t),A.position.set(n.x,n.y,n.z),A}({position:l,matrix:c,topPoints:p.map((function(e){return new h.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new h.Point3d(e.x,e.y,-n)})),color:i,side:ta.Side.DoubleSide});return t.add(g),t.add(f),t.add(d),[g,f,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 ta.Mesh&&e.material&&Object(he.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new un.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:pf(this.$model)}}))]),lf("design:paramtypes",["function"==typeof(uf=void 0!==kt&&kt)?uf:Object])],gf);var Bf,vf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ef(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},mf=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ef(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Qf=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&&df(e,t)}(r,e);var t=If(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=jg,n.entityId=e.id,n}return r}(un.Entity),bf=Qf=vf([Object(un.provideEntityAPIs)([new un.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,o=t.originPoints,i=new ta.Group,A=hf(r),a=new ta.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:ta.Side.DoubleSide}),s=new ta.Mesh(A,a);s.renderOrder=998,i.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(e){var t=new ta.Mesh(_f,wf);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return i}(e)},update:function(){}}}))]),mf("design:paramtypes",["function"==typeof(Bf=void 0!==ut&&ut)?Bf:Object])],Qf),_f=new ta.SphereBufferGeometry(3),wf=new ta.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Sf(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 Df(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sf(Object(r),!0).forEach((function(t){Rf(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mf(e,t){var r=t.x/2,n=t.y/2,o=t.z/2,i=[{x:-r,y:-n,z:o},{x:r,y:-n,z:o},{x:r,y:n,z:o},{x:-r,y:n,z:o}],A=i.map((function(e){return Df(Df({},e),{},{z:-e.z})}));switch(e){case 0:return i;case 1:return[i[0],A[0],A[3],i[3]];case 2:return[i[3],A[3],A[2],i[2]];case 3:return[i[1],A[1],A[2],i[2]];case 4:return[i[1],A[1],A[0],i[0]];case 5:return A}return[]}function xf(e){return function(e){if(Array.isArray(e))return Pf(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 Pf(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 Pf(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 Pf(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 Ff(e,t){return(Ff=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=Lf(e);if(t){var o=Lf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tf(this,r)}}function Tf(e,t){return!t||"object"!==kf(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 Lf(e){return(Lf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kf(e){return(kf="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 Nf,Gf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":kf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Uf=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":kf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},jf=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)}(r,e);var t=Of(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=Yg,n.entityId=e.id,n}return r}(un.Entity),Yf=jf=Gf([Object(un.provideEntityAPIs)([new un.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,o=t.hintOutline,i=n.getConcatenatedMatrix(),A=new ta.Group;r&&r.forEach((function(e){var t=hf(wr(e,i)),r=new ta.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:ta.Side.DoubleSide}),n=new ta.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(o){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=Mf(0,a),c=Mf(5,a);s=[].concat(xf(Object(he.zip)(u,[].concat(xf(u.slice(1)),[u[0]]))),xf(Object(he.zip)(c,[].concat(xf(c.slice(1)),[c[0]]))),xf(Object(he.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(he.chunk)(s,3).map((function(e){return new Q.a(e[0],e[1],e[2]).applyMatrix4(i)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new Lc({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),Uf("design:paramtypes",["function"==typeof(Nf=void 0!==Kt&&Kt)?Nf:Object])],jf);var Vf,Hf,Kf,Jf,qf,Wf,zf,Xf=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=un.__unstable__.flatEntitiesCreator((function(e){return new Zg(e)})),this.createIntersectEntities=un.__unstable__.flatEntitiesCreator((function(e){return new bf(e)})),this.createGrooveFittingEntities=un.__unstable__.flatEntitiesCreator((function(e){return new gf(e)})),this.createPlankFaceHintEntities=un.__unstable__.flatEntitiesCreator((function(e){return new Yf(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.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities]};
125
+ ***************************************************************************** */var to=function(e,t){return(to=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 ro(e,t){function r(){this.constructor=e}to(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function no(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eo(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A}var oo,io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.request=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(Yr.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(Yr.API_UNSUPPORT)()},no([Yr.anno.decl.api()],t.prototype,"request",null),no([Yr.anno.decl.api()],t.prototype,"get",null),no([Yr.anno.decl.api()],t.prototype,"delete",null),no([Yr.anno.decl.api()],t.prototype,"post",null),no([Yr.anno.decl.api()],t.prototype,"put",null),no([Yr.anno.decl.api()],t.prototype,"encryptedRequest",null),no([Yr.anno.decl.api()],t.prototype,"encryptedGet",null),no([Yr.anno.decl.api()],t.prototype,"encryptedDelete",null),no([Yr.anno.decl.api()],t.prototype,"encryptedPost",null),no([Yr.anno.decl.api()],t.prototype,"encryptedPut",null),no([Yr.anno.decl.api()],t.prototype,"gzipRequest",null),no([Yr.anno.decl.api()],t.prototype,"gzipGet",null),no([Yr.anno.decl.api()],t.prototype,"gzipPost",null),no([Yr.anno.decl.api()],t.prototype,"gzipPut",null),no([Yr.anno.decl.api()],t.prototype,"pbGzipGet",null),no([Yr.anno.decl.api()],t.prototype,"pbGzipPost",null),t=no([Yr.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:un.INNER})],t)}(Yr.ServService);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ro(t,e),t.prototype.getAllAvailableService=function(){return Object(Yr.API_UNSUPPORT)()},no([Yr.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=no([Yr.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:un.INNER})],t)}(Yr.ServService);!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"}(oo||(oo={}));var Ao,ao,so,uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(Yr.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(Yr.API_UNSUPPORT)()},no([Yr.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),no([Yr.anno.decl.api()],t.prototype,"getTopParamModels",null),t=no([Yr.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:un.INNER})],t)}(Yr.ServService),co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.lockModelBySplit=function(){return Object(Yr.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(Yr.API_UNSUPPORT)()},no([Yr.anno.decl.api()],t.prototype,"lockModelBySplit",null),no([Yr.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=no([Yr.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:un.INNER})],t)}(Yr.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ro(t,e),t.prototype.getPackageInfo=function(){return Object(Yr.API_UNSUPPORT)()},no([Yr.anno.decl.event()],t.prototype,"onRequestReceived",void 0),no([Yr.anno.decl.api()],t.prototype,"getPackageInfo",null),t=no([Yr.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:un.PRIVATE})],t)})(Yr.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ro(t,e),no([Yr.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),t=no([Yr.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:un.PRIVATE})],t)}(Yr.ServService);!function(e){e[e.willExit=0]="willExit"}(Ao||(Ao={})),function(e){e[e.exit=0]="exit"}(ao||(ao={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(so||(so={}));var lo,go,fo=r(59),po=r(22),ho=r(702),Io=r(420);function yo(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Co(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){yo(i,n,o,A,a,"next",e)}function a(e){yo(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Eo(e){return function(e){if(Array.isArray(e))return mo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||vo(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 Bo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=vo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function vo(e,t){if(e){if("string"==typeof e)return mo(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)?mo(e,t):void 0}}function mo(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 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(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"}(lo||(lo={})),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"}(go||(go={}));var bo=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 ho.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(fo.throttleInRaf)((function(){po.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(Io.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;po.Util.safeExec((function(){var t,r=Bo(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;po.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;po.Util.safeExec((function(){var t,r=Bo(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;po.Util.safeExec((function(){var t,r=Bo(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];po.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(lo.autoBackup)&&po.Util.safeExec((function(){n[lo.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[lo.autoBackup])}),!1),t.includes(lo.transaction)&&po.Util.safeExec((function(){n[lo.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(lo.version)&&po.Util.safeExec((function(){n[lo.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(lo.modelBinding)&&po.Util.safeExec((function(){n[lo.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(lo.autoSave)&&po.Util.safeExec((function(){n[lo.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,o={},i=Bo(this.docs);try{for(i.s();!(r=i.n()).done;){var A=r.value;o[A.getId()]=this.interruptSingle(A,e)}}catch(e){i.e(e)}finally{i.f()}return this.keyCache.add(o),t&&setTimeout((function(){return n.resume(o)}),t),o}},{key:"resumeSingle",value:function(e,t){var r=this;t[lo.autoBackup]&&po.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[lo.autoBackup])}),!1),t[lo.transaction]&&po.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[lo.transaction])})),t[lo.version]&&po.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[lo.version])})),t[lo.modelBinding]&&po.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[lo.modelBinding])})),t[lo.autoSave]&&po.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[lo.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=Bo(this.docs);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o.getId()];i&&this.resumeSingle(o,i)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;Eo(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]:[lo.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[go.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return function(){var i={};try{i=o.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{o.resume(i,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[lo.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[go.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return Co(f.a.mark((function i(){var A,a,s,u,c,l=arguments;return f.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(A={},i.prev=1,A=o.interrupt(t,n),a=l.length,s=new Array(a),u=0;u<a;u++)s[u]=l[u];return i.next=6,e.apply(this,s);case 6:return c=i.sent,i.abrupt("return",c);case 8:return i.prev=8,o.resume(A,r),i.finish(8);case 11:case"end":return i.stop()}}),i,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(go.mergeRecorder)&&this.mergeRecorder(),e.includes(go.requestBackup)?this.requestBackup():e.includes(go.forceBackup)?this.forceBackup():e.includes(go.revert)&&this.revert(),e.includes(go.notifyModelChange)&&this.notifyModelChange(),e.includes(go.autoSave)?this.save(!0):e.includes(go.save)&&this.save()}}])&&Qo(t.prototype,r),n&&Qo(t,n),e}(),_o=r(510),wo=r.n(_o),So=r(12),Do=r(281);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,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 xo(e,t){return(xo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Po(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=Oo(e);if(t){var o=Oo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fo(this,r)}}function Fo(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 Oo(e){return(Oo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var To=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&&xo(e,t)}(i,e);var t,r,n,o=Po(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).model=e,t}return t=i,(r=[{key:"toModel",value:function(){return this.model}}])&&Mo(t.prototype,r),n&&Mo(t,n),i}(So.BackupItem);var Lo=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=To,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===Do.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===Do.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===Do.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 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 No(e){return function(e){if(Array.isArray(e))return jo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Uo(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 Go(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Uo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function Uo(e,t){if(e){if("string"==typeof e)return jo(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)?jo(e,t):void 0}}function jo(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,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ho(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&&Ho(e.prototype,t),r&&Ho(e,r),e}function Jo(e,t){return(Jo=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=zo(e);if(t){var o=zo(this).constructor;r=Reflect.construct(n,arguments,o)}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&&Jo(e,t)}(r,e);var t=qo(r);function r(){var e;return Vo(this,r),(e=t.apply(this,arguments)).doc=new P.CDoc,e}return Ko(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(wo()(Object)),Zo=new(function(){function e(){Vo(this,e),this.stacks=[{documentAction:new bo}]}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=f.a.mark((function e(){var t,r,n,o,i,A,a,s,u,c,l,g,p,h,d,I=arguments;return f.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([lo.autoBackup]),o=new bo,i=new Xo,A=new So.DocumentStateManager,a=Go(this.stacks);try{for(a.s();!(s=a.n()).done;){u=s.value,c=Go(u.documentAction.docs);try{for(c.s();!(l=c.n()).done;)l.value.getDoc().addTransactionHook(i.getDoc().onTrackTransaction)}catch(e){c.e(e)}finally{c.f()}}}catch(e){a.e(e)}finally{a.f()}o.docs=[i].concat(No(t)),o.kafDocument=A,g=new Lo(i.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(g),p=Go(t);try{for(p.s();!(h=p.n()).done;)d=h.value,A.addDocumentSource(new Lo(d.getDoc(),d.getId()))}catch(e){p.e(e)}finally{p.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:o,interruptKey:n,tempDoc:i,tempDocumentSource:g}),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,o){var i=t.apply(e,r);function A(e){Yo(i,n,o,A,a,"next",e)}function a(e){Yo(i,n,o,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,o=t.interruptKey,i=Go(this.stacks);try{for(i.s();!(e=i.n()).done;){var A,a=Go(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){i.e(e)}finally{i.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(o,[go.requestBackup])}}]),e}());function $o(e){return($o="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 ei(e,t){return(ei=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=ni(e);if(t){var o=ni(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ri(this,r)}}function ri(e,t){return!t||"object"!==$o(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 ni(e){return(ni=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oi,ii,Ai=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&&ei(e,t)}(r,e);var t=ti(r);function r(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(o=t.call(this,e.getDoc(),n)).key=n,o}return r}(Lo);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){!function(e){oi.log(li(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};ii&&Object.assign(r.labels,ii()),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){oi.logByKtracker(e)}(r)}function li(e){return si(si({},e),{},{pluginName:"customPad"})}var gi=r(156),fi=r(11),pi=r.n(fi);function hi(e){return(hi="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 di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}}function yi(e,t){return(yi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ci(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=Bi(e);if(t){var o=Bi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ei(this,r)}}function Ei(e,t){return!t||"object"!==hi(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 Bi(e){return(Bi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vi=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&&yi(e,t)}(i,e);var t,r,n,o=Ci(i);function i(){return di(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){return null}}])&&Ii(t.prototype,r),n&&Ii(t,n),i}(pi.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 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 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=Di(e);if(t){var o=Di(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Si(this,r)}}function Si(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,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&&_i(e,t)}(i,e);var t,r,n,o=wi(i);function i(){return Qi(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"module",value:function(){return"entry"}}])&&bi(t.prototype,r),n&&bi(t,n),i}(po.AXR);Ri||(Ri={});var xi,Pi=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(xi||(xi={}));var Fi={};function Oi(e){return(Oi="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 Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Li(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 ki(e,t,r){return(ki="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=ji(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function Ni(e,t){return(Ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gi(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=ji(e);if(t){var o=ji(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ui(this,r)}}function Ui(e,t){return!t||"object"!==Oi(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 ji(e){return(ji=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yi={entry:Mi,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&&Ni(e,t)}(i,e);var t,r,n,o=Gi(i);function i(){return Ti(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"init",value:function(){ki(ji(i.prototype),"init",this).call(this),this.addConfig({sendLog:ci,perfLogConfig:Pi,timeLogConfig:Fi})}}])&&Li(t.prototype,r),n&&Li(t,n),i}(po.Monitor)};function Vi(e){return(Vi="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 Hi(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 Ki(e,t){return(Ki=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ji(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 o=Wi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qi(this,r)}}function qi(e,t){return!t||"object"!==Vi(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)}(i,e);var t,r,n,o=Ji(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).model=e,t}return t=i,(r=[{key:"toModel",value:function(){return this.model}}])&&Hi(t.prototype,r),n&&Hi(t,n),i}(So.BackupItem);var Xi,Zi=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=he.noop,this.BackupItemImpl=zi,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){Ie.addSetHook(e)},this.beforeDispose=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(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(Xi||(Xi={}));var eA=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=po.ERequest.GET),e.method===po.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)&&$i(t.prototype,r),n&&$i(t,n),e}();function tA(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 rA=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(Xi.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(Xi.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(Xi.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(Xi.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(Xi.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(Xi.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=eA.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(Xi.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(Xi.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(Xi.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(Xi.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=eA.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=eA.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var o=eA.toNetParams(t,n,r);return this.net.post(o,{mode:e})}},{key:"_put",value:function(e,t,r,n){var o=eA.toNetParams(t,n,r);return o.method="PUT",this.net.request(o,{mode:e})}}])&&tA(t.prototype,r),n&&tA(t,n),e}();function nA(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 oA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nA(Object(r),!0).forEach((function(t){iA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}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 AA(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function aA(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){AA(i,n,o,A,a,"next",e)}function a(e){AA(i,n,o,A,a,"throw",e)}A(void 0)}))}}function sA(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 uA=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=aA(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.get(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.delete(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.post(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.put(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=aA(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.encryptedGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=aA(f.a.mark((function e(r){var n,o;return f.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 o=e.sent,e.abrupt("return",t.wrapResponse(r,o));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.gzipGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.gzipPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.gzipPut(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=aA(f.a.mark((function e(r){var n,o,i,A=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},o=t.convertRequest(oA(oA({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(o);case 4:return i=e.sent,e.abrupt("return",t.wrapResponse(n,i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=aA(f.a.mark((function e(r,n){var o,i,A,a=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]?a[2]:{},i=t.convertRequest(oA(oA({},o),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(i);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(o,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}}}])&&sA(t.prototype,r),n&&sA(t,n),e}(),cA=r(1101),lA=r(30),gA=r(210),fA=r(158),pA=r(91);function hA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dA(e,t){return(dA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IA(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 o=CA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yA(this,r)}}function yA(e,t){return!t||"object"!==EA(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)}function EA(e){return(EA="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 BA,vA,mA,QA,bA,_A,wA,SA,DA=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":EA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},RA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":EA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},MA=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&&dA(e,t)}(r,e);var t=IA(r);function r(){var e;return hA(this,r),(e=t.apply(this,arguments)).client=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.encryptedClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.encryptInterceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.gzippedEncryptClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.gzipEncryptBase64Interceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.pbEncryptedClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.encryptInterceptorWithArrayBuffer,lA.encryptInterceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.gzipEncryptInterceptorWithArrayBuffer,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.gzipEncryptBase64Interceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.ossDegradedEncryptInterceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(fA.getClient)([lA.interceptor,gA.errorCodeInterceptor,lA.ossDegradedGzipEncryptBase64Interceptor,lA.parseCDNInterceptor,lA.parseJSONInterceptor]),e}return r}(cA.RequestClient);DA([lA.retryRequest,RA("design:type","function"==typeof(BA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?BA:Object)],MA.prototype,"client",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(vA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?vA:Object)],MA.prototype,"encryptedClient",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(mA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?mA:Object)],MA.prototype,"gzippedEncryptClient",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(QA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?QA:Object)],MA.prototype,"pbEncryptedClient",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(bA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?bA:Object)],MA.prototype,"pbGzippedEncryptClient",void 0),DA([Object(lA.retryRequest)(!0),RA("design:type","function"==typeof(_A=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?_A:Object)],MA.prototype,"ossGzippedEncryptClient",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(wA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?wA:Object)],MA.prototype,"ossDegradedEncryptedClient",void 0),DA([lA.retryRequest,RA("design:type","function"==typeof(SA=void 0!==pA.AxiosInstance&&pA.AxiosInstance)?SA:Object)],MA.prototype,"ossDegradedGzippedEncryptClient",void 0);var xA=Object(he.once)((function(){return new MA})),PA=Object(he.once)((function(){return new uA}));function FA(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function OA(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 TA=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,o,i;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return xA().addClientInterceptors(e)}},{key:"send",value:(o=f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=xA(),o=eA.toAxiosConfig(t),r.mode!==Xi.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(o));case 6:if(r.mode!==Xi.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(o));case 10:return e.abrupt("return",n.request(o));case 11:case"end":return e.stop()}}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){FA(i,r,n,A,a,"next",e)}function a(e){FA(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return i.apply(this,arguments)})}])&&OA(t.prototype,r),n&&OA(t,n),e}();function LA(e){return(LA="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){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 NA(e,t,r){return(NA="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=YA(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}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=YA(e);if(t){var o=YA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jA(this,r)}}function jA(e,t){return!t||"object"!==LA(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)}var VA=new po.SingletonRef,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&&GA(e,t)}(i,e);var t,r,n,o=UA(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.core",name:"cCoreApp",Component:vi,axrs:Yi,singleton:VA},e)).stateManager=t,r}return t=i,(r=[{key:"init",value:function(){NA(YA(i.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(So.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Zo.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new Ai(r,"custom-pad-document")),e.addDocumentSource(new Zi(n,"fitting-document"));var o=r.getDoc().getElementContext();o.getterEmitter.on((function(e){pe.advanced.reportObserved(e.instance)})),o.setterEmitter.on((function(e){pe.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,oi=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),gs(this.stateManager)}},{key:"initNet",value:function(){NA(YA(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new TA),this.client=new rA(this.net)}}])&&kA(t.prototype,r),n&&kA(t,n),i}(po.PluginApplication),KA=VA.instance,JA=r(351),qA=r.n(JA),WA=r(711);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,r){return t&&XA(e.prototype,t),r&&XA(e,r),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 ea,ta,ra,na,oa=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},ia=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":$A(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Aa(e){var t=this;if(t===ra.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(na){if(o!==na)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(na=o,O.a.begGetDeps(o));try{e=n.apply(this,arguments)}catch(e){r=e}if(o&&(na=void 0,O.a.endGetDeps(o)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,o){if(r){var i="get"+o[0].toLocaleUpperCase()+o.slice(1);e=function(e){return e[i]()}}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(he.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===ra.LAZY?(n.__lazyKeys.push(o),Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[o])return t[o];var r=e;if(Object(he.isFunction)(e)){var n=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(na){if(i!==na)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(na=i,O.a.begGetDeps(i));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(i&&(na=void 0,O.a.endGetDeps(i)),n)throw n.message="CUSTOM: ["+o+"] "+n.message,n}return t[o]=r,t.__keys[o]=!0,r}})):(n.__immeKeys.push(o),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(ra||(ra={}));var aa={lazy:Aa.bind(ra.LAZY),imme:Aa.bind(ra.IMMEDIATE),guard:Aa.bind(ra.GUARD),castTo:void 0};aa.castTo=function(){return aa};var sa=function(){function e(t){zA(this,e),this.__DONT_USE_ME=t,na&&(this.__TRANSFORM_CONTEXT_ADD_DEP=na),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return ZA(e,[{key:"asStub",value:function(){var e=P.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),o=0,i=n.length;o<i;++o)(r=n[o]).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}();oa([aa.imme(),ia("design:type",String)],sa.prototype,"id",void 0),oa([aa.imme((function(e){return e.constructor})),ia("design:type","function"==typeof(ea=void 0!==WA.ConstructorOf&&WA.ConstructorOf)?ea:Object)],sa.prototype,"kType",void 0),oa([aa.lazy((function(e){return e})),ia("design:type",Boolean)],sa.prototype,"$model",void 0),oa([aa.guard(),ia("design:type",Function),ia("design:paramtypes",[Function]),ia("design:returntype","function"==typeof(ta="undefined"!=typeof T&&T)?ta:Object)],sa.prototype,"guard",null);var ua=function(){function e(){zA(this,e)}return ZA(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}();ua.creators=new Map;var ca=r(237),la=r(66),ga=r.n(la);function fa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pa(e,t){return(pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ha(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=Ia(e);if(t){var o=Ia(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return da(this,r)}}function da(e,t){return!t||"object"!==ya(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 Ia(e){return(Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ya(e){return(ya="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 Ca,Ea,Ba,va,ma,Qa=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ya(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},ba=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ya(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},_a=Symbol("baseParamModel"),wa=aa.castTo(),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&&pa(e,t)}(r,e);var t=ha(r);function r(){return fa(this,r),t.apply(this,arguments)}return r}(sa);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){return(Ra=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=Pa(e);if(t){var o=Pa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return xa(this,r)}}function xa(e,t){return!t||"object"!==Fa(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 Pa(e){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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)}Qa([wa.lazy(),ba("design:type",String)],Sa.prototype,"modelInstanceId",void 0),Qa([wa.imme(_a),ba("design:type",Symbol)],Sa.prototype,"type",void 0),Qa([wa.lazy((function(e){return e.getType()})),ba("design:type","function"==typeof(Ca=void 0!==rr.ParamModelType&&rr.ParamModelType)?Ca:Object)],Sa.prototype,"modelType",void 0),Qa([wa.lazy(),ba("design:type",String)],Sa.prototype,"name",void 0),Qa([wa.lazy(),ba("design:type","function"==typeof(Ea=void 0!==Q.a&&Q.a)?Ea:Object)],Sa.prototype,"size",void 0),Qa([wa.lazy(),ba("design:type","function"==typeof(Ba=void 0!==ga.a&&ga.a)?Ba:Object)],Sa.prototype,"box3",void 0),Qa([wa.lazy(),ba("design:type","function"==typeof(va=void 0!==ca.ParamStore&&ca.ParamStore)?va:Object)],Sa.prototype,"paramStore",void 0),Qa([wa.lazy(),ba("design:type","function"==typeof(ma=void 0!==rr.ParamModelCategory&&rr.ParamModelCategory)?ma:Object)],Sa.prototype,"category",void 0),Qa([wa.lazy(),ba("design:type",Boolean)],Sa.prototype,"legal",void 0),Qa([wa.lazy((function(e){return e.getHasAttached()})),ba("design:type",Boolean)],Sa.prototype,"attached",void 0),Qa([wa.lazy(),ba("design:type",Boolean)],Sa.prototype,"deletable",void 0),Qa([wa.lazy(),ba("design:type",Boolean)],Sa.prototype,"replaceable",void 0),Qa([wa.lazy(),ba("design:type",Number)],Sa.prototype,"attachedVersion",void 0),Qa([wa.lazy(),ba("design:type",Boolean)],Sa.prototype,"paramOverride",void 0);var Oa,Ta,La=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},ka=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Na=Symbol("paramModel"),Ga=aa.castTo(),Ua=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&&Ra(e,t)}(i,e);var t,r,n,o=Ma(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,e)).parent=t,r}return t=i,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&Da(t.prototype,r),n&&Da(t,n),i}(Sa);function ja(e){return(ja="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 Ya(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 Va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(r),!0).forEach((function(t){Ha(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ya(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ha(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){return function(e){if(Array.isArray(e))return Ja(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 Ja(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 Ja(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 Ja(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 qa(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 Wa(e,t,r){return(Wa="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=$a(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function za(e,t){return(za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xa(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 o=$a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Za(this,r)}}function Za(e,t){return!t||"object"!==ja(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 es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}La([Ga.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),ka("design:type",Ua)],Ua.prototype,"root",void 0),La([Ga.imme(Na),ka("design:type",Symbol)],Ua.prototype,"type",void 0),La([Ga.lazy((function(e){return e.isRoot()})),ka("design:type",Boolean)],Ua.prototype,"isRoot",void 0),La([Ga.lazy((function(e){return e.isAccessory()})),ka("design:type",Boolean)],Ua.prototype,"isAccessory",void 0),La([Ga.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),ka("design:type",String)],Ua.prototype,"assemblyId",void 0),La([Ga.lazy((function(e,t){return e.getChildren().map((function(e){return ua.get(e)}))})),ka("design:type",Array)],Ua.prototype,"children",void 0),La([Ga.lazy((function(e,t){return e.getAccessories().map((function(e){return ua.get(e)}))})),ka("design:type",Array)],Ua.prototype,"accessories",void 0),La([Ga.lazy((function(e,t){return t.children.concat(t.accessories)})),ka("design:type",Array)],Ua.prototype,"childNodes",void 0),La([Ga.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),ka("design:type",Boolean)],Ua.prototype,"belongsToTemplateAssembly",void 0),La([Ga.guard(),ka("design:type",Function),ka("design:paramtypes",["function"==typeof(Oa=void 0!==W.ParamModelVisitor&&W.ParamModelVisitor)?Oa:Object,Boolean]),ka("design:returntype",void 0)],Ua.prototype,"visit",null),La([Ga.guard(),ka("design:type",Function),ka("design:paramtypes",["function"==typeof(Ta=void 0!==W.ParamModelVisitor&&W.ParamModelVisitor)?Ta:Object,Boolean]),ka("design:returntype",void 0)],Ua.prototype,"upVisit",null),ua.registeCreator(ie,(function(e){return e.isRoot()?new Ua(e):ua.get(e.getParent()).guard((function(t){return new Ua(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var ts=function e(){es(this,e),this.paramModels=[]},rs=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},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&&za(e,t)}(i,e);var t,r,n,o=Xa(i);function i(e){var t;return es(this,i),(t=o.call(this,e)).modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=i,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[];Wa($a(i.prototype),"updateState",this).call(this,e);var r=this.state.paramModels;this.updateParamModelsMap(t,r),t!==r&&this.emit(i.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=po.Util.diffArray(e,t),n=this.modelsMap.paramsMap,o=r.removed;o.push.apply(o,Ka(r.updatedOld));var i,A,a=r.added;a.push.apply(a,Ka(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=o.length;c<l;++c){if(delete n[A=o[c].id],(i=s[A])&&i.length>0)for(var g=0,f=i.length;g<f;++g)delete u[i[g]];delete s[A]}for(var p=0,h=a.length;p<h;++p)n[A=a[p].id]=a[p].$model,i=[],a[p].visit((function(e){A=e.getId(),i.push(A),u[A]=e,ua.put(e)}),!0),s[A]=i}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(Va(Va({},e),new ts)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(qA.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===Na}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(JA.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=ua.get(e,!0);return t.asStub(),t}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,rs);return t?ua.get(t):void 0}}])&&qa(t.prototype,r),n&&qa(t,n),i}(So.KafBaseStateManager);function os(e){return(os="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 is(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 as(e,t,r){return(as="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=ls(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function ss(e,t){return(ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function us(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=ls(e);if(t){var o=ls(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cs(this,r)}}function cs(e,t){return!t||"object"!==os(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 ls(e){return(ls=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ns.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var gs=Object(gi.getConnector)().setRootState,fs=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&&ss(e,t)}(i,e);var t,r,n,o=us(i);function i(){var e;return is(this,i),(e=o.apply(this,arguments)).design=new q,e.fittingDesign=new Re,e}return t=i,(r=[{key:"initState",value:function(){as(ls(i.prototype),"initState",this).call(this);var e=KA().getDependentPlugin(So.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&As(t.prototype,r),n&&As(t,n),i}(So.types.combine({pad:ns})),ps=r(236),hs=r.n(ps),ds=r(698),Is=r(701),ys=r.n(Is),Cs=r(8),Es=r.n(Cs),Bs=r(278),vs=r.n(Bs),ms=r(1102),Qs=r.n(ms),bs=r(349),_s=r.n(bs),ws=r(700),Ss=r.n(ws),Ds=r(1103),Rs=r.n(Ds),Ms=r(707),xs=r.n(Ms),Ps=r(708),Fs=r.n(Ps),Os=r(204),Ts=r.n(Os),Ls=r(112),ks=r.n(Ls),Ns=r(180),Gs=r.n(Ns),Us=r(511),js=r.n(Us),Ys=r(1104),Vs=r.n(Ys),Hs=r(706),Ks=r.n(Hs),Js=r(705),qs=r.n(Js),Ws=r(350),zs=r.n(Ws),Xs=r(235),Zs=r.n(Xs),$s=r(712),eu=r.n($s),tu=r(699),ru=r.n(tu),nu=r(1105),ou=r.n(nu),iu=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[yr.a,Ar.a,_s.a,ga.a,Ss.a,y.a,Rs.a,Ts.a,ks.a,Gs.a,js.a,E.a,sr.a,cr.a,gr.a,Vs.a,Ks.a,qs.a,v.a,zs.a,Zs.a,eu.a,$s.LineIndex,pr.a,ru.a,ou.a,lt.a,Q.a,ArrayBuffer,Cs.Vector3,vs.a,Qs.a,ca.ParamStore,xs.a,Fs.a,ys.a,We.a,ds.FurnitureModel,Map,Cs.SkyBackground]:[];Object(ps.inject)({isKnownImmutableInstance:function(e){return iu.some((function(t){return e instanceof t}))}});hs.a;var Au=r(208);function au(e){return(au="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 su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uu(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 cu(e,t){return(cu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lu(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=fu(e);if(t){var o=fu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gu(this,r)}}function gu(e,t){return!t||"object"!==au(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 fu(e){return(fu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pu=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&&cu(e,t)}(i,e);var t,r,n,o=lu(i);function i(){var e;return su(this,i),(e=o.apply(this,arguments)).rootState=new fs,e}return t=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new HA(this,this.rootState);e.init(),e.run()}}])&&uu(t.prototype,r),n&&uu(t,n),i}(Au.BasePlugin);function hu(e){return(hu="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 du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iu(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 yu(e,t){return(yu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cu(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=Bu(e);if(t){var o=Bu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Eu(this,r)}}function Eu(e,t){return!t||"object"!==hu(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 Bu(e){return(Bu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pu.dependencies=[So.AppServicePlugin];var vu;new(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&&yu(e,t)}(i,e);var t,r,n,o=Cu(i);function i(){return du(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"name",value:function(){return"commonEnvSetting"}},{key:"envItems",value:function(){return[]}}])&&Iu(t.prototype,r),n&&Iu(t,n),i}(po.Env));var mu=function(e){if(!vu)throw new Error("please new Application before call method");return vu.getCustomMiniAppService(e)};function Qu(e,t){var r=new Map;return function(){var n,o=t.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=e.apply(void 0,arguments),Object(he.isObject)(n)&&Object(he.isFunction)(n.then)&&Object(he.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function bu(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function _u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){bu(i,n,o,A,a,"next",e)}function a(e){bu(i,n,o,A,a,"throw",e)}A(void 0)}))}}var wu=new Map;function Su(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var Du=Qu(function(){var e=_u(f.a.mark((function e(t){var r,n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=PA(),n=Su(t),!wu.has(n)){e.next=4;break}return e.abrupt("return",wu.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return o=e.sent,wu.set(n,o.data.d),e.abrupt("return",o.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Su);function Ru(){var e=mu(co);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var Mu,xu,Pu=function(){var e=_u(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=PA(),o=Su(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:wu.set(o,t),Ru(),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)}}(),Fu=function(){var e=_u(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),n=Su(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:wu.has(n)&&wu.delete(n),Ru(),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 Ou(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}!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"}(Mu||(Mu={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(xu||(xu={}));var Tu=function(){var e,t=(e=f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),e.next=3,r.gzipGet(t,{params:{_time:Date.now()}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Ou(i,n,o,A,a,"next",e)}function a(e){Ou(i,n,o,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Lu=r(240);function ku(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Nu(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){ku(i,n,o,A,a,"next",e)}function a(e){ku(i,n,o,A,a,"throw",e)}A(void 0)}))}}var Gu,Uu,ju,Yu,Vu,Hu,Ku,Ju,qu=function(){var e=Nu(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(he.castArray)(t),n=mu(uo),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Wu=Qu(function(){var e=Nu(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mu(Lu.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||"")})),zu=Qu(function(){var e=Nu(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mu(Lu.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||"")})),Xu=r(157),Zu=r.n(Xu);!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(Gu||(Gu={})),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"}(Uu||(Uu={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(ju||(ju={})),function(e){e.SCENE_ID="cp"}(Yu||(Yu={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Vu||(Vu={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Hu||(Hu={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(Ku||(Ku={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Ju||(Ju={}));Ju.SHADING,Ju.OUTLINE_WITH_SHADING,Ju.TRANSLUCENT,Ju.OUTLINE_AND_TRANSLUCENT;var $u={maxAge:6e5,max:20};function ec(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 tc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rc(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function nc(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){rc(i,n,o,A,a,"next",e)}function a(e){rc(i,n,o,A,a,"throw",e)}A(void 0)}))}}var oc,ic,Ac=Zu()(function(){var e=nc(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),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?ec(Object(r),!0).forEach((function(t){tc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},$u)),ac=Zu()(function(){var e=nc(f.a.mark((function e(t){var r,n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=PA(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return o=e.sent,e.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(he.mapValues)(o.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)}}());!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(oc||(oc={})),function(e){e.SELECTED="SELECTED"}(ic||(ic={}));var sc=r(97),uc=r.n(sc);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 o=fc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gc(this,r)}}function gc(e,t){return!t||"object"!==pc(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)}function pc(e){return(pc="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 hc,dc=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ic=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":pc(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},yc=Symbol("paramModelAssembly"),Cc=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=lc(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=yc,n.entityId=e.getId(),n}return r}(So.Entity),Ec=Cc=dc([Object(So.provideEntityAPIs)([new So.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),Ic("design:paramtypes",["function"==typeof(hc=void 0!==b.CoreParamModelAssembly&&b.CoreParamModelAssembly)?hc:Object])],Cc);function Bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vc(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)}function mc(e,t){return(mc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qc(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=_c(e);if(t){var o=_c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bc(this,r)}}function bc(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 _c(e){return(_c=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 Sc=function(e,t,r,n){var o,i=arguments.length,A=i<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--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Dc=function(e){vc(r,e);var t=Qc(r);function r(e,n){var o;return Bc(this,r),(o=t.call(this)).model=e,o.context=n,o._parent=void 0,o._children=[],o.entityType=n.type,o.entityId=e.getId(),o}return r}(So.Entity),Rc=function(e){vc(r,e);var t=Qc(r);function r(){return Bc(this,r),t.apply(this,arguments)}return r}(Dc);Rc=Sc([Object(So.provideEntityAPIs)([new So.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Rc);var Mc=r(184);function xc(e){return(xc="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 Pc=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Fc=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":xc(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Oc=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 Tc(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,o=e.texture,i=e.opacity;if(!(r&&r.length||n&&n.length||o))return t.getMesh()+(1!==i?String(i):"")+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 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)}function kc(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 Nc(e,t){return(Nc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gc(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 o=jc(this).constructor;r=Reflect.construct(n,arguments,o)}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 jc(e){return(jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Pc([pe.observable,Fc("design:type",Number)],Oc.prototype,"opacity",void 0),Pc([pe.observable,Fc("design:type",Boolean)],Oc.prototype,"visible",void 0);var Yc=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&&Nc(e,t)}(i,e);var t,r,n,o=Gc(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).props=e,t.material=new Cs.LineBasicMaterial({color:oc.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=i,(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 o=(t=n,(r=new Cs.BufferGeometry).addAttribute("position",new Cs.Float32BufferAttribute(t,3)),r);this.geometry=o,this.computeLineDistances()}var i=this.props,A=i.color,a=void 0===A?oc.outline:A,s=i.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&kc(t.prototype,r),n&&kc(t,n),i}(Cs.LineSegments),Vc=r(352),Hc=r(80);function Kc(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 Jc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qc=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kc(Object(r),!0).forEach((function(t){Jc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:Cs.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function Wc(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 zc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(r),!0).forEach((function(t){Xc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zc(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function $c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Zc(i,n,o,A,a,"next",e)}function a(e){Zc(i,n,o,A,a,"throw",e)}A(void 0)}))}}function el(e){return tl.apply(this,arguments)}function tl(){return(tl=$c(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g,p,h;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,o=t.opacity,i=void 0===o?1:o,A=t.textureUrl,a=t.textureSize,s=null==n?void 0:n.getRefractColor(),u=zc({},qc),s&&(c=Object(Hc.clamp)(Math.max(s.x,s.y,s.z),0,1),r.transparent=c>.01,u.opacity=Math.max(1-c,.1)),i<1&&(u.transparent=!0,u.opacity=i),l=A||(null==n?void 0:n.getDiffuseTexture()),!Object(he.isEmpty)(l)){e.next=12;break}(g=null==n?void 0:n.getDiffuseColor())&&(u.color=new Cs.Color(g.x,g.y,g.z).getHex()),u.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=l,a){e.next=18;break}return e.next=16,Object(Vc.loadImage)(l);case 16:p=e.sent,a={x:p.naturalWidth,y:p.naturalHeight};case 18:return e.next=20,Object(Vc.loadTexture)(l,{wrapS:Cs.WebGLTextureWrap.Repeat,wrapT:Cs.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(h=e.sent).repeat=new Cs.Vector2(1/a.x,1/a.y),h.updateMatrix(),u.uvTransform=h.matrix,u.texture=h;case 25:r.setValues(u);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rl(e){return(rl="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 nl(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function ol(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){nl(i,n,o,A,a,"next",e)}function a(e){nl(i,n,o,A,a,"throw",e)}A(void 0)}))}}function il(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 Al(e,t){return(Al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function al(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=ul(e);if(t){var o=ul(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sl(this,r)}}function sl(e,t){return!t||"object"!==rl(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 ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cl=new Cs.BufferGeometry;var ll=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&&Al(e,t)}(a,e);var t,r,n,o,i,A=al(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=po.EDCCountCategory.PHONG,t.material=new Cs.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:(i=ol(f.a.mark((function e(t){var r,n;return f.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 i.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,o,i,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new Cs.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),o=new Float32Array(e.normals),i=new Float32Array(e.textures),t.index=new Cs.BufferAttribute(r,1),t.addAttribute("position",new Cs.BufferAttribute(n,3)),t.addAttribute("uv",new Cs.BufferAttribute(i,2)),o&&o.length?t.addAttribute("normal",new Cs.BufferAttribute(o,3)):t.computeVertexNormals(),t):cl}},{key:"updateMaterial",value:(o=ol(f.a.mark((function e(){var t,r,n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,o=t.tiledImgUrl,i=t.textureSize,e.next=3,el({material:this.material,materialInfo:r,opacity:n,textureUrl:o,textureSize:i});case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})}])&&il(t.prototype,r),n&&il(t,n),a}(Cs.Mesh);function gl(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 fl(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 fl(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function fl(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 pl(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 hl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dl(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 Il={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var yl=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?pl(Object(r),!0).forEach((function(t){hl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Il),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new Oc,this.id=t.model.getId(),this.type=r.type;var n,o=gl(r.stateReducers);try{for(o.s();!(n=o.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){o.e(e)}finally{o.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)}},{key:"create",value:function(e){var t,r=this.props.model,n=new Cs.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,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(),o=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(o.x,o.y,o.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(Mc.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(Mc.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(Mc.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(Mc.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(Mc.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,o,i,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 ll({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(o=g.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var p,h=this.meshes,d=s.length;d--;)p=s[d],h[d].updateProps({geometry:p.geometry,tiledImgUrl:p.texture&&(p.texture.hdTiledImageUrl||p.texture.tiledImgUrl),textureSize:null===(i=p.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:p.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,o=(n=t).getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories());if(Object(he.isEqual)(this.modelDepProps.renderChildNodes,o))for(var i=0;i<this.childNodeDrawables.length;i++){var A=this.childNodeDrawables[i],a=this.childNodeMeshes[i];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=o,this.disposeChildNodeMeshes(e),this.childNodeDrawables=o.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=gl(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 So.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||Q.a.ZERO,size:n.size.clone().div(n.scale),scale:Q.a.ONE,rotation:Q.a.ZERO,generateComponentInstanceKey:Tc(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 So.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:Tc(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var o,i=gl(this.displayInfoMeshs);try{for(i.s();!(o=i.n()).done;){var A=o.value;e.add(A)}}catch(e){i.e(e)}finally{i.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(),o=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new Yc({points:n||[],visible:o}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:o})}}])&&dl(t.prototype,r),n&&dl(t,n),e}();function Cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function El(e,t){return(El=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bl(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=ml(e);if(t){var o=ml(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vl(this,r)}}function vl(e,t){return!t||"object"!==Ql(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 ml(e){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ql(e){return(Ql="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 bl=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ql(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},_l=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&&El(e,t)}(r,e);var t=Bl(r);function r(){var e;return Cl(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(Dc);function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sl(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 Dl(e,t,r){return t&&Sl(e.prototype,t),r&&Sl(e,r),e}function Rl(e,t,r){var n=r.getEntity(e)||function(e,t){return e.isRoot()?new _l(e,t):new Rc(e,t)}(e,t);r.registerEntity(e,n);var o=e.getParent();return o&&(n._parent=r.getEntity(o)),n._children=e.getChildNodes().map((function(e){return Rl(e,t,r)})),n}_l=bl([Object(So.provideEntityAPIs)([new So.EntityAPIs.DrawableAPI3D((function(){var e=this;return new yl({model:this.model,renderChild:function t(r){return new yl({model:r,renderChild:t},e.context)}},this.context)})),new So.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],_l);var Ml=function(){function e(t){var r=this;wl(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 Dl(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++)Rl(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new Ec(e)}))}}]),e}(),xl=function(){function e(t,r){wl(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new Ml(r)}return Dl(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 Pl(e){return(Pl="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 Fl=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pl(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Ol=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pl(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Tl=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 Ll(e){return function(e){if(Array.isArray(e))return kl(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 kl(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 kl(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 kl(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 Nl(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)}}Fl([pe.observable,Ol("design:type",Object)],Tl.prototype,"showOutline",void 0),Fl([pe.observable,Ol("design:type",Array)],Tl.prototype,"selected",void 0);var Gl=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),this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof Cs.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return Ll(this.idMap.entries())}}])&&Nl(t.prototype,r),n&&Nl(t,n),e}(),Ul=r(182);function jl(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 Yl=function(){function e(t,r,n){var o=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(){o.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(Ul.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Ul.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),o=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=0,A=o.length;i<A;++i)if(n[i]!==o[i])return!0;return!1}}])&&jl(t.prototype,r),n&&jl(t,n),e}();function Vl(e){return(Vl="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 Hl(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||Jl(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 Kl(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Jl(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function Jl(e,t){if(e){if("string"==typeof e)return ql(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)?ql(e,t):void 0}}function ql(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 Wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zl(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 Xl(e,t){return(Xl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zl(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=eg(e);if(t){var o=eg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $l(this,r)}}function $l(e,t){return!t||"object"!==Vl(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 eg(e){return(eg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Yl.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var tg=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&&Xl(e,t)}(i,e);var t,r,n,o=Zl(i);function i(){var e;return Wl(this,i),(e=o.apply(this,arguments)).store=new Tl,e.objectManager=new Gl,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),o=e.selectManager.isSelected(t);r(n.drawableState,o)},e.updateModelsState=function(t){var r,n=Kl(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var o=Hl(r.value,2),i=o[0],A=o[1],a=e.selectManager.isSelected(i);t(i,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=i,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,o=t.paramModelSymbol,i=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a;this.selectManager=new Yl(n.selection,[o],(function(e,t){r.store.selected=e,r.emit(ic.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new xl(A,{store:this.store,type:o,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers}));var u=i().getElementContext();return u.getterEmitter.on((function(e){pe.advanced.reportObserved(e.instance)})),u.setterEmitter.on((function(e){pe.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=Kl(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=Hl(t.value,2),o=n[0],i=n[1];if(!e||e.includes(o)){var A,a=this.selectManager.isSelected(o),s=Kl(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(i.model,a,i.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&zl(t.prototype,r),n&&zl(t,n),i}(sc.EventEmitter),rg=Object(gi.getConnector)(),ng=rg.connect,og=rg.setRootState;function ig(e,t,r){return ng((function(){return e(UC(),kh().getStateManager())}),t,r)}var Ag=r(1106),ag=r.n(Ag);function sg(e){return(sg="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 ug(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cg(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 lg(e,t,r){return t&&cg(e.prototype,t),r&&cg(e,r),e}function gg(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&&fg(e,t)}function fg(e,t){return(fg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pg(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=dg(e);if(t){var o=dg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hg(this,r)}}function hg(e,t){return!t||"object"!==sg(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 dg(e){return(dg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ig=Symbol("layout"),yg=ig((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){gg(r,e);var t=pg(r);function r(){return ug(this,r),t.apply(this,arguments)}return lg(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(So.MountPoint)),Cg=function(e){gg(r,e);var t=pg(r);function r(){return ug(this,r),t.apply(this,arguments)}return lg(r,[{key:"render",value:function(){return pi.a.createElement(yg,{mountPointId:Ig})}}]),r}(pi.a.PureComponent);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)}function Bg(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 vg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mg(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&&Qg(e,t)}function Qg(e,t){return(Qg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bg(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=wg(e);if(t){var o=wg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _g(this,r)}}function _g(e,t){return!t||"object"!==Eg(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 wg(e){return(wg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Cg.contextType=So.AppContext;var Sg=ig((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}}),function(e){mg(r,e);var t=bg(r);function r(){return vg(this,r),t.apply(this,arguments)}return r}(So.Scene3D)),Dg=ig((function(){return{}}),(function(){return{}}),function(e){mg(i,e);var t,r,n,o=bg(i);function i(){var e;return vg(this,i),(e=o.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(Cs.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new Cs.Color(Vu.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),kh().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=i,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return pi.a.createElement(Sg,{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})}}])&&Bg(t.prototype,r),n&&Bg(t,n),i}(pi.a.PureComponent));function Rg(e){return(Rg="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 Mg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(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 Pg(e,t){return(Pg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fg(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=Tg(e);if(t){var o=Tg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Og(this,r)}}function Og(e,t){return!t||"object"!==Rg(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 Tg(e){return(Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lg=ig((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&&Pg(e,t)}(i,e);var t,r,n,o=Fg(i);function i(){var e;return Mg(this,i),(e=o.apply(this,arguments)).rootRef=pi.a.createRef(),e.updateLayout=Object(he.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new lt.a(r.width,r.height))}}),200),e}return t=i,(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 pi.a.createElement("div",{ref:this.rootRef,id:Yu.SCENE_ID,className:r},pi.a.createElement(Dg,{containerId:Yu.SCENE_ID,size:new h.Vector2d(t.x,t.y)}))}}])&&xg(t.prototype,r),n&&xg(t,n),i}(pi.a.PureComponent));r(2070);function kg(e){return(kg="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 Ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gg(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 Ug(e,t){return(Ug=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jg(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=Vg(e);if(t){var o=Vg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yg(this,r)}}function Yg(e,t){return!t||"object"!==kg(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 Vg(e){return(Vg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hg=ig((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&&Ug(e,t)}(i,e);var t,r,n,o=jg(i);function i(){return Ng(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){return pi.a.createElement(So.ViewMounter,{mountPointId:Ig},pi.a.createElement(Lg,{key:"s3",className:ag.a.scene3D}))}}])&&Gg(t.prototype,r),n&&Gg(t,n),i}(pi.a.PureComponent)),Kg=Symbol("fitting-data"),Jg=Symbol("groove-fitting-entity"),qg=Symbol("intersect-data"),Wg=Symbol("param-model-hint-entity");function zg(e,t){return(zg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xg(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=$g(e);if(t){var o=$g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zg(this,r)}}function Zg(e,t){return!t||"object"!==ef(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 $g(e){return($g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ef(e){return(ef="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 tf,rf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ef(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},nf=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ef(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},of=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&&zg(e,t)}(r,e);var t=Xg(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=Kg,n.entityId=e.id,n}return r}(So.Entity);of=rf([Object(So.provideEntityAPIs)([new So.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===n.GROOVE)return Af(e);if(t===n.HOLE)return af(e)}(e)},update:function(t){var r=e.$model,n=r.position,o=r.visible;t.position.set(n.x,n.y,n.z),t.visible=o,t.material&&(t.material.visible=o)}}})),new So.EntityAPIs.HighlightGeometryAPI3D((function(){var e=this.$model,t=e.position,r=e.size,n=e.rotate;return{geometry:new ga.a(r,t,n)}}))]),nf("design:paramtypes",["function"==typeof(tf=void 0!==Je&&Je)?tf:Object])],of);var Af=function(e){var t=e.$model,r=t.position,n=t.size,o=t.rotate,i=t.visible,A=t.viewColor,a=new Cs.BoxGeometry(n.x,n.y,n.z),s=new Cs.MeshBasicMaterial({color:A,visible:i}),u=new Cs.Mesh(a,s);return u.position.set(r.x,r.y,r.z),u.rotation.set(o.x,o.y,o.z),u.visible=i,u},af=function(e){var t=e.$model,r=t.position,n=t.visible,o=t.rotate,i=t.height,A=t.viewColor,a=t.fittingData.diameter/2,s=new Cs.CylinderGeometry(a,a,i),u=new Cs.MeshBasicMaterial({color:A,visible:n}),c=new Cs.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(o.x,o.y,o.z),c};function sf(e){return function(e){if(Array.isArray(e))return uf(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 uf(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 uf(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 uf(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 cf(e,t){return(cf=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=ff(e);if(t){var o=ff(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gf(this,r)}}function gf(e,t){return!t||"object"!==pf(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 ff(e){return(ff=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pf(e){return(pf="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 hf,df=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},If=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":pf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},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&&cf(e,t)}(r,e);var t=lf(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=Jg,n.entityId=e.id,n}return r}(So.Entity);function Cf(e){var t=e.matrix,r=e.points,n=e.depth,o=e.color,i=e.side,A=e.position,a=new Cs.LineBasicMaterial,s=new Cs.MeshBasicMaterial,u=new Cs.Mesh(void 0,s),c=new Cs.Line(void 0,a),l=new Cs.Group;return u.setAttribute("transparent-line-origin",!1),c.setAttribute("transparent-line-origin",!1),l.add(u),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),s.setValues({color:o,side:i}),l.applyMatrix(t),l.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,o=e.height,i=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new Cs.Shape,u=A?new Cs.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new Cs.Vector3(e.x,e.y,o))})),s.lineTo(a.x,a.y),i&&(s.holes=i);A&&(u.vertices.push(new Cs.Vector3(a.x,a.y,o)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new Cs.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,o)}({area:u,points:r,height:n}),l}function Ef(e){var t=new h.BBox3d;return[].concat(sf(e.getTopRenderPoints()),sf(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new h.Point3d(e))})),new ga.a(new Q.a({x:t.width,y:t.height,z:t.depth}),new Q.a(t.center),new Q.a({x:0,y:0,z:0}))}function Bf(e){var t=new Cs.BufferGeometry;if(t.index=new Cs.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new Cs.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new Cs.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new Cs.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function vf(e,t){return(vf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(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=bf(e);if(t){var o=bf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Qf(this,r)}}function Qf(e,t){return!t||"object"!==_f(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 bf(e){return(bf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _f(e){return(_f="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)}yf=df([Object(So.provideEntityAPIs)([new So.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new Cs.Group,r=e.pointToGlobalMatrix(),n=e.depth,o=e.viewColor,i=void 0===o?1735416:o,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),u=new E.a;u.fromString(r.toArray().join(","));var c=function(e){var t=e.elements;return(new Es.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])}(u),l=or.a.decompose(u).position,g=Cf({matrix:c,depth:0,points:s,color:i,side:Cs.Side.FrontSide,position:l}),f=Cf({matrix:c,depth:-n,points:s,color:i,side:Cs.Side.BackSide,position:l}),p=[].concat(sf(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,o=e.color,i=new Cs.MeshBasicMaterial,A=new Cs.Mesh(new Cs.BufferGeometry,i);if(i.setValues({side:r,color:o}),A.setAttribute("transparent-line-origin",!0),A.setAttribute("outline",!1),A.setAttribute("shadowCaster",!1),A.geometry instanceof Cs.BufferGeometry){var a=function(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],o=0;o<r-1;o++)n.push(e[o].x,e[o].y,e[o].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z),n.push(t[o].x,t[o].y,t[o].z),n.push(t[o].x,t[o].y,t[o].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z);return n}(e.topPoints,e.bottomPoints);A.geometry.addAttribute("position",new Cs.Float32BufferAttribute(a,3)),A.geometry.dispose()}return A.applyMatrix(t),A.position.set(n.x,n.y,n.z),A}({position:l,matrix:c,topPoints:p.map((function(e){return new h.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new h.Point3d(e.x,e.y,-n)})),color:i,side:Cs.Side.DoubleSide});return t.add(g),t.add(f),t.add(d),[g,f,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 Cs.Mesh&&e.material&&Object(he.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new So.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:Ef(this.$model)}}))]),If("design:paramtypes",["function"==typeof(hf=void 0!==kt&&kt)?hf:Object])],yf);var wf,Sf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_f(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Df=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":_f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rf=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)}(r,e);var t=mf(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=qg,n.entityId=e.id,n}return r}(So.Entity),Mf=Rf=Sf([Object(So.provideEntityAPIs)([new So.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,o=t.originPoints,i=new Cs.Group,A=Bf(r),a=new Cs.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:Cs.Side.DoubleSide}),s=new Cs.Mesh(A,a);s.renderOrder=998,i.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(e){var t=new Cs.Mesh(xf,Pf);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return i}(e)},update:function(){}}}))]),Df("design:paramtypes",["function"==typeof(wf=void 0!==ut&&ut)?wf:Object])],Rf),xf=new Cs.SphereBufferGeometry(3),Pf=new Cs.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Ff(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 Of(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ff(Object(r),!0).forEach((function(t){Tf(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ff(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lf(e,t){var r=t.x/2,n=t.y/2,o=t.z/2,i=[{x:-r,y:-n,z:o},{x:r,y:-n,z:o},{x:r,y:n,z:o},{x:-r,y:n,z:o}],A=i.map((function(e){return Of(Of({},e),{},{z:-e.z})}));switch(e){case 0:return i;case 1:return[i[0],A[0],A[3],i[3]];case 2:return[i[3],A[3],A[2],i[2]];case 3:return[i[1],A[1],A[2],i[2]];case 4:return[i[1],A[1],A[0],i[0]];case 5:return A}return[]}function kf(e){return function(e){if(Array.isArray(e))return Nf(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 Nf(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 Nf(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 Nf(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 Gf(e,t){return(Gf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uf(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=Yf(e);if(t){var o=Yf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jf(this,r)}}function jf(e,t){return!t||"object"!==Vf(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 Yf(e){return(Yf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vf(e){return(Vf="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 Hf,Kf=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},Jf=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},qf=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&&Gf(e,t)}(r,e);var t=Uf(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=Wg,n.entityId=e.id,n}return r}(So.Entity),Wf=qf=Kf([Object(So.provideEntityAPIs)([new So.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,o=t.hintOutline,i=n.getConcatenatedMatrix(),A=new Cs.Group;r&&r.forEach((function(e){var t=Bf(wr(e,i)),r=new Cs.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:Cs.Side.DoubleSide}),n=new Cs.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(o){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=Lf(0,a),c=Lf(5,a);s=[].concat(kf(Object(he.zip)(u,[].concat(kf(u.slice(1)),[u[0]]))),kf(Object(he.zip)(c,[].concat(kf(c.slice(1)),[c[0]]))),kf(Object(he.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(he.chunk)(s,3).map((function(e){return new Q.a(e[0],e[1],e[2]).applyMatrix4(i)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new Yc({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),Jf("design:paramtypes",["function"==typeof(Hf=void 0!==Kt&&Kt)?Hf:Object])],qf);var zf,Xf,Zf,$f,ep,tp,rp,np=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=So.__unstable__.flatEntitiesCreator((function(e){return new of(e)})),this.createIntersectEntities=So.__unstable__.flatEntitiesCreator((function(e){return new Mf(e)})),this.createGrooveFittingEntities=So.__unstable__.flatEntitiesCreator((function(e){return new yf(e)})),this.createPlankFaceHintEntities=So.__unstable__.flatEntitiesCreator((function(e){return new Wf(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.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities]};
126
126
  /*!
127
127
  * @qunhe/custom-apass-api v0.11.0
128
128
  * (c) 2021 yuanlin <yuanlin@qunhemail.com>
129
129
  * @license ISC
130
- */!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Vf||(Vf={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Hf||(Hf={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE"}(Kf||(Kf={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Jf||(Jf={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(qf||(qf={})),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"}(Wf||(Wf={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(zf||(zf={}));new Map([[zf.Cabinet,0],[zf.Wardrobe,1],[zf.DoorWindow,2],[zf.CabinetCopy,4],[zf.WardrobeCopy,5],[zf.DoorWindowCopy,6]]);
130
+ */!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(zf||(zf={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Xf||(Xf={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE"}(Zf||(Zf={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}($f||($f={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(ep||(ep={})),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"}(tp||(tp={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(rp||(rp={}));new Map([[rp.Cabinet,0],[rp.Wardrobe,1],[rp.DoorWindow,2],[rp.CabinetCopy,4],[rp.WardrobeCopy,5],[rp.DoorWindowCopy,6]]);
131
131
  /*! *****************************************************************************
132
132
  Copyright (c) Microsoft Corporation.
133
133
 
@@ -141,4 +141,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
141
141
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
142
142
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
143
143
  PERFORMANCE OF THIS SOFTWARE.
144
- ***************************************************************************** */var Zf=function(){return(Zf=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ep=new Array(36);var tp,rp=function(){function e(){this.data={name:"",displayName:"",type:Wf.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:Kf.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:Kf.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 np(e){var t=new rp;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(tp||(tp={}));var op,ip,Ap,ap,sp=function(){function e(){this._changeMap={}}return e.prototype.getRoot=function(){return this.root},e.prototype.clone=function(){var t=this.toJSON();t._changeMap=Zf(Zf({},t._changeMap),{cloned:!0});var r=e.deserialize(JSON.stringify(t));return 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)ep[t]="-";else if(14===t)ep[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,ep[t]=$f[19===t?3&r|8:r]}return ep.join("")}(),r},e.prototype.setRotate=function(e){this.__trackUpdateField({type:Kf.ATTRIBUTE,attr:"rotate"},this.rotate,e),this.rotate=e},e.prototype.getRotate=function(){return this.rotate},e.prototype.setRotation=function(e){this.__trackUpdateField({type:Kf.ATTRIBUTE,attr:"rotation"},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){this.__trackUpdateField({type:Kf.ATTRIBUTE,attr:"position"},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.dispose=function(){this._changeMap.deleted=!0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(!this.children.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Jf.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(!this.accessories.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Jf.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.toJSON=function(e){void 0===e&&(e=!0);var t=this.isRoot,r=e&&!t?this.root:this,n={id:r.id,position:r.position,rotate:r.rotate,rotation:r.rotation,size:r.size,params:Array.from(r.params).map((function(e){return[e[0],e[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(!1)})),accessories:r.accessories.map((function(e){return e.toJSON(!1)})),_changeMap:r._changeMap,_origin:r._origin};return e&&!t&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(e){var t=function e(t,r,n){void 0===r&&(r=new Map);var o=new sp;o.id=t.id,o.position=t.position,o.rotate=t.rotate,o.rotation=t.rotation,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],np(e[1])]}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);if(r.set(o.id,o),o.children=t.children.map((function(t){return e(t,r,n||o)})),o.accessories=t.accessories.map((function(t){return e(t,r,n||o)})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(JSON.parse(e));return this.id=t.id,this.position=t.position,this.rotate=t.rotate,this.rotation=t.rotation,this.size=t.size,this.params=t.params,this.productId=t.productId,this.category=t.category,this.isRoot=t.isRoot,this.modelType=t.modelType,this.isHidden=t.isHidden,this._origin=t._origin,this._changeMap=t._changeMap,this.root=t.root,this.children=t.children,this.accessories=t.accessories,this},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=[],this._changeMap.update=n),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&n.push(e)},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 o=n.getChild(),i=n.getAccessory();if(o.some(t)||i.some(t))return this._parent=n,n;r.push.apply(r,o),r.push.apply(r,i)}},e}();!function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(op||(op={})),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"}(ip||(ip={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(Ap||(Ap={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(ap||(ap={}));var up=r(697),cp=r.n(up);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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fp(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 pp(e,t){return(pp=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=Ip(e);if(t){var o=Ip(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dp(this,r)}}function dp(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 Ip(e){return(Ip=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yp=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&&pp(e,t)}(i,e);var t,r,n,o=hp(i);function i(){return gp(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:Kf.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&fp(t.prototype,r),n&&fp(t,n),i}(sp);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 Ep(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){Bp(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 Bp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vp={x:0,y:0,z:0},mp={x:0,y:0,z:0};function Qp(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=t.category,i=t.origin,A=new yp,a=!(e instanceof ie)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof ie;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=qf.ASSEMBLY;if(u?c=qf.COMMON:e.isTemplateAssembly()&&(c=qf.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?vp:s.getPosition(),A.rotate=A.isRoot?mp:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=_p(s),A.category=o||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=i),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Qp(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Qp(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function bp(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,o=t.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),A=n.cloned;return A&&(o=o.clone(!1)),o=function e(t,r,n,o){var i=t._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var A=i.update,a=void 0===A?[]:A,s=i.addNodes,u=void 0===s?[]:s,c=o?Ep({},o):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===Kf.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotate());break;case"isHidden":n.setInvisible(t.getHidden())}if(e.type===Kf.STORE){var o=n.getParamStore().getParam(e.attr),i=t.getParam(e.attr);if(o&&i){var A=i.getValue();[rr.ParamType.MATERIAL,rr.ParamType.SHAPE].includes(o.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&o.setValue(A),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),u.forEach((function(o){var i=o.type,A=o.linkId,a=(i===Jf.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!==tp.SENSE)&&(s=s.clone(!1)),i===Jf.CHILD?(s.setIsAppend(!0),s.setAppendType(cp.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,Ep(Ep({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==tp.SENSE)&&s.assignUniqueId())}}));var l=function(o){return function(i){if(!u.some((function(e){return e.type===o&&e.linkId===i.id}))){var A=o===Jf.ACCESSORY?n.getAccessories():n.getChildren(),a=i._changeMap.originId||i.id,s=A.find((function(e){return e.id===a}));s&&e(i,r,s,Ep(Ep({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Jf.CHILD)),t.getAccessory().forEach(l(Jf.ACCESSORY)),n}(r,t,o),A&&o&&o.assignUniqueId(),{create:A,custom:i,model:o}}function _p(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new rp;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()},[Wf.MATERIAL,Wf.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}function wp(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 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))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}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 Dp(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 Rp=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.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(he.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,o=wp(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(e){o.e(e)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=wp(Object(he.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),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),this.disabled=!0}},{key:"checkIsPress",value:function(e){var t=this;return Object(he.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 d.includes(e)}}])&&Dp(t.prototype,r),n&&Dp(t,n),e}(),Mp=new Map([[rr.ParamModelCategory.FRAME,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.FRAME,rr.ParamModelCategory.SLIDING_DOOR_BOARD,rr.ParamModelCategory.PARAM_FURNITURE_PART,rr.ParamModelCategory.SANITARY_COMPONENT,rr.ParamModelCategory.DOOR_LEAF,rr.ParamModelCategory.DECORATIVE_MOLDING_C,rr.ParamModelCategory.DECORATIVE_MOLDING_W,rr.ParamModelCategory.HANDS_FREE,rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[rr.ParamModelCategory.SHOWER_ROOM,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.FRAME,rr.ParamModelCategory.PARAM_FURNITURE_PART,rr.ParamModelCategory.SANITARY_COMPONENT,rr.ParamModelCategory.DOOR_LEAF,rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.SLIDING_DOOR_BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.RAIL,rr.ParamModelCategory.DOOR_LEAF]],[rr.ParamModelCategory.SLIDING_DOOR_C,[rr.ParamModelCategory.RAIL,rr.ParamModelCategory.SINGLE_SLIDING_DOOR]],[rr.ParamModelCategory.SPACE_GROUP,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.SPECIAL_BOARD,rr.ParamModelCategory.SPACE_GROUP]],[rr.ParamModelCategory.SINGLE_SLIDING_DOOR,[rr.ParamModelCategory.SLIDING_DOOR_CORE,rr.ParamModelCategory.DOOR_WAIST_LINE]],[rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[rr.ParamModelCategory.SWING_DOOR]],[rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.SWING_DOOR,[rr.ParamModelCategory.DOOR_CORE,rr.ParamModelCategory.DOOR_WAIST_LINE,rr.ParamModelCategory.DECORATIVE_MOLDING,rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.DRAWER,[rr.ParamModelCategory.DRAWER_PANEL,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.PARAM_FURNITURE,[rr.ParamModelCategory.FURNITURE_LEG]],[rr.ParamModelCategory.KADA,[rr.ParamModelCategory.BYOBU,rr.ParamModelCategory.BYOBU_FRAME,rr.ParamModelCategory.BYOBU_PANEL]]]);function xp(e){return function(e){if(Array.isArray(e))return Pp(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 Pp(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 Pp(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 Pp(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 Fp(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.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=u.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new Rp,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=(Mp.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,o=this,i=[],A=t;A&&A!==e;)i.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 i.find((function(e){return o.isAccessory(e)}))||t}},{key:"findParamModelById",value:function(e){return $t(xh().getStateManager().core.design.getCustom().getParamModels(),e)}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Qp(e,{origin:tp.SENSE},void 0,Qp(t,{origin:tp.SENSE})):Qp(e,{origin:tp.SENSE})}},{key:"findAssemblyById",value:function(e){return xh().getStateManager().core.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e}))}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(e.isAppendHardware)return e;var o,i,A=e.isRoot()?e:e.getRoot(),a=A.getAssembly(),s=!1,u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity;if(u&&((o=this.findParamModelById(u.entityId))?i=(i=o.isRoot()?o:o.getRoot()).getAssembly()||i:(s=!0,i=o=this.findAssemblyById(u.entityId))),!i||i!==A&&i!==a){if(t===c.CLICK)return a||A;if(t===c.DB_CLICK)return a?A:this.getAccessoryAtFirstLevel(A,e)}else{for(var l=!1,g=e;g;){if(g===o){l=!0;break}g=(null===(r=g.getParent)||void 0===r?void 0:r.call(g))||(null===(n=g.getAssembly)||void 0===n?void 0:n.call(g))}if(t===c.CLICK)return l?o:i instanceof b.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===A?this.getAccessoryAtFirstLevel(A,e):A:this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK)return l?s?A:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(A,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n,o,i;if(e.isAppendHardware)return e;var A=e.isRoot()?e:e.getRoot(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=a&&this.findParamModelById(null==a?void 0:a.entityId);if(((null===(r=null==s?void 0:s.isRoot)||void 0===r?void 0:r.call(s))?s:null===(n=null==s?void 0:s.getRoot)||void 0===n?void 0:n.call(s))===A){for(var u=!1,l=e;l;){if(l===s){u=!0;break}l=(null===(o=l.getParent)||void 0===o?void 0:o.call(l))||(null===(i=l.getAssembly)||void 0===i?void 0:i.call(l))}if(t===c.CLICK)return u?s:this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(s,e);var g=this.getAccessoryAtFirstLevel(A,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===c.CLICK)return this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK){var f=this.getAccessoryAtFirstLevel(A,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r,n,o,i=e.isRoot()?e:e.getRoot(),A=i.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity;if(a&&(o=(n=this.findParamModelById(a.entityId))?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n=this.findAssemblyById(a.entityId)),n&&(o===i||o===A)){for(var s=!1,c=e;c;){if(c===n){s=!0;break}c=(null===(t=c.getParent)||void 0===t?void 0:t.call(c))||(null===(r=c.getAssembly)||void 0===r?void 0:r.call(c))}return s?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof b.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,e):this.designMode===u.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,e)}return this.designMode===u.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,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===u.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(he.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){return{entityId:e.id,entityType:e.type===l.PARAM_MODEL?BA:gc}}},{key:"customModeSelectModel",value:function(e,t){var r,n=this.getParamModelLite(e),o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(he.castArray)(o).filter((function(e){return!!e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this.getParamModelLite(e),n=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,r);return Object(he.castArray)(n).filter((function(e){return!!e})).map(this.genEntityDescriptor)}},{key:"getEntityDescriptor",value:function(e){return{entityId:e.getId(),entityType:e instanceof b.CoreParamModelAssembly?gc:BA}}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==u.CUSTOM){switch(this.designMode){case u.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case u.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case u.PRODUCT:r=e}if(!r)return;var n=this.getEntityDescriptor(r),o=Object(he.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&o.push.apply(o,xp(this.prevModeSelectEntity));var i=o[0]&&(this.findParamModelById(o[0].entityId)||this.findAssemblyById(o[0].entityId));if(i&&i.isAppendHardware!==r.isAppendHardware)return n;var A=o.filter((function(e){return e.entityId!==n.entityId}));return A.length!==o.length?A:A?[].concat(xp(A),[n]):[n]}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case u.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case u.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case u.PRODUCT:r=e;break;case u.CUSTOM:return this.customModeSelectModel(e,t)}return{entityId:(r||e).getId(),entityType:r instanceof b.CoreParamModelAssembly?gc:BA}}}},{key:"getHintEntity",value:function(e){var t;if(e.isAppendHardware)t=e;else switch(this.designMode){case u.TOP_MODEL:case u.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case u.PRODUCT:t=e;break;case u.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(he.castArray)(this.curSelectEntity)||[];if(!([].concat(xp(r),xp(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return this.getEntityDescriptor(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)}}])&&Fp(t.prototype,r),n&&Fp(t,n),e}();function Tp(e){return(Tp="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 Lp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kp(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 Gp(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=jp(e);if(t){var o=jp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Up(this,r)}}function Up(e,t){return!t||"object"!==Tp(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 jp(e){return(jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yp=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)}(i,e);var t,r,n,o=Gp(i);function i(){return Lp(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"pickRayTarget",value:function(e){var t,r=e.event,n=e.sceneId,o=this.context.pick(n,r),i=(null===(t=null==o?void 0:o.entity)||void 0===t?void 0:t.entityId)||"";if(i)return this.findParamModelByEntityId(i)}},{key:"selection",get:function(){return xh().getStateManager().kaf.selection}},{key:"hint",get:function(){return xh().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return xh().designModeContext}},{key:"findParamModelByEntityId",value:function(e){var t;return null===(t=xh().getStateManager().core.pad.findModel(e))||void 0===t?void 0:t.$model}},{key:"findParamModelAssemblyByEntityId",value:function(e){return xh().getStateManager().core.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e}))}}])&&kp(t.prototype,r),n&&kp(t,n),i}(un.ToolModule.Feature);function Vp(e){return(Vp="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 Hp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kp(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 Jp(e,t){return(Jp=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=zp(e);if(t){var o=zp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wp(this,r)}}function Wp(e,t){return!t||"object"!==Vp(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 zp(e){return(zp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xp=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&&Jp(e,t)}(i,e);var t,r,n,o=qp(i);function i(){var e;return Hp(this,i),(e=o.apply(this,arguments)).isMouseDown=!1,e}return t=i,(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.pickRayTarget(e);if(t){var r=this.designModeCtx.getHintEntity(t);this.designModeCtx.getDesignMode(),u.CUSTOM,this.hint.hint(r)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Kp(t.prototype,r),n&&Kp(t,n),i}(Yp);function Zp(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 $p(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 $p(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function $p(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 eh(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 th(e,t){return(th=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rh(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=oh(e);if(t){var o=oh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nh(this,r)}}function nh(e,t){return!t||"object"!==ih(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 oh(e){return(oh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ih(e){return(ih="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 Ah,ah=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ih(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},sh=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ih(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},uh=un.__INTERNAL__.Highlighters.WireGeometry,ch=un.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,lh=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&&th(e,t)}(i,e);var t,r,n,o=rh(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).models=e,t}return t=i,(r=[{key:"getGeometry",value:function(){var e,t=new uh,r=Zp(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.append(ch(n.getConcatenatedBox3()))}}catch(e){r.e(e)}finally{r.f()}return t}}])&&eh(t.prototype,r),n&&eh(t,n),i}(un.Entity),gh=lh=ah([Object(un.provideEntityAPIs)([new un.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),sh("design:paramtypes",["function"==typeof(Ah="undefined"!=typeof Array&&Array)?Ah:Object])],lh);function fh(e){return(fh="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 ph(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 hh(e,t){return(hh=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=yh(e);if(t){var o=yh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ih(this,r)}}function Ih(e,t){return!t||"object"!==fh(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 yh(e){return(yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ch=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&&hh(e,t)}(i,e);var t,r,n,o=dh(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(t){return e.findParamModelByEntityId(t.entityId)||e.findParamModelAssemblyByEntityId(t.entityId)}));return new gh(r)}};return(e=o.call(this)).selection.addMultiSelectionConfig(t),e}return t=i,(r=[{key:"onClick",value:function(e){this.triggerClick(e,c.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,c.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.pickRayTarget(e);if(r){var n=this.designModeCtx.getSelectEntity(r,t);this.designModeCtx.getDesignMode()===u.CUSTOM?n&&this.selection.select(n):(this.selection.select(n),this.designModeCtx.setCurSelectEntity(n))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&ph(t.prototype,r),n&&ph(t,n),i}(Yp);function Eh(e){return(Eh="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){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 vh(e,t,r){return(vh="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=_h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function mh(e,t){return(mh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qh(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=_h(e);if(t){var o=_h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bh(this,r)}}function bh(e,t){return!t||"object"!==Eh(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 _h(e){return(_h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wh,Sh,Dh,Rh=new Wr.SingletonRef,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&&mh(e,t)}(i,e);var t,r,n,o=Qh(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:Ng,axrs:PC,singleton:Rh},e)).stateManager=t,r.viewer=new Wl,r.designModeContext=new Op,r}return t=i,(r=[{key:"init",value:function(){vh(_h(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),Zl(e);var t=this.getDependentPlugin(un.AppServicePlugin),r=this.getDependentPlugin(za);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){vh(_h(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new yi),this.client=new ko(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core.design,n=this.getDependentPlugin(un.AppServicePlugin);this.viewer.config(n,{getCustom:function(){return r.getCustom()},getDoc:function(){return r.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e){for(var t=$t(r.getCustom().getParamModels(),e.entityId);t&&![rr.ParamModelType.PARAM_ENTITY,rr.ParamModelType.PARAM_FURNITURE].includes(t.getType());)t=t.getParent();return t?{entityId:t.id,entityType:BA}:e},paramModelSymbol:BA}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),n.registerEntityDocument(new Xf((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new Ch})),t.kaf.toolbox.addIdleToolFeature((function(){return new Xp})),n.setLayout(fg)}}])&&Bh(t.prototype,r),n&&Bh(t,n),i}(Wr.PluginApplication),xh=Rh.instance,Ph=r(89),Fh=r(423);function Oh(e){Dh=e}function Th(e){return(Th="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 Lh(e){return function(e){if(Array.isArray(e))return kh(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 kh(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 kh(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 kh(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 Nh(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Gh(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Uh(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Gh(i,n,o,A,a,"next",e)}function a(e){Gh(i,n,o,A,a,"throw",e)}A(void 0)}))}}function jh(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 Vh(e,t){return(Vh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hh(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=Jh(e);if(t){var o=Jh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Kh(this,r)}}function Kh(e,t){return!t||"object"!==Th(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 Jh(e){return(Jh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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&&Vh(e,t)}(i,e);var t,r,n,o=Hh(i);function i(){var e;return jh(this,i),(e=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Uh(f.a.mark((function t(){var r,n;return f.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=Is.sappSDK.getServiceUnsafe(ds.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=Uh(f.a.mark((function t(r){var n,o,i;return f.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(o=Object(he.castArray)(r),i=Object(he.difference)(o,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=o,!i.length&&n){t.next=12;break}return t.next=9,ju(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=Uh(f.a.mark((function t(r){var n,o,i,A,a,s,u,c,l,g,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(he.uniq)(Object(he.flatten)(Object(he.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 o=e.getStateManager(),t.next=7,Promise.allSettled(Object(he.map)(n,function(){var e=Uh(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ec(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 7:return i=t.sent,t.next=10,tc(n);case 10:for(p in A=t.sent,a=Object(he.mapValues)(Object(he.keyBy)(Object(he.filter)(i,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),s=o.core.design.getCustom(),u=s.getParamModels(),c=[],l={},g=function(e){var t=r.hardware[e],n=$t(u,e);if(n){var o=n.getConcatenatedMatrix(),i=n.getSize(),s=(new E.a).makeTranslation(new Q.a(-i.x/2,i.y/2,-i.z/2)),g=o.clone().multiply(s),f=Object(he.map)(t,(function(e){var t=a[e.brandGoodId],r=A[e.brandGoodId]||{x:0,y:0,z:0};if(t){var o=t.paramModelData,i=Nh(t,["paramModelData"]),s=e.rotate,u=(new ie).parse(o);Object(Ph.attach)(u,Object(Ph.toAttachedMap)(i)),u.setIsAppendHardware(!0),u.setLinkedIds(e.linkedIds),u.setHardwareData(e),u.linkParamModelId=n.id;var c=g.clone().multiply((new E.a).compose(new Q.a(e.position),new y.a(s.x,s.y,s.z),new Q.a(e.scale)).multiply((new E.a).setPosition(new Q.a(r)))),f=or.a.decompose(c),p=f.rotation,h=f.position,d=f.scale,I=new Q.a(h);return u.setPosition({x:I.x,y:I.y,z:I.z}),u.setRotation({x:p.x,y:p.y,z:p.z}),u.setScale(d),u.assignUniqueId(),l[e.id]=u.id,u}})).filter((function(e){return!!e}));c.push.apply(c,Lh(f))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)g(p);if(!c.length){t.next=23;break}return t.next=21,wh.updateAttacheds(c);case 21:s.addParamModels.apply(s,c),e.state.casbinModelIdMap=l;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Yh(t.prototype,r),n&&Yh(t,n),i}(Wr.AXR),Wh=r(205);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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zh(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 $h(e,t){return($h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ed(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=rd(e);if(t){var o=rd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return td(this,r)}}function td(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 rd(e){return(rd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nd,od=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&&$h(e,t)}(i,e);var t,r,n,o=ed(i);function i(){var e;return Xh(this,i),(e=o.apply(this,arguments)).paramModelConstructor=ie,e}return t=i,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new fe).parse(e,void 0,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Zh(t.prototype,r),n&&Zh(t,n),i}(r.n(Wh).a),id=r(90),Ad=[];function ad(e){return(ad="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 sd(e){return function(e){if(Array.isArray(e))return ud(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 ud(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 ud(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 ud(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 cd(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function ld(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){cd(i,n,o,A,a,"next",e)}function a(e){cd(i,n,o,A,a,"throw",e)}A(void 0)}))}}function gd(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function fd(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 hd(e,t){return(hd=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 o=yd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Id(this,r)}}function Id(e,t){return!t||"object"!==ad(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)}!function(e){e.design="design",e.series="series"}(nd||(nd={}));var Cd=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&&hd(e,t)}(i,e);var t,r,n,o=dd(i);function i(){var e;return fd(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({main:Ou.READY,design:Ou.READY,series:Ou.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,o=n.paramModelData,i=gd(n,["paramModelData"]),A=(new ie).parse(o),Object(Ph.attach)(A,Object(Ph.toAttachedMap)(i)),e.next=9,wh.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(Ad),e.next=13,Object(id.put)(this.$actionLoad.done.message({params:t,result:Ou.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(f.a.mark((function e(t,r){var n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.core.design.setCustom(t),n=t.getParamModels(),o=t.getParamModelAssemblies(),e.next=5,Promise.all(n.map(function(){var e=ld(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Ph.attach)(t,Object(Ph.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return i=n.filter((function(e){return!e.getAssembly()})),e.next=8,wh.updateAttacheds([].concat(sd(i),sd(o)));case 8:return e.next=10,Object(id.put)(this.$actionAddModelToSense.done.message({params:t,result:Ou.SUCCESS}));case 10: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(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.map((function(e){var t=e.paramModelData,r=gd(e,["paramModelData"]),n=(new ie).parse(t,new od);return Object(Ph.attach)(n,Object(Ph.toAttachedMap)(r)),n})),e.next=3,wh.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,sd(o)),e.next=6,Object(id.put)(this.$actionAddParamModelToSense.done.message({params:t,result:Ou.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(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),o=new od,i=t.map((function(e){return(new fe).parse(e,o)})),A=o.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=ld(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Ph.attach)(t,Object(Ph.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,wh.updateAttacheds(sd(i));case 8:return n.addParamModelAssemblies.apply(n,sd(i)),n.addParamModels.apply(n,sd(A)),e.next=12,Object(id.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:Ou.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=i,(r=[{key:"module",value:function(){return"entry"}}])&&pd(t.prototype,r),n&&pd(t,n),i}(Wr.AXR);function Ed(e){return(Ed="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 Bd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vd(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&&md(e,t)}function md(e,t){return(md=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qd(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=_d(e);if(t){var o=_d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bd(this,r)}}function bd(e,t){return!t||"object"!==Ed(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 _d(e){return(_d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Wr.AXR;var wd=function(e){vd(r,e);var t=Qd(r);function r(){return Bd(this,r),t.apply(this,arguments)}return r}(Wr.AXRPartial),Sd=(Wr.AXRManager,Math.sqrt(2)),Dd=Math.PI/6,Rd=Math.PI/3+Math.PI;function Md(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rd,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dd,n=e.getPosition(),o=e.getSize(),i=n.clone(),A=o.length()*Sd,a=new Q.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:i,position:a}}var xd=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 Pd(e){var t,r,n,o=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(i,A){t=o(i),r=o(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 Fd(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 Od(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(r),!0).forEach((function(t){Td(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(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 Ld(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}var kd=function(){var e,t=(e=f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=FC(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return o=e.sent,i=o.designId,A=o.levelid,a={modelid:null!=t?t:"",designid:i,levelid:A,toolType:0},s=n.getStateManager().core.design.getCustom(),t||((u=s.getParamModelAssemblies()).length?a.modelid=u[0].id:(c=s.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=c[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return l=e.sent,g=l.toolType,a.toolType=g,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Ld(i,n,o,A,a,"next",e)}function a(e){Ld(i,n,o,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Nd(e){return function(e){if(Array.isArray(e))return Gd(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 Gd(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 Gd(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 Gd(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 Ud(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new od;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),o=(t=Nd(r.getParamModels())).concat.apply(t,Nd(n.map((function(e){return e.getParamModels()}))));return o=o.filter((function(e){return!e.isAccessory()})),p.ParamModelUtils.collectAccessories(o).forEach((function(e){e.toLocalMatrix()})),{paramModels:o,paramModelAssemblies:n}}function jd(e){return(jd="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 Yd(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Vd(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Yd(i,n,o,A,a,"next",e)}function a(e){Yd(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Hd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kd(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 qd(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=zd(e);if(t){var o=zd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wd(this,r)}}function Wd(e,t){return!t||"object"!==jd(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 zd(e){return(zd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xd(e){return function(e){if(Array.isArray(e))return Zd(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 Zd(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 Zd(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 Zd(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 $d(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?$d(e.subModels):[]})).flat();return t.push.apply(t,Xd(e)),t}var eI=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)}(l,e);var t,r,n,o,i,A,a,s,u,c=qd(l);function l(){var e;return Hd(this,l),(e=c.apply(this,arguments)).state=e.stateCreator.create({loading:Fu.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(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l,g,p,h,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.modelId,o=t.defer,i=t.hasFitting,A=void 0!==i&&i,a=t.force,s=void 0!==a&&a,u=this.state.state,c=u.currModelId,l=u.result,n){e.next=4;break}throw new Error("not selected model!");case 4:if(g=n===c,p=this.$actionLoadParamModelJsonData,e.prev=6,h=g&&!s?l:void 0,!A||h){e.next=12;break}return e.next=11,Yu(n);case 11:h=e.sent;case 12:if(h){e.next=17;break}return as.delete(n),e.next=16,Vu(n);case 16:h=e.sent;case 17:if(h){e.next=19;break}throw new Error("输入json数据出现异常");case 19:return d=g?$d(h.paramModel):this.state.state.allSubModels,g&&FC().scene.$actionToggleSelectModel.dispatch(!0),e.next=23,p.done.dispatch({params:t,result:{ossContent:h,allSubModels:d}});case 23:e.next=30;break;case 25:return e.prev=25,e.t0=e.catch(6),e.next=29,p.failed.dispatch({params:t});case 29:o&&o.reject(e.t0);case 30:case"end":return e.stop()}}),e,this,[[6,25]])}))),t.done.every((function(e,t){var r=e.params.defer;r&&r.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=Fu.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,o=r.allSubModels;e.loading=Fu.SUCCESS,e.result=n,e.allSubModels=o})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=Fu.FAIL}))})),e}return t=l,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(u=Vd(f.a.mark((function e(t){var r,n,o,i,A,a=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(he.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),this.resetView(),(n=FC().scene).cameraController.$actionInit.dispatch(),function(){var e=Vd(f.a.mark((function e(){var t,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Pd(),a.getAxr(by).fittingDesignSense.$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,a.$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=10,this.getAxr(qh).getCurrentCustomData(r);case 10:return o=e.sent,i=Ud(o),(A=new x).addParamModels.apply(A,Xd(i.paramModels)),A.addParamModelAssemblies.apply(A,Xd(i.paramModelAssemblies)),e.next=17,this.getAxr(Cd).$actionAddModelToSense.started.dispatchResolve(A);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"refreshCustomModelData",value:(s=Vd(f.a.mark((function e(){var t,r,n,o,i,A;return f.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(),0!==r.length||0!==n.length){e.next=5;break}throw new Error("No custom model in the scene!");case 5:return e.next=7,ju(this.state.state.currModelId);case 7:return o=e.sent,i=Ud(o),r.forEach((function(e){t.removeParamModel(e)})),n.forEach((function(e){t.removeParamModelAssembly(e)})),e.next=13,Promise.all(i.paramModels.map(function(){var e=Vd(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Ph.attach)(t,Object(Ph.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 13:return A=i.paramModels.filter((function(e){return!e.getAssembly()})),e.next=16,wh.updateAttacheds([].concat(Xd(A),Xd(i.paramModelAssemblies)));case 16:t.addParamModels.apply(t,Xd(i.paramModels)),t.addParamModelAssemblies.apply(t,Xd(i.paramModelAssemblies));case 18:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=Vd(f.a.mark((function e(){var t,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Is.sappSDK.getService(ds.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(he.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=Vd(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,o=(n=t||{}).timeout,i=void 0===o?5e4:o,A=n.modelId,a=void 0===A?r.currModelId:A,s=n.force,u=void 0!==s&&s){e.next=14;break}return l=Pd(),this.getAxr(by).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:l,params:{modelid:a}}),e.prev=5,e.next=8,l.promise;case 8:c=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return g=Pd(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:g,modelId:a,hasFitting:!!c,force:u}),e.abrupt("return",g.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"getTopModelList",value:(i=Vd(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Is.sappSDK.getServiceUnsafe(Ru),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 i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=Vd(f.a.mark((function e(t){var r,n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(he.castArray)(t),n=Is.sappSDK.getServiceUnsafe(ds.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[i]).then((function(e){o.push(e)}));case 7:--i,e.next=4;break;case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)}))),function(e){return o.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.setGrooveFittings([]),e.fittingDesign.setFittings([]),e.fittingDesign.setPlankFaceHintModels([])}}])&&Kd(t.prototype,r),n&&Kd(t,n),l}(Wr.AXR);function tI(e){return(tI="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){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 nI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rI(Object(r),!0).forEach((function(t){oI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iI(e){return function(e){if(Array.isArray(e))return AI(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 AI(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 AI(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 AI(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 aI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function sI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){aI(i,n,o,A,a,"next",e)}function a(e){aI(i,n,o,A,a,"throw",e)}A(void 0)}))}}function uI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}}function lI(e,t){return(lI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gI(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=pI(e);if(t){var o=pI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fI(this,r)}}function fI(e,t){return!t||"object"!==tI(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 pI(e){return(pI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},dI=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&&lI(e,t)}(A,e);var t,r,o,i=gI(A);function A(){var e;return uI(this,A),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:Fu.FAIL,design:Object(he.cloneDeep)(hI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(he.cloneDeep)(hI))},e.getConnectedFittingDesign=function(){var t=sI(f.a.mark((function t(r){var n,o,i,A,a,s,u,c,l,g,p=arguments;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.length>1&&void 0!==p[1]&&p[1],o=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(he.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=o.hardwares||{},t.t0=f.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(u=t.t1.value,!A.hasOwnProperty(u)){t.next=16;break}if(!(c=Object(he.find)(A[u]||[],(function(e){return e.id===r})))){t.next=16;break}return s=u,a=c,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&s){t.next=20;break}throw new Error("当前五金不存在!");case 20:l=a.linkedIds,g=function(e){return l.includes(e.id)},i.holes[s]=Object(he.filter)(o.holes[s],g),i.grooves[s]=Object(he.filter)(o.grooves[s],g),t.next=27;break;case 26:Object(he.keys)(i).forEach((function(e){o[e]&&o[e][r]&&(i[e][r]=Object(he.cloneDeep)(o[e][r]))}));case 27:return t.abrupt("return",i);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,o=r.fittingDesign,i=r.design,A=t.holes,a=void 0===A?{}:A,s=t.grooves,u=void 0===s?{}:s,c=t.hardwareGrooves,l=void 0===c?{}:c,g=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),f=g.holeColor,h=g.grooveColor,d=p.ParamModelUtils.flattenModels(i.getCustom().getParamModels()),I={findRelativeModel:function(e){return $t(d,e)},transformModel:Wt};o.addFittings([].concat(iI(Hr(a,nI(nI({},I),{},{type:n.HOLE,color:f}))),iI(Hr(u,nI(nI({},I),{},{type:n.GROOVE,color:h}))))),o.addGrooveFittings(Hr(l,nI(nI({},I),{},{type:n.HARDWARE_GROOVE,color:h,transformModel:jr})))},e.appendFittingDataToFittingDesign=function(){var t=sI(f.a.mark((function t(r,n){var o,i,A,a,s,u,c,l,g,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.state.state,A=i.design,a=i.autoSave,s=!r.id||r.id===A.id,u=hI,c=n.timeout,l=n.save,g=void 0===l?a:l,p={id:null!==(o=r.id)&&void 0!==o?o:A.id,holes:nI(nI({},s?A.holes:u.holes),r.holes||{}),grooves:nI(nI({},s?A.grooves:u.grooves),r.grooves||{}),hardwares:nI(nI({},s?A.hardwares:u.hardwares),r.hardwares||{}),hardwareGrooves:nI(nI({},s?A.hardwareGrooves:u.hardwareGrooves),r.hardwareGrooves||{})},Object(he.pull)(Object(he.keys)(p),"id").forEach((function(e){var t=p[e];Object(he.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!g){t.next=12;break}return h=Pd(c),e.$actionSaveFittingDesign.started.dispatch({defer:h,design:p}),t.abrupt("return",h.promise);case 12:e.$actionRestoreFittingDesign.dispatch(p),e.fittingAddDataToFittingDesignSense(p);case 14: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(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,o=t.params,e.next=4,kd(o.modelid);case 4:return i=e.sent,e.prev=5,e.next=8,ls(nI(nI({},o),i));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:i.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,o=this.fittingAddDataToFittingDesignSense,i=e.result.designData?e.result.designData:Object(he.cloneDeep)(hI),A=this.getAxr(eI).state.state.currModelId;e.result.modelId===A&&(t.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),t.core.fittingDesign.setGrooveFittings([]),r.dispatch(i),o(i),t.core.design.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),this.getAxr(qh).loadFittingHardwareToSense({hardware:i.hardwares}));var a=e.params.defer;a&&a.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,o=this.getAxr(eI).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===o&&(t.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),t.core.fittingDesign.setGrooveFittings([]),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(f.a.mark((function e(t,r){var o,i,A,a,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getAxr(eI).state.state.currModelId,i=t.modelId,A=void 0===i?o:i,e.next=4,kd(A);case 4:return a=e.sent,A===o&&r.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),s=this.$actionClearFittingDesign,e.prev=7,e.next=10,fs(a);case 10:s.done.dispatch({params:t,result:void 0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),s.failed.dispatch({params:t});case 16:case"end":return e.stop()}}),e,this,[[7,13]])}))),e.done.every(f.a.mark((function e(t,r){var o,i,A,a,s,u;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.core,A=i.fittingDesign,a=i.design,s=this.getAxr(eI).state.state.currModelId,(null!==(o=t.params.modelId)&&void 0!==o?o:s)===s&&(this.initFittingDesign(),A.removeFittings({types:[n.HOLE,n.GROOVE]}),A.setGrooveFittings([]),a.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()}))),(u=t.params.defer)&&u.resolve();case 6:case"end":return e.stop()}}),e,this)}))),e.failed.every(f.a.mark((function e(t,r){var n;return f.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(t){t.started.every(f.a.mark((function e(t){var r,n,o,i;return f.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,kd(n.id);case 3:return o=e.sent,i=this.$actionSaveFittingDesign,e.prev=5,e.next=8,gs(nI(nI({},n),{},{id:o.modelid}),o);case 8:i.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),i.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),t.failed.every(f.a.mark((function e(t,r){var n;return f.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)}))),t.done.every(f.a.mark((function e(t,r){var o,i,A,a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=t.params.design,i=this.getAxr(eI).state.state.currModelId,!o||o.id&&o.id!==i||((A=r.core.fittingDesign).removeFittings({types:[n.HOLE,n.GROOVE]}),A.setGrooveFittings([]),this.fittingAddDataToFittingDesignSense(o),r.core.design.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),this.getAxr(qh).loadFittingHardwareToSense({hardware:o.hardwares})),(a=t.params.defer)&&setTimeout((function(){a.resolve()}));case 5:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){var r=t.params.design,n=FC().viewParamModel.state.state.currModelId;!r||r.id&&r.id!==n||(e.design=r)}))})),e}return t=A,(r=[{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&cI(t.prototype,r),o&&cI(t,o),A}(wd);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.__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,o=e.field;t===r||n.some((function(e){return e.field===o}))||n.push({field:o})}}])&&II(t.prototype,r),n&&II(t,n),e}();function CI(e){return(CI="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 EI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=vI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function BI(e){return function(e){if(Array.isArray(e))return mI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||vI(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){if(e){if("string"==typeof e)return mI(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)?mI(e,t):void 0}}function mI(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 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 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=DI(e);if(t){var o=DI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return SI(this,r)}}function SI(e,t){return!t||"object"!==CI(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)}(A,e);var t,r,o,i=wI(A);function A(){return QI(this,A),i.apply(this,arguments)}return t=A,(r=[{key:"getAllFittingModels",value:function(e){var t=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),r=this.stateManager.core.fittingDesign.getFittings(),o=this.stateManager.core.fittingDesign.getGrooveFittings();return[].concat(BI(t),BI(r),BI(o)).filter((function(t){return!e||t.linkParamModelId===e})).map((function(e){return function(e){var t,r=new yI;if(r.id=e.id,e instanceof ie){if(!e.isAppendHardware)return;t=n.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}(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=EI(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.isAppendHardware&&r.push(o),r.push.apply(r,BI(this.findHardwareParamModels(o.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],o=[],i=EI(e);try{for(i.s();!(t=i.n()).done;){var A=t.value;A.modelType===n.HARDWARE?r.push(A):o.push(A)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(o)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.design.getCustom().getParamModels();e.forEach((function(e){var r=$t(t,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=[]}})),xh().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings();e.forEach((function(e){var o;if(e.modelType===n.HARDWARE_GROOVE?o=r.find((function(t){return t.id===e.id})):e.modelType!==n.HOLE&&e.modelType!==n.GROOVE||(o=t.find((function(t){return t.id===e.id}))),o){var i=e.__changeMap.update;(void 0===i?[]:i).forEach((function(t){"isHidden"===t.field&&(null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&bI(t.prototype,r),o&&bI(t,o),A}(wd);function MI(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 xI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?MI(Object(r),!0).forEach((function(t){PI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function PI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function OI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){FI(i,n,o,A,a,"next",e)}function a(e){FI(i,n,o,A,a,"throw",e)}A(void 0)}))}}var TI=function(){var e=OI(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=hi(),e.next=3,n.post("/cos/api/c/task/intersected",{modelIds:t},{params:xI(xI({},r),{},{compress:1})});case 3:return o=e.sent,e.abrupt("return",o.data);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),LI=function(){var e=OI(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hi(),e.next=3,r.gzipGet("/cos/api/task/intersected",{params:{taskId:t}});case 3:return n=e.sent,e.abrupt("return",n.data.d);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function kI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function NI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){kI(i,n,o,A,a,"next",e)}function a(e){kI(i,n,o,A,a,"throw",e)}A(void 0)}))}}function GI(e,t){return UI.apply(this,arguments)}function UI(){return(UI=NI(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l,g,p,h,d=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>2&&void 0!==d[2]?d[2]:{},o=n.times,i=void 0===o?50:o,A=n.delay,a=void 0===A?1e3:A,s=n.firstDelay,u=n.errorFilter,c=void 0===u?he.noop:u,e.next=4,t();case 4:return l=e.sent,e.next=7,xd(null!=s?s:a);case 7:g=0;case 8:return g++,p=void 0,h=void 0,e.prev=12,e.next=15,r(l);case 15:h=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),p=e.t0;case 21:if(!p){e.next=25;break}if(!1!==c(p,g)){e.next=25;break}throw new Error("break loop because user cancel!");case 25:if(![us.CANCEL,us.TIMEOUT,us.FAIL,us.UNKNOWN].includes(h.status)){e.next=29;break}throw new Error("task status: ".concat(h.status));case 29:if(h.status!==us.SUCCESS){e.next=31;break}return e.abrupt("return",h.result);case 31:if(!(g>=i)){e.next=33;break}throw new Error("maximum limit is exceeded!");case 33:return e.next=35,xd(a);case 35:e.next=8;break;case 37:case"end":return e.stop()}}),e,null,[[12,18]])})))).apply(this,arguments)}function jI(e){return(jI="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 YI(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 VI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?YI(Object(r),!0).forEach((function(t){HI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function HI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function JI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){KI(i,n,o,A,a,"next",e)}function a(e){KI(i,n,o,A,a,"throw",e)}A(void 0)}))}}function qI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(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 zI(e,t){return(zI=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=$I(e);if(t){var o=$I(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ZI(this,r)}}function ZI(e,t){return!t||"object"!==jI(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 $I(e){return($I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ey=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&&zI(e,t)}(s,e);var t,r,n,A,a=XI(s);function s(){var e;return qI(this,s),(e=a.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:Fu.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(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kd(null===(n=t.models)||void 0===n?void 0:n[0]);case 2:return o=e.sent,i=t.models,A=void 0===i?[o.modelid]:i,a=t.defer,s=this.$actionLoadParamModelIntersectedData,e.prev=5,e.next=8,GI(JI(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,TI(A,Object(he.omit)(o,"modelid"));case 2:return t=e.sent,e.abrupt("return",t.d);case 4:case"end":return e.stop()}}),e)}))),function(){var e=JI(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,LI(t);case 2:return r=e.sent,e.abrupt("return",{status:r.status,result:r.address});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{firstDelay:500});case 8:return u=e.sent,c=FC().viewParamModel.state.state.currModelId===o.modelid,e.next=12,hs(u);case 12:if(l=e.sent,!c){e.next=16;break}return e.next=16,s.done.dispatch({params:t,result:{result:l,modelId:o.modelid}});case 16:a&&a.resolve(l),e.next=24;break;case 19:return e.prev=19,e.t0=e.catch(5),e.next=23,s.failed.dispatch({params:t});case 23:a&&a.reject(e.t0);case 24:case"end":return e.stop()}}),e,this,[[5,19]])}))),t.done.every((function(t,r){var n=t.params.defer,o=FC().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===o&&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=Fu.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Fu.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Fu.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,A=n.design,a=n.fittingDesign,s=e.state.state.intersectedVisible,u=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),c=u.intersectedColor,l=u.intersectedBodyColor,g=u.grooveIntersectedColor,f=u.grooveIntersectedBodyColor;a.setIntersects([]);var h=t.option,d=void 0===h?{}:h,I=t.intersectedGroups,y=p.ParamModelUtils.flattenModels(A.getCustom().getParamModels()),C=Object(he.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],A=e.intersectType;if(void 0!==d.plankFaceIds&&!d.plankFaceIds.includes(r.plankFaceId))return!1;if($t(y,r.linkedParentModelId)){var a=_r(e,r,$t(y,r.linkedModelId)),s=A===i.BOTH_PLANK?n===o.FACE?c:l:n===o.FACE?g:f;return a.setViewColor(s),a}})).filter((function(e){return!!e}));a.setIntersects(C),s||r.kaf.invisibleManager.hide("scene3d",jg,C.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",jg,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",jg,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(VI(VI({},r),{},{option:t}))},e}return t=s,(r=[{key:"getParamModelIntersectedData",value:(A=JI(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=FC().viewParamModel.state.state.currModelId,o=(n=t||{}).timeout,i=void 0===o?5e4:o,A=n.modelId,a=void 0===A?r:A,s=Pd(i),this.$actionLoadParamModelIntersectedData.started.dispatch({models:[a],defer:s}),this._getParamModelIntersectedCallback.push(s),u=function(){var e=c._getParamModelIntersectedCallback.indexOf(s);c._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",s.promise.then((function(e){return u(),e})).catch((function(e){return u(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})}])&&WI(t.prototype,r),n&&WI(t,n),s}(wd);function ty(e){return(ty="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 ry(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(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){return(oy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iy(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=ay(e);if(t){var o=ay(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ay(this,r)}}function Ay(e,t){return!t||"object"!==ty(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 ay(e){return(ay=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sy={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},uy=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&&oy(e,t)}(i,e);var t,r,n,o=iy(i);function i(){var e;return ry(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:sy}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(he.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=i,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(he.mapValues)(e,(function(e){return function(e,t){var r={};return Object(he.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,o=r.opacity;return Object(he.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:o,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:o}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(he.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.design,r=e.fittingDesign,n=t.getCustom(),o=this.state.state.option,i=n.getParamModels(),A=Object(he.map)(o,(function(e,t){var r=$t(i,t);if(r)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=Jt(e.plankFaceId,Q.a).mul(.1),r=Mf(e.plankFaceId,n).map((function(e){var r=new Q.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return Df(Df({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kt(r)}(e,r)})).filter((function(e){return!!e}));r.setPlankFaceHintModels(A)}}])&&ny(t.prototype,r),n&&ny(t,n),i}(wd);function cy(e){return(cy="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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(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){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function py(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 o=dy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hy(this,r)}}function hy(e,t){return!t||"object"!==cy(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 Iy=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&&fy(e,t)}(i,e);var t,r,n,o=py(i);function i(){var e;return ly(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object(he.extend)(e,t)}))})),e}return t=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&gy(t.prototype,r),n&&gy(t,n),i}(wd);function yy(e){return(yy="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 Cy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ey(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 By(e,t){return(By=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vy(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=Qy(e);if(t){var o=Qy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return my(this,r)}}function my(e,t){return!t||"object"!==yy(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 Qy(e){return(Qy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var by=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&&By(e,t)}(i,e);var t,r,n,o=vy(i);function i(){var e;return Cy(this,i),(e=o.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(dI),e.intersected=e.partialCreator.create(ey),e.senseSetting=e.partialCreator.create(Iy),e.fittingModel=e.partialCreator.create(RI),e.plankFaceHint=e.partialCreator.create(uy),e}return t=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Ey(t.prototype,r),n&&Ey(t,n),i}(Wr.AXR);function _y(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 wy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_y(Object(r),!0).forEach((function(t){Sy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dy(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Ry(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Dy(i,n,o,A,a,"next",e)}function a(e){Dy(i,n,o,A,a,"throw",e)}A(void 0)}))}}Ku()(function(){var e=Ry(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=hi(),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)}}(),wy({promise:!0},Ju));function My(){return(My=Ry(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hi().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,o=n.c,i=n.m,A=n.d,"0"!==o){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(o+i);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xy(){return(xy=Ry(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hi().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,o=n.c,i=n.m,A=n.d,"0"!==o){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(o+i);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Py=Ku()((function(e){return My.apply(this,arguments)}),wy(wy({},Ju),{},{promise:!0})),Fy=Ku()((function(e){return xy.apply(this,arguments)}),wy(wy({},Ju),{},{promise:!0}));function Oy(e){return function(e){if(Array.isArray(e))return Ty(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 Ty(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 Ty(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 Ty(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 Ly(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function ky(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 Ny=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,o,i;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:(o=f.a.mark((function e(t){var r,n,o,i,A,a,s=this,u=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>1&&void 0!==u[1]?u[1]:"__global__",n=Object(he.castArray)(t),o=[],i=[],A=new Map,n.forEach((function(e){var t=s.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?i.push(e):o.push(e)})),a=function(e){return[].concat(Oy(e.hardwares||[]),Oy(e.textures||[]),Oy(e.virtualModels||[]),Oy(e.paramModelProducts||[]),Oy(e.moldings||[]))},!o.length){e.next=12;break}return e.next=10,Py(o).then(a);case 10:e.sent.forEach((function(e){s.setProduct(e,r)}));case 12:if(!i.length){e.next=17;break}return e.next=15,Fy(i).then(a);case 15:e.sent.forEach((function(e){s.setProduct(e,r)}));case 17:return[].concat(o,i).forEach((function(e){var t=s.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){Ly(i,r,n,A,a,"next",e)}function a(e){Ly(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return i.apply(this,arguments)})}])&&ky(t.prototype,r),n&&ky(t,n),e}();function Gy(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Uy(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Gy(i,n,o,A,a,"next",e)}function a(e){Gy(i,n,o,A,a,"throw",e)}A(void 0)}))}}function jy(e){return function(e){if(Array.isArray(e))return Yy(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 Yy(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 Yy(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 Yy(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 Vy(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)}}var Ky=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ny;Vy(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,o;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 this.cached.set(e,t),t}},{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,jy(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 tp.BRANDGOOD:case tp.CATEGORY:break;case tp.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var o,i=e._changeMap.originId||e.id,A=[t];o=A.pop();){if(o.id===i)return o;A.push.apply(A,jy(o.getChildNodes()))}}},{key:"attach",value:(o=Uy(f.a.mark((function e(){var t,r,n,o,i,A,a,s,u=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=t.pop())){e.next=18;break}A=(i=o)._changeMap,a=i._origin,e.t0=a,e.next=e.t0===tp.SENSE?8:e.t0===tp.CATEGORY||e.t0===tp.BRANDGOOD||e.t0===tp.TEMPLATE_ID?11:12;break;case 8:return s=A.originId||o.id,r.modelIds.push(s),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(o&&e.type===Kf.STORE&&o.hasParam(e.attr)){var t=o.getParam(e.attr);t&&[Wf.MATERIAL,Wf.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,jy(o.getChild()).concat(jy(o.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(jy(Object(he.uniq)(r.modelIds).map(function(){var e=Uy(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.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 o.apply(this,arguments)})}])&&Hy(t.prototype,r),n&&Hy(t,n),e}(),Jy=r(713);function qy(e){return(qy="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 Wy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zy(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 Xy(e,t,r){return(Xy="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=tC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function Zy(e,t){return(Zy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $y(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 o=tC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eC(this,r)}}function eC(e,t){return!t||"object"!==qy(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)}var rC=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&&Zy(e,t)}(i,e);var t,r,n,o=$y(i);function i(){var e;return Wy(this,i),(e=o.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Cd),e.next=3,Object(id.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==Ou.SUCCESS){e.next=13;break}return e.next=6,Object(id.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(id.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(id.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(f.a.mark((function e(t,r){var n,o,i,A,a,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=o.length?Object(Jy.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()):Object(Jy.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()),s=Md(a),A.updateInitCameraAttributes(s),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=i,(r=[{key:"init",value:function(){Xy(tC(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&zy(t.prototype,r),n&&zy(t,n),i}(wd);function nC(e){return(nC="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 oC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=AC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function iC(e){return function(e){if(Array.isArray(e))return aC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||AC(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 AC(e,t){if(e){if("string"==typeof e)return aC(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)?aC(e,t):void 0}}function aC(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 sC(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function uC(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){sC(i,n,o,A,a,"next",e)}function a(e){sC(i,n,o,A,a,"throw",e)}A(void 0)}))}}function cC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lC(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 gC(e,t,r){return(gC="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=dC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function fC(e,t){return(fC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pC(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=dC(e);if(t){var o=dC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hC(this,r)}}function hC(e,t){return!t||"object"!==nC(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 dC(e){return(dC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IC=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&&fC(e,t)}(s,e);var t,r,n,o,i,A,a=pC(s);function s(){var e;return cC(this,s),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(rC),e.state=e.stateCreator.create({renderMode:ta.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(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ta.RenderMode.SHADING,o=!1,e.t0=t.mode,e.next=e.t0===Uu.SHADING?5:e.t0===Uu.OUTLINE_WITH_SHADING?7:e.t0===Uu.TRANSLUCENT?9:e.t0===Uu.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=ta.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=ta.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return o=!0,e.abrupt("break",14);case 11:return n=ta.RenderMode.OUTLINE_WITH_SHADING,o=!0,e.abrupt("break",14);case 14:return e.next=16,Object(id.put)(this.$actionMergeState.message({renderMode:n,translucent:o}));case 16:xh().viewer.toggleShowModelOutline(n===ta.RenderMode.OUTLINE_WITH_SHADING),xh().viewer.triggerReducer(),this.emit(Nu.renderModeChange);case 19:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?ta.RenderMode.OUTLINE_WITH_SHADING:ta.RenderMode.SHADING,e.next=3,Object(id.put)(this.$actionMergeState.message({renderMode:n}));case 3:xh().viewer.toggleShowModelOutline(n===ta.RenderMode.OUTLINE_WITH_SHADING),this.emit(Nu.renderModeChange);case 5:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(id.put)(this.$actionMergeState.message({translucent:t}));case 2:xh().viewer.triggerReducer(),this.emit(Nu.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(f.a.mark((function e(t,r){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(id.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=s,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;gC(dC(s.prototype),"init",this).call(this),xh().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?Gu.translucentModel:Gu.opaqueModel})),xh().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:"findParamModelById",value:function(e){return $t(this.getAllParamModels(),e)}},{key:"getAllCustomModels",value:(A=uC(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Qp(e,{origin:tp.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(i=uC(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.findParamModelById(t))){e.next=3;break}return e.abrupt("return",Qp(r,{origin:tp.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=uC(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,(n=new Ky((function(e){return c.findParamModelById(e)}))).addParamModelLite.apply(n,iC(r)),e.next=5,n.attach();case 5:return e.next=7,Promise.all(r.map((function(e){return bp(e,n)})));case 7:o=e.sent,i=[],A=[],a=oC(o);try{for(a.s();!(s=a.n()).done;)(u=s.value).create&&u.custom&&u.model&&i.push(u),!u.create&&u.model&&A.push(u.model)}catch(e){a.e(e)}finally{a.f()}(i.length||A.length)&&i.length&&i.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),xh().viewer.triggerReducer();case 14:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&lC(t.prototype,r),n&&lC(t,n),s}(Wr.AXR);function yC(e){return(yC="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 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){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?CC(Object(r),!0).forEach((function(t){BC(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}function BC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vC(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mC(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 mC(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 mC(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 QC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(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 _C(e,t,r){return(_C="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=RC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function wC(e,t){return(wC=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=RC(e);if(t){var o=RC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return DC(this,r)}}function DC(e,t){return!t||"object"!==yC(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 RC(e){return(RC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MC={rawSelected:[],selectedData:[]},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&&wC(e,t)}(i,e);var t,r,n,o=SC(i);function i(){var e;return QC(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create(MC).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(he.unzip)([t,r]).every((function(e){var t=vC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return EC(EC({},e),{},{selectedData:t})})),e.emit(i.EVENT_SELECT_CHANGED))},e._onStateChange=function(){e.onStateChange()},e}return t=i,(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(){_C(RC(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),_C(RC(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){_C(RC(i.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Ol.UPDATE,this._onStateChange),this.stateManager.core.pad.on(NA.EVENT_PARAM_MODELS_CHANGED,this.onModelsChange),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(NA.EVENT_PARAM_MODELS_CHANGED,this.onModelsChange),this.state.reduce((function(){return MC})),this.selectionStateManager.off(Ol.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[],_C(RC(i.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,t)&&(this.selected=t)}this.state.state.rawSelected!==e&&(this.state.reduce((function(t){return(t=EC({},t)).rawSelected=e,t})),this.onModelsChange())}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===BA}))}},{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),o=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=0,A=o.length;i<A;++i)if(n[i]!==o[i])return!0;return!1}}])&&bC(t.prototype,r),n&&bC(t,n),i}(Wr.AXR);xC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var PC={entry:Cd,scene:IC,select:xC,fittingDesign:by,baseDesignInfo:qh,viewParamModel:eI};function FC(){return xh().axr.axrs}var OC=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function TC(e){return(TC="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 LC(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 kC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?LC(Object(r),!0).forEach((function(t){NC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function NC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GC(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function UC(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){GC(i,n,o,A,a,"next",e)}function a(e){GC(i,n,o,A,a,"throw",e)}A(void 0)}))}}function jC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YC(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 VC(e,t){return(VC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HC(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 o=JC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KC(this,r)}}function KC(e,t){return!t||"object"!==TC(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)}var qC=function(){return FC().fittingDesign.fittingDesignSense},WC=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)}(u,e);var t,r,n,o,i,A,a,s=HC(u);function u(){return jC(this,u),s.apply(this,arguments)}return t=u,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];qC().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return qC().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=UC(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(FC().viewParamModel.state.state.currModelId!==t||qC().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,kd(t);case 5:return r=e.sent,e.abrupt("return",ls(kC(kC({},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 qC().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=$t(p.ParamModelUtils.flattenModels(FC().entry.getStateManager().core.design.getCustom().getParamModels()),t);return r?{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,o=0;o<n;o++){var i={type:Qr.POINT,val:t[o]},A={type:Qr.LINE,val:r[o]};if(!kr(i.val))return!1;if(!Nr(A.val))return!1;if(!Ur(i,A))return!1;for(var a=o+1;a<n;a++){var s={type:Qr.POINT,val:t[a]},u={type:Qr.LINE,val:r[a]};if(!Ur(i,s))return!1;if(!Ur(i,u))return!1;if(!Ur(A,s))return!1;if(!Ur(A,u))return!1}}return!0}(jr(e,r).path)}:{validated:!1}}},{key:"appendFittingDesign",value:(A=UC(f.a.mark((function e(t){var r,n=arguments;return f.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",qC().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(i=UC(f.a.mark((function e(t){var r,n,o,i=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=Pd(n),qC().$actionSaveFittingDesign.started.dispatch({defer:o,design:t}),e.abrupt("return",o.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=UC(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,A=Pd(o),qC().$actionClearFittingDesign.started.dispatch({defer:A,modelId:i}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&YC(t.prototype,r),n&&YC(t,n),u}(OC);function zC(e){return(zC="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 XC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZC(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 $C(e,t){return($C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eE(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=rE(e);if(t){var o=rE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tE(this,r)}}function tE(e,t){return!t||"object"!==zC(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 rE(e){return(rE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nE=(new Ar.a).setFromCenterAndSize(new Q.a(0,0,0),new Q.a(200,200,100)),oE=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&&$C(e,t)}(i,e);var t,r,n,o=eE(i);function i(){return XC(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,o=e.cameraAttributes.position,i=n.clone().sub(r).length(),A=n.clone().add(o.clone().sub(n).normalize().mul(i));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return nE}}])&&ZC(t.prototype,r),n&&ZC(t,n),i}(un.Scene3DStateManager);function iE(e){return(iE="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 AE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aE(e,t){return(aE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sE(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 o=cE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uE(this,r)}}function uE(e,t){return!t||"object"!==iE(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)}var 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&&aE(e,t)}(r,e);var t=sE(r);function r(){return AE(this,r),t.apply(this,arguments)}return r}(un.types.combine({scene3D:oE})),gE=window.document.createElement("script");gE.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(gE);function fE(e){return(fE="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 pE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hE(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 o=CE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yE(this,r)}}function yE(e,t){return!t||"object"!==fE(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)}var EE=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)}(i,e);var t,r,n,o=IE(i);function i(){var e;return pE(this,i),(e=o.apply(this,arguments)).rootState=new lE,e}return t=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new Mh(this,this.rootState);e.init(),e.run()}}])&&hE(t.prototype,r),n&&hE(t,n),i}(ja.BasePlugin);function BE(e){return(BE="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 mE(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 bE(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=wE(e);if(t){var o=wE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _E(this,r)}}function _E(e,t){return!t||"object"!==BE(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 wE(e){return(wE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}EE.dependencies=[un.AppServicePlugin,za];var SE=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)}(i,e);var t,r,n,o=bE(i);function i(){return vE(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"toggleModelViewIntersected",value:function(e){FC().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){FC().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&mE(t.prototype,r),n&&mE(t,n),i}(OC);function DE(e){return(DE="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 RE(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function ME(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){RE(i,n,o,A,a,"next",e)}function a(e){RE(i,n,o,A,a,"throw",e)}A(void 0)}))}}function xE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 FE(e,t){return(FE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OE(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=LE(e);if(t){var o=LE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TE(this,r)}}function TE(e,t){return!t||"object"!==DE(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 LE(e){return(LE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kE=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&&FE(e,t)}(s,e);var t,r,n,o,i,A,a=OE(s);function s(){return xE(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"getAllCustomModels",value:(A=ME(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(i=ME(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=ME(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&PE(t.prototype,r),n&&PE(t,n),s}(OC);function NE(e){return(NE="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 GE(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function UE(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){GE(i,n,o,A,a,"next",e)}function a(e){GE(i,n,o,A,a,"throw",e)}A(void 0)}))}}function jE(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 VE(e,t){return(VE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HE(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 o=JE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KE(this,r)}}function KE(e,t){return!t||"object"!==NE(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 qE,WE,zE=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&&VE(e,t)}(a,e);var t,r,n,o,i,A=HE(a);function a(){return jE(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(i=UE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=UE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&YE(t.prototype,r),n&&YE(t,n),a}(OC);function XE(e){return(XE="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 ZE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $E(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 eB(e,t){return(eB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tB(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=nB(e);if(t){var o=nB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rB(this,r)}}function rB(e,t){return!t||"object"!==XE(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 nB(e){return(nB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(qE||(qE={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(WE||(WE={}));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&&eB(e,t)}(i,e);var t,r,n,o=tB(i);function i(){return ZE(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case qE.View3D:t=un.PerspectiveCameraMode.View3D;break;case qE.Roamer:t=un.PerspectiveCameraMode.Roamer}xh().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=xh().getStateManager().scene3D;switch(e){case WE.UP:case WE.FRONT:t=un.ArrowType.UP;break;case WE.DOWN:case WE.BACK:t=un.ArrowType.DOWN;break;case WE.LEFT:t=un.ArrowType.LEFT;break;case WE.RIGHT:t=un.ArrowType.RIGHT}if(t){if(e===WE.UP||e===WE.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&$E(t.prototype,r),n&&$E(t,n),i}(OC);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 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 o=lB(this).constructor;r=Reflect.construct(n,arguments,o)}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)}(i,e);var t,r,n,o=uB(i);function i(){return AB(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"setDefaultHint",value:function(e){FC().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){FC().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){FC().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&aB(t.prototype,r),n&&aB(t,n),i}(OC);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 pB(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function hB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dB(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 IB(e,t){return(IB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yB(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=EB(e);if(t){var o=EB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return CB(this,r)}}function CB(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 EB(e){return(EB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var BB=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&&IB(e,t)}(a,e);var t,r,n,o,i,A=yB(a);function a(){return hB(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:function(e){return FC().viewParamModel.getParamModelJsonData(e)}},{key:"getParamIntersected",value:(o=f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,FC().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(he.map)(n.intersectedGroups,(function(e){return Od(Od({},e),{},{intersecteds:Object(he.map)(e.intersecteds,(function(e){return Object(he.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){pB(i,r,n,A,a,"next",e)}function a(e){pB(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(e){return FC().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return FC().viewParamModel.getParamModelPhotoData(e)}}])&&dB(t.prototype,r),n&&dB(t,n),a}(OC),vB=new nc.a.EventEmitter;function mB(e){return(mB="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 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 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=SB(e);if(t){var o=SB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wB(this,r)}}function wB(e,t){return!t||"object"!==mB(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 SB(e){return(SB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DB,RB,MB=function(){return FC().select};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(DB||(DB={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(RB||(RB={}));var xB=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)}(i,e);var t,r,n,o=_B(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).__generateEntity=function(e){return Object(he.castArray)(e).map((function(e){var t={__sceneId:Lu.SCENE_ID,entityId:e.id,entityType:BA};return e.type===RB.CASBIN&&(t.entityId=FC().baseDesignInfo.state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){vB.emit("EVENT_SELECT_MODEL_CHANGE",e.getSelected())},MB().on(xC.EVENT_SELECT_CHANGED,e.onSelectedChanged),e}return t=i,(r=[{key:"getSelected",value:function(){var e=MB().state.state.selectedData,t=FC().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof ie&&r.isAppendHardware)return{data:[r.hardwareData],type:DB.CASBIN};var n=Object(he.map)(e,"id"),o=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:o,type:DB.MODEL}}return{data:[],type:DB.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);MB().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);MB().unSelect(t)}else MB().select([])}},{key:"on",value:function(e){vB.on("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"off",value:function(e){vB.off("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"once",value:function(e){vB.once("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"__onDestroy",value:function(){MB().off(xC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&QB(t.prototype,r),n&&QB(t,n),i}(OC);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 FB(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function OB(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){FB(i,n,o,A,a,"next",e)}function a(e){FB(i,n,o,A,a,"throw",e)}A(void 0)}))}}function TB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 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 o=UB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return GB(this,r)}}function GB(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 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)}(s,e);var t,r,n,o,i,A,a=NB(s);function s(){return TB(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"viewSelected",value:(A=OB(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(i=OB(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=xh().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){FC().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){FC().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){FC().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(o=OB(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",FC().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})}])&&LB(t.prototype,r),n&&LB(t,n),s}(OC);function YB(e){return(YB="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 VB(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 JB(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 o=WB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qB(this,r)}}function qB(e,t){return!t||"object"!==YB(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)}(i,e);var t,r,n,o=JB(i);function i(){return VB(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;xh().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){xh().designModeContext.registerMultiSelectShortcut(e)}}])&&HB(t.prototype,r),n&&HB(t,n),i}(OC),XB=r(422),ZB=r.n(XB),$B=new Wr.I18NManager,ev="custom_order_split",tv={"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":"隐藏尺寸"},rv=r(513),nv=r.n(rv),ov=r(1107),iv=r.n(ov);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 av(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sv(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 cv(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=gv(e);if(t){var o=gv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lv(this,r)}}function lv(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 gv(e){return(gv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fv=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)}(i,e);var t,r,n,o=cv(i);function i(){return av(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,o=e.className;return Wn.a.createElement("div",{className:nv()(iv.a.empty,o)},!r&&Wn.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&Wn.a.createElement("p",null,t))}}])&&sv(t.prototype,r),n&&sv(t,n),i}(Wn.a.PureComponent);function pv(e){return(pv="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 dv(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 Iv(e,t){return(Iv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yv(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=Ev(e);if(t){var o=Ev(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cv(this,r)}}function Cv(e,t){return!t||"object"!==pv(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 Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bv=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&&Iv(e,t)}(i,e);var t,r,n,o=yv(i);function i(){return hv(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){var e=this.props;return Wn.a.createElement(un.Scene3D,e)}}])&&dv(t.prototype,r),n&&dv(t,n),i}(qn.PureComponent),vv=r(1108),mv=r.n(vv);function Qv(e){return(Qv="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 bv(){return(bv=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 _v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wv(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 Sv(e,t){return(Sv=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=Mv(e);if(t){var o=Mv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rv(this,r)}}function Rv(e,t){return!t||"object"!==Qv(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 Mv(e){return(Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qn.PureComponent;var xv=r(87);function Pv(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fv(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 Fv(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 Fv(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=Wn.a;var Ov=document.getElementById("root");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 Lv(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function kv(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Lv(i,n,o,A,a,"next",e)}function a(e){Lv(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Nv(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 Gv=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(A.ZH_CN,{zh_CN:tv})}var t,r,n,o,i;return t=e,(r=[{key:"start",value:(i=kv(f.a.mark((function e(){var t,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Is.sappSDK.started;case 2:return e.next=4,Promise.resolve([un.App,EE]).then((function(e){var t=Pv(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(Ov)})).catch((function(e){Object(xv.unmountComponentAtNode)(Ov),Object(xv.render)(Wn.a.createElement(fv,null),Ov),console.error("micros/pad",e)}));case 4:return(t=Is.sappSDK.getService(Du))?(hi().setMiniAppHttpProxyClientService(t),Oh(hi())):Oh(pi()),(wh=new Fh.AttachedService).config.setRequestClient(Dh),Sh=new Fh.ParamModelDataService({paramModelConstructor:ie,requestClient:Dh}),new Fh.ParamModelAssemblyDataService({paramModelAssemblyConstructor:fe,requestClient:Dh}),r=this.getService(jB),e.prev=8,e.next=11,r.viewSelected();case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(8),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 16:case"end":return e.stop()}}),e,this,[[8,13]])}))),function(){return i.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(he.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),ZB.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:XB.ENUM.TranslatorType.I18next,packages:[ev],resource:Tv({},ev,t)}),$B.init({namespace:ev,resources:ev})}},{key:"stop",value:(o=kv(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=Is.sappSDK.getService(Mu))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(he.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(e){if(OC.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!")}}])&&Nv(t.prototype,r),n&&Nv(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 oe})),r.d(t,"loadNamespaces",(function(){return ie})),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(185),o=r.n(n),i=r(81),A=r.n(i),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(209),g=r.n(l),f=r(238),p=r.n(f),h=r(239),d=r.n(h),I=r(100),y=r.n(I),C=r(1100),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 o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.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 w(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var A=n(i.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return o()?{}:{obj:e,k:n(i.shift())}}function S(e,t,r){var n=w(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=w(e,t),n=r.obj,o=r.k;if(n)return n[o]}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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var F=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,p()(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]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[e,t];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split(".")),D(this.data,i)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var A=[e,t];r&&(A=A.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),S(this.data,A,n),o.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 o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=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,o):s=A()({},s,r),S(this.data,a,s),i.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),O={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))})),t}},T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,p()(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,o=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t){var r=this;if("object"!==o()(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,i=this.extractFromKey(e[e.length-1],t),a=i.key,s=i.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),p=f&&f.res,h=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(p),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 p&&"boolean"!=typeof p&&"number"!=typeof p;if(E&&p&&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(h,p,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:h;for(var b in p)if(Object.prototype.hasOwnProperty.call(p,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=p[b])}p=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(p=p.join(C))&&(p=this.extendTranslation(p,e,t));else{var w=!1,S=!1;if(!this.isValidLookup(p)&&void 0!==t.defaultValue){if(w=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);p=t["defaultValue".concat(D)]}p||(p=t.defaultValue)}this.isValidLookup(p)||(S=!0,p=a);var R=t.defaultValue&&t.defaultValue!==p&&this.options.updateMissing;if(S||w||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:p);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 F=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:p,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:p,R,t),r.emit("missingKey",e,u,n,p)};if(this.options.saveMissing){var O=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&O?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return F([e],t)}))})):F(M,a)}}p=this.extendTranslation(p,e,t,f),S&&p===a&&this.options.appendNamespaceToMissingKey&&(p="".concat(u,":").concat(a)),S&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,r,n){var o=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 i=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(i=A()({},this.options.interpolation.defaultVariables,i)),e=this.interpolator.interpolate(e,i,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return o.translate.apply(o,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=O.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,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)||(i=e,f.forEach((function(r){if(!A.isValidLookup(t)){o=r;var i,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(i=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+i),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=i);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{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 L(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]=L(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]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(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),o=[],i=function(e){e&&(r.isWhitelisted(e)?o.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){o.indexOf(e)<0&&i(r.formatLanguageCode(e))})),o}}]),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=[],o=this.getRule(e);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(e,o);n.push("".concat(t).concat(i))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var o=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var A=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),Y=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 o,i,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),o=n.shift().trim(),i=n.join(a.formatSeparator).trim();return a.format(D(t,o),i,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(o=this.regexpUnescape.exec(e))&&(i=u(o[1].trim()),e=e.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;o=this.regexp.exec(e);){if(void 0===(i=u(o[1].trim())))if("function"==typeof c){var l=c(e,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=b(i));if(i=this.escapeValue?s(this.escape(i)):s(i),e=e.replace(o[0],i),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=A()({},o);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,i)).replace(/'/g,'"');try{i=JSON.parse(n),t&&(i=A()({},t,i))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),i),i))&&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}(),V=r(710),H=r.n(V);var K=function(e){function t(e,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),o=g()(this,p()(t).call(this)),m.call(y()(y()(o))),o.backend=e,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?A.indexOf(a)<0&&A.push(a):(o.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),i.indexOf(a)<0&&i.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(i.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:i,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=H()(n,2),i=o[0],A=o[1];t&&this.emit("failedLoading",i,A,t),r&&this.store.addResourceBundle(i,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,o,s,u,c,l;n=r.loaded,o=A,u=w(n,[i],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(o)),s||c[l].push(o),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,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=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&&o<5?setTimeout((function(){n.read.call(n,e,t,r,o+1,2*i,A)}),i):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=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."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.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("|"),o=H()(n,2),i=o[0],A=o[1];this.read(i,A,"read",null,null,(function(n,o){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(i," failed"),n),!n&&o&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(i),o),t.loaded(e,n,o)}))}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function J(){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"===o()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===o()(e[2])||"object"===o()(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 q(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,p()(t).call(this)),m.call(y()(y()(e))),e.options=q(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()({},J(),this.options,q(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 o=new k(this.options);this.store=new F(this.options.resources,this.options);var i=this.services;i.logger=v,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new j(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new Y(this.options),i.backendConnector=new K(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new T(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];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 o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.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&&O.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 o=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(o){!function(e,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(o,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var i=A()({},n);if("object"!==o()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,r.t(t,i)};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||[],o=e.filter((function(e){return n.indexOf(e)<0}));return o.length?(this.options.preload=n.concat(o),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,o=A()({},this.options,r,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.translator=new T(i.services,i.options),i.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];i.emit.apply(i,[e].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),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),oe=z.loadLanguages.bind(z),ie=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)}])}));
144
+ ***************************************************************************** */var op=function(){return(op=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ip="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Ap=new Array(36);var ap,sp=function(){function e(){this.data={name:"",displayName:"",type:tp.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:Zf.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:Zf.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 up(e){var t=new sp;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(ap||(ap={}));var cp,lp,gp,fp,pp=function(){function e(){this._changeMap={}}return e.prototype.getRoot=function(){return this.root},e.prototype.clone=function(){var t=this.toJSON();t._changeMap=op(op({},t._changeMap),{cloned:!0});var r=e.deserialize(JSON.stringify(t));return 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)Ap[t]="-";else if(14===t)Ap[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Ap[t]=ip[19===t?3&r|8:r]}return Ap.join("")}(),r},e.prototype.setRotate=function(e){this.__trackUpdateField({type:Zf.ATTRIBUTE,attr:"rotate"},this.rotate,e),this.rotate=e},e.prototype.getRotate=function(){return this.rotate},e.prototype.setRotation=function(e){this.__trackUpdateField({type:Zf.ATTRIBUTE,attr:"rotation"},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){this.__trackUpdateField({type:Zf.ATTRIBUTE,attr:"position"},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.dispose=function(){this._changeMap.deleted=!0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(!this.children.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:$f.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(!this.accessories.some((function(t){return t.id===e.id}))){e.root=this.root,e._parent=void 0,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:$f.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.toJSON=function(e){void 0===e&&(e=!0);var t=this.isRoot,r=e&&!t?this.root:this,n={id:r.id,position:r.position,rotate:r.rotate,rotation:r.rotation,size:r.size,params:Array.from(r.params).map((function(e){return[e[0],e[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(!1)})),accessories:r.accessories.map((function(e){return e.toJSON(!1)})),_changeMap:r._changeMap,_origin:r._origin};return e&&!t&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(e){var t=function e(t,r,n){void 0===r&&(r=new Map);var o=new pp;o.id=t.id,o.position=t.position,o.rotate=t.rotate,o.rotation=t.rotation,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],up(e[1])]}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);if(r.set(o.id,o),o.children=t.children.map((function(t){return e(t,r,n||o)})),o.accessories=t.accessories.map((function(t){return e(t,r,n||o)})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(JSON.parse(e));return this.id=t.id,this.position=t.position,this.rotate=t.rotate,this.rotation=t.rotation,this.size=t.size,this.params=t.params,this.productId=t.productId,this.category=t.category,this.isRoot=t.isRoot,this.modelType=t.modelType,this.isHidden=t.isHidden,this._origin=t._origin,this._changeMap=t._changeMap,this.root=t.root,this.children=t.children,this.accessories=t.accessories,this},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=[],this._changeMap.update=n),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&n.push(e)},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 o=n.getChild(),i=n.getAccessory();if(o.some(t)||i.some(t))return this._parent=n,n;r.push.apply(r,o),r.push.apply(r,i)}},e}();!function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(cp||(cp={})),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"}(lp||(lp={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(gp||(gp={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(fp||(fp={}));var hp=r(697),dp=r.n(hp);function Ip(e){return(Ip="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 yp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cp(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 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 o=mp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vp(this,r)}}function vp(e,t){return!t||"object"!==Ip(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=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)}(i,e);var t,r,n,o=Bp(i);function i(){return yp(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:Zf.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Cp(t.prototype,r),n&&Cp(t,n),i}(pp);function bp(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 _p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bp(Object(r),!0).forEach((function(t){wp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Sp={x:0,y:0,z:0},Dp={x:0,y:0,z:0};function Rp(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=t.category,i=t.origin,A=new Qp,a=!(e instanceof ie)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof ie;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=ep.ASSEMBLY;if(u?c=ep.COMMON:e.isTemplateAssembly()&&(c=ep.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?Sp:s.getPosition(),A.rotate=A.isRoot?Dp:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=xp(s),A.category=o||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=i),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Rp(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Rp(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function Mp(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,o=t.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),A=n.cloned;return A&&(o=o.clone(!1)),o=function e(t,r,n,o){var i=t._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var A=i.update,a=void 0===A?[]:A,s=i.addNodes,u=void 0===s?[]:s,c=o?_p({},o):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===Zf.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotate());break;case"isHidden":n.setInvisible(t.getHidden())}if(e.type===Zf.STORE){var o=n.getParamStore().getParam(e.attr),i=t.getParam(e.attr);if(o&&i){var A=i.getValue();[rr.ParamType.MATERIAL,rr.ParamType.SHAPE].includes(o.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&o.setValue(A),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),u.forEach((function(o){var i=o.type,A=o.linkId,a=(i===$f.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!==ap.SENSE)&&(s=s.clone(!1)),i===$f.CHILD?(s.setIsAppend(!0),s.setAppendType(dp.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,_p(_p({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==ap.SENSE)&&s.assignUniqueId())}}));var l=function(o){return function(i){if(!u.some((function(e){return e.type===o&&e.linkId===i.id}))){var A=o===$f.ACCESSORY?n.getAccessories():n.getChildren(),a=i._changeMap.originId||i.id,s=A.find((function(e){return e.id===a}));s&&e(i,r,s,_p(_p({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l($f.CHILD)),t.getAccessory().forEach(l($f.ACCESSORY)),n}(r,t,o),A&&o&&o.assignUniqueId(),{create:A,custom:i,model:o}}function xp(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new sp;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()},[tp.MATERIAL,tp.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}function Pp(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 Fp(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 Fp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function Fp(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 Op(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 Tp=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.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(he.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,o=Pp(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(e){o.e(e)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=Pp(Object(he.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),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),this.disabled=!0}},{key:"checkIsPress",value:function(e){var t=this;return Object(he.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 d.includes(e)}}])&&Op(t.prototype,r),n&&Op(t,n),e}(),Lp=new Map([[rr.ParamModelCategory.FRAME,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.FRAME,rr.ParamModelCategory.SLIDING_DOOR_BOARD,rr.ParamModelCategory.PARAM_FURNITURE_PART,rr.ParamModelCategory.SANITARY_COMPONENT,rr.ParamModelCategory.DOOR_LEAF,rr.ParamModelCategory.DECORATIVE_MOLDING_C,rr.ParamModelCategory.DECORATIVE_MOLDING_W,rr.ParamModelCategory.HANDS_FREE,rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[rr.ParamModelCategory.SHOWER_ROOM,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.FRAME,rr.ParamModelCategory.PARAM_FURNITURE_PART,rr.ParamModelCategory.SANITARY_COMPONENT,rr.ParamModelCategory.DOOR_LEAF,rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SPECIAL_FRAME,rr.ParamModelCategory.EMBED_FRAME_W,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.SPACE_GROUP,rr.ParamModelCategory.POLE_W,rr.ParamModelCategory.SINGLE_SLIDING_DOOR,rr.ParamModelCategory.SLIDING_DOOR_BOARD,rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.RAIL,rr.ParamModelCategory.DOOR_LEAF]],[rr.ParamModelCategory.SLIDING_DOOR_C,[rr.ParamModelCategory.RAIL,rr.ParamModelCategory.SINGLE_SLIDING_DOOR]],[rr.ParamModelCategory.SPACE_GROUP,[rr.ParamModelCategory.DRAWER,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.PARAM_FURNITURE,rr.ParamModelCategory.FASCIA_BOARD,rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,rr.ParamModelCategory.BOARD,rr.ParamModelCategory.SPECIAL_BOARD,rr.ParamModelCategory.SPACE_GROUP]],[rr.ParamModelCategory.SINGLE_SLIDING_DOOR,[rr.ParamModelCategory.SLIDING_DOOR_CORE,rr.ParamModelCategory.DOOR_WAIST_LINE]],[rr.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[rr.ParamModelCategory.SWING_DOOR]],[rr.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.SWING_DOOR,[rr.ParamModelCategory.DOOR_CORE,rr.ParamModelCategory.DOOR_WAIST_LINE,rr.ParamModelCategory.DECORATIVE_MOLDING,rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.DRAWER,[rr.ParamModelCategory.DRAWER_PANEL,rr.ParamModelCategory.SWING_DOOR,rr.ParamModelCategory.BOARD]],[rr.ParamModelCategory.PARAM_FURNITURE,[rr.ParamModelCategory.FURNITURE_LEG]],[rr.ParamModelCategory.KADA,[rr.ParamModelCategory.BYOBU,rr.ParamModelCategory.BYOBU_FRAME,rr.ParamModelCategory.BYOBU_PANEL]]]);function kp(e){return function(e){if(Array.isArray(e))return Np(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 Np(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 Np(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 Np(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 Gp(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 Up=function(){function e(){!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=u.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new Tp,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=(Lp.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,o=this,i=[],A=t;A&&A!==e;)i.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 i.find((function(e){return o.isAccessory(e)}))||t}},{key:"findParamModelById",value:function(e){return $t(kh().getStateManager().core.design.getCustom().getParamModels(),e)}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Rp(e,{origin:ap.SENSE},void 0,Rp(t,{origin:ap.SENSE})):Rp(e,{origin:ap.SENSE})}},{key:"findAssemblyById",value:function(e){return kh().getStateManager().core.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e}))}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(e.isAppendHardware)return e;var o,i,A=e.isRoot()?e:e.getRoot(),a=A.getAssembly(),s=!1,u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity;if(u&&((o=this.findParamModelById(u.entityId))?i=(i=o.isRoot()?o:o.getRoot()).getAssembly()||i:(s=!0,i=o=this.findAssemblyById(u.entityId))),!i||i!==A&&i!==a){if(t===c.CLICK)return a||A;if(t===c.DB_CLICK)return a?A:this.getAccessoryAtFirstLevel(A,e)}else{for(var l=!1,g=e;g;){if(g===o){l=!0;break}g=(null===(r=g.getParent)||void 0===r?void 0:r.call(g))||(null===(n=g.getAssembly)||void 0===n?void 0:n.call(g))}if(t===c.CLICK)return l?o:i instanceof b.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===A?this.getAccessoryAtFirstLevel(A,e):A:this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK)return l?s?A:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(A,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n,o,i;if(e.isAppendHardware)return e;var A=e.isRoot()?e:e.getRoot(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=a&&this.findParamModelById(null==a?void 0:a.entityId);if(((null===(r=null==s?void 0:s.isRoot)||void 0===r?void 0:r.call(s))?s:null===(n=null==s?void 0:s.getRoot)||void 0===n?void 0:n.call(s))===A){for(var u=!1,l=e;l;){if(l===s){u=!0;break}l=(null===(o=l.getParent)||void 0===o?void 0:o.call(l))||(null===(i=l.getAssembly)||void 0===i?void 0:i.call(l))}if(t===c.CLICK)return u?s:this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(s,e);var g=this.getAccessoryAtFirstLevel(A,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===c.CLICK)return this.getAccessoryAtFirstLevel(A,e);if(t===c.DB_CLICK){var f=this.getAccessoryAtFirstLevel(A,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r,n,o,i=e.isRoot()?e:e.getRoot(),A=i.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity;if(a&&(o=(n=this.findParamModelById(a.entityId))?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n=this.findAssemblyById(a.entityId)),n&&(o===i||o===A)){for(var s=!1,c=e;c;){if(c===n){s=!0;break}c=(null===(t=c.getParent)||void 0===t?void 0:t.call(c))||(null===(r=c.getAssembly)||void 0===r?void 0:r.call(c))}return s?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof b.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,e):this.designMode===u.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,e)}return this.designMode===u.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,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===u.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(he.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){return{entityId:e.id,entityType:e.type===l.PARAM_MODEL?Na:yc}}},{key:"customModeSelectModel",value:function(e,t){var r,n=this.getParamModelLite(e),o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(he.castArray)(o).filter((function(e){return!!e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this.getParamModelLite(e),n=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,r);return Object(he.castArray)(n).filter((function(e){return!!e})).map(this.genEntityDescriptor)}},{key:"getEntityDescriptor",value:function(e){return{entityId:e.getId(),entityType:e instanceof b.CoreParamModelAssembly?yc:Na}}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==u.CUSTOM){switch(this.designMode){case u.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case u.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case u.PRODUCT:r=e}if(!r)return;var n=this.getEntityDescriptor(r),o=Object(he.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&o.push.apply(o,kp(this.prevModeSelectEntity));var i=o[0]&&(this.findParamModelById(o[0].entityId)||this.findAssemblyById(o[0].entityId));if(i&&i.isAppendHardware!==r.isAppendHardware)return n;var A=o.filter((function(e){return e.entityId!==n.entityId}));return A.length!==o.length?A:A?[].concat(kp(A),[n]):[n]}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case u.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case u.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case u.PRODUCT:r=e;break;case u.CUSTOM:return this.customModeSelectModel(e,t)}return{entityId:(r||e).getId(),entityType:r instanceof b.CoreParamModelAssembly?yc:Na}}}},{key:"getHintEntity",value:function(e){var t;if(e.isAppendHardware)t=e;else switch(this.designMode){case u.TOP_MODEL:case u.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case u.PRODUCT:t=e;break;case u.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(he.castArray)(this.curSelectEntity)||[];if(!([].concat(kp(r),kp(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return this.getEntityDescriptor(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)}}])&&Gp(t.prototype,r),n&&Gp(t,n),e}();function jp(e){return(jp="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 Yp(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 Hp(e,t){return(Hp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kp(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 o=qp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jp(this,r)}}function Jp(e,t){return!t||"object"!==jp(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 Wp=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&&Hp(e,t)}(i,e);var t,r,n,o=Kp(i);function i(){return Yp(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"pickRayTarget",value:function(e){var t,r=e.event,n=e.sceneId,o=this.context.pick(n,r),i=(null===(t=null==o?void 0:o.entity)||void 0===t?void 0:t.entityId)||"";if(i)return this.findParamModelByEntityId(i)}},{key:"selection",get:function(){return kh().getStateManager().kaf.selection}},{key:"hint",get:function(){return kh().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return kh().designModeContext}},{key:"findParamModelByEntityId",value:function(e){var t;return null===(t=kh().getStateManager().core.pad.findModel(e))||void 0===t?void 0:t.$model}},{key:"findParamModelAssemblyByEntityId",value:function(e){return kh().getStateManager().core.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e}))}}])&&Vp(t.prototype,r),n&&Vp(t,n),i}(So.ToolModule.Feature);function zp(e){return(zp="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 Xp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zp(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 $p(e,t){return($p=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=rh(e);if(t){var o=rh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return th(this,r)}}function th(e,t){return!t||"object"!==zp(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)}var nh=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&&$p(e,t)}(i,e);var t,r,n,o=eh(i);function i(){var e;return Xp(this,i),(e=o.apply(this,arguments)).isMouseDown=!1,e}return t=i,(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.pickRayTarget(e);if(t){var r=this.designModeCtx.getHintEntity(t);this.designModeCtx.getDesignMode(),u.CUSTOM,this.hint.hint(r)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Zp(t.prototype,r),n&&Zp(t,n),i}(Wp);function oh(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 ih(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 ih(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function ih(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 Ah(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 ah(e,t){return(ah=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sh(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=ch(e);if(t){var o=ch(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uh(this,r)}}function uh(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 ch(e){return(ch=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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)}var gh,fh=function(e,t,r,n){var o,i=arguments.length,A=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(A=(i<3?o(A):i>3?o(t,r,A):o(t,r))||A);return i>3&&A&&Object.defineProperty(t,r,A),A},ph=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hh=So.__INTERNAL__.Highlighters.WireGeometry,dh=So.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,Ih=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&&ah(e,t)}(i,e);var t,r,n,o=sh(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).models=e,t}return t=i,(r=[{key:"getGeometry",value:function(){var e,t=new hh,r=oh(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.append(dh(n.getConcatenatedBox3()))}}catch(e){r.e(e)}finally{r.f()}return t}}])&&Ah(t.prototype,r),n&&Ah(t,n),i}(So.Entity),yh=Ih=fh([Object(So.provideEntityAPIs)([new So.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),ph("design:paramtypes",["function"==typeof(gh="undefined"!=typeof Array&&Array)?gh:Object])],Ih);function Ch(e){return(Ch="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 Eh(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 Bh(e,t){return(Bh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vh(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=Qh(e);if(t){var o=Qh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mh(this,r)}}function mh(e,t){return!t||"object"!==Ch(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 Qh(e){return(Qh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bh=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&&Bh(e,t)}(i,e);var t,r,n,o=vh(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(t){return e.findParamModelByEntityId(t.entityId)||e.findParamModelAssemblyByEntityId(t.entityId)}));return new yh(r)}};return(e=o.call(this)).selection.addMultiSelectionConfig(t),e}return t=i,(r=[{key:"onClick",value:function(e){this.triggerClick(e,c.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,c.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.pickRayTarget(e);if(r){var n=this.designModeCtx.getSelectEntity(r,t);this.designModeCtx.getDesignMode()===u.CUSTOM?n&&this.selection.select(n):(this.selection.select(n),this.designModeCtx.setCurSelectEntity(n))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&Eh(t.prototype,r),n&&Eh(t,n),i}(Wp);function _h(e){return(_h="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 wh(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 Sh(e,t,r){return(Sh="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=xh(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function Dh(e,t){return(Dh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rh(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=xh(e);if(t){var o=xh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mh(this,r)}}function Mh(e,t){return!t||"object"!==_h(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 xh(e){return(xh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ph,Fh,Oh,Th=new po.SingletonRef,Lh=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&&Dh(e,t)}(i,e);var t,r,n,o=Rh(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:Hg,axrs:GC,singleton:Th},e)).stateManager=t,r.viewer=new tg,r.designModeContext=new Up,r}return t=i,(r=[{key:"init",value:function(){Sh(xh(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),og(e);var t=this.getDependentPlugin(So.AppServicePlugin),r=this.getDependentPlugin(pu);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){Sh(xh(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new TA),this.client=new rA(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core.design,n=this.getDependentPlugin(So.AppServicePlugin);this.viewer.config(n,{getCustom:function(){return r.getCustom()},getDoc:function(){return r.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e){for(var t=$t(r.getCustom().getParamModels(),e.entityId);t&&![rr.ParamModelType.PARAM_ENTITY,rr.ParamModelType.PARAM_FURNITURE].includes(t.getType());)t=t.getParent();return t?{entityId:t.id,entityType:Na}:e},paramModelSymbol:Na}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),n.registerEntityDocument(new np((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new bh})),t.kaf.toolbox.addIdleToolFeature((function(){return new nh})),n.setLayout(Cg)}}])&&wh(t.prototype,r),n&&wh(t,n),i}(po.PluginApplication),kh=Th.instance,Nh=r(89),Gh=r(423);function Uh(e){Oh=e}function jh(e){return(jh="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 Yh(e){return function(e){if(Array.isArray(e))return Vh(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 Vh(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 Vh(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 Vh(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){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Kh(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Jh(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Kh(i,n,o,A,a,"next",e)}function a(e){Kh(i,n,o,A,a,"throw",e)}A(void 0)}))}}function qh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wh(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 zh(e,t){return(zh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xh(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=$h(e);if(t){var o=$h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zh(this,r)}}function Zh(e,t){return!t||"object"!==jh(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 $h(e){return($h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var 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&&zh(e,t)}(i,e);var t,r,n,o=Xh(i);function i(){var e;return qh(this,i),(e=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Jh(f.a.mark((function t(){var r,n;return f.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=mu(Lu.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=Jh(f.a.mark((function t(r){var n,o,i;return f.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(o=Object(he.castArray)(r),i=Object(he.difference)(o,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=o,!i.length&&n){t.next=12;break}return t.next=9,qu(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=Jh(f.a.mark((function t(r){var n,o,i,A,a,s,u,c,l,g,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(he.uniq)(Object(he.flatten)(Object(he.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 o=e.getStateManager(),t.next=7,Promise.allSettled(Object(he.map)(n,function(){var e=Jh(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ac(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 7:return i=t.sent,t.next=10,ac(n);case 10:for(p in A=t.sent,a=Object(he.mapValues)(Object(he.keyBy)(Object(he.filter)(i,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),s=o.core.design.getCustom(),u=s.getParamModels(),c=[],l={},g=function(e){var t=r.hardware[e],n=$t(u,e);if(n){var o=n.getConcatenatedMatrix(),i=n.getSize(),s=(new E.a).makeTranslation(new Q.a(-i.x/2,i.y/2,-i.z/2)),g=o.clone().multiply(s),f=Object(he.map)(t,(function(e){var t=a[e.brandGoodId],r=A[e.brandGoodId]||{x:0,y:0,z:0};if(t){var o=t.paramModelData,i=Hh(t,["paramModelData"]),s=e.rotate,u=(new ie).parse(o);Object(Nh.attach)(u,Object(Nh.toAttachedMap)(i)),u.setIsAppendHardware(!0),u.setLinkedIds(e.linkedIds),u.setHardwareData(e),u.linkParamModelId=n.id;var c=g.clone().multiply((new E.a).compose(new Q.a(e.position),new y.a(s.x,s.y,s.z),new Q.a(e.scale)).multiply((new E.a).setPosition(new Q.a(r)))),f=or.a.decompose(c),p=f.rotation,h=f.position,d=f.scale,I=new Q.a(h);return u.setPosition({x:I.x,y:I.y,z:I.z}),u.setRotation({x:p.x,y:p.y,z:p.z}),u.setScale(d),u.assignUniqueId(),l[e.id]=u.id,u}})).filter((function(e){return!!e}));c.push.apply(c,Yh(f))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)g(p);if(!c.length){t.next=23;break}return t.next=21,Ph.updateAttacheds(c);case 21:s.addParamModels.apply(s,c),e.state.casbinModelIdMap=l;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Wh(t.prototype,r),n&&Wh(t,n),i}(po.AXR),td=r(205);function rd(e){return(rd="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 nd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function od(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 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 o=sd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ad(this,r)}}function ad(e,t){return!t||"object"!==rd(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,cd=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)}(i,e);var t,r,n,o=Ad(i);function i(){var e;return nd(this,i),(e=o.apply(this,arguments)).paramModelConstructor=ie,e}return t=i,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new fe).parse(e,void 0,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&od(t.prototype,r),n&&od(t,n),i}(r.n(td).a),ld=r(90),gd=[];function fd(e){return(fd="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){return function(e){if(Array.isArray(e))return hd(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 hd(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 hd(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 hd(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 dd(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Id(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){dd(i,n,o,A,a,"next",e)}function a(e){dd(i,n,o,A,a,"throw",e)}A(void 0)}))}}function yd(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ed(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 Bd(e,t){return(Bd=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=Qd(e);if(t){var o=Qd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return md(this,r)}}function md(e,t){return!t||"object"!==fd(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)}!function(e){e.design="design",e.series="series"}(ud||(ud={}));var bd=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&&Bd(e,t)}(i,e);var t,r,n,o=vd(i);function i(){var e;return Cd(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({main:Uu.READY,design:Uu.READY,series:Uu.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,o=n.paramModelData,i=yd(n,["paramModelData"]),A=(new ie).parse(o),Object(Nh.attach)(A,Object(Nh.toAttachedMap)(i)),e.next=9,Ph.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(gd),e.next=13,Object(ld.put)(this.$actionLoad.done.message({params:t,result:Uu.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(f.a.mark((function e(t,r){var n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.core.design.setCustom(t),n=t.getParamModels(),o=t.getParamModelAssemblies(),e.next=5,Promise.all(n.map(function(){var e=Id(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Nh.attach)(t,Object(Nh.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return i=n.filter((function(e){return!e.getAssembly()})),e.next=8,Ph.updateAttacheds([].concat(pd(i),pd(o)));case 8:return e.next=10,Object(ld.put)(this.$actionAddModelToSense.done.message({params:t,result:Uu.SUCCESS}));case 10: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(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.map((function(e){var t=e.paramModelData,r=yd(e,["paramModelData"]),n=(new ie).parse(t,new cd);return Object(Nh.attach)(n,Object(Nh.toAttachedMap)(r)),n})),e.next=3,Ph.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,pd(o)),e.next=6,Object(ld.put)(this.$actionAddParamModelToSense.done.message({params:t,result:Uu.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(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),o=new cd,i=t.map((function(e){return(new fe).parse(e,o)})),A=o.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Id(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Nh.attach)(t,Object(Nh.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Ph.updateAttacheds(pd(i));case 8:return n.addParamModelAssemblies.apply(n,pd(i)),n.addParamModels.apply(n,pd(A)),e.next=12,Object(ld.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:Uu.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=i,(r=[{key:"module",value:function(){return"entry"}}])&&Ed(t.prototype,r),n&&Ed(t,n),i}(po.AXR);function _d(e){return(_d="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 wd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sd(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&&Dd(e,t)}function Dd(e,t){return(Dd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rd(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=xd(e);if(t){var o=xd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Md(this,r)}}function Md(e,t){return!t||"object"!==_d(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 xd(e){return(xd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}po.AXR;var Pd=function(e){Sd(r,e);var t=Rd(r);function r(){return wd(this,r),t.apply(this,arguments)}return r}(po.AXRPartial),Fd=(po.AXRManager,Math.sqrt(2)),Od=Math.PI/6,Td=Math.PI/3+Math.PI;function Ld(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Td,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Od,n=e.getPosition(),o=e.getSize(),i=n.clone(),A=o.length()*Fd,a=new Q.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:i,position:a}}var kd=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 Nd(e){var t,r,n,o=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(i,A){t=o(i),r=o(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 Gd(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?Gd(Object(r),!0).forEach((function(t){jd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yd(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}var Vd=function(){var e,t=(e=f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=UC(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return o=e.sent,i=o.designId,A=o.levelid,a={modelid:null!=t?t:"",designid:i,levelid:A,toolType:0},s=n.getStateManager().core.design.getCustom(),t||((u=s.getParamModelAssemblies()).length?a.modelid=u[0].id:(c=s.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=c[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return l=e.sent,g=l.toolType,a.toolType=g,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Yd(i,n,o,A,a,"next",e)}function a(e){Yd(i,n,o,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Hd(e){return function(e){if(Array.isArray(e))return Kd(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 Kd(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 Kd(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 Kd(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 Jd(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new cd;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),o=(t=Hd(r.getParamModels())).concat.apply(t,Hd(n.map((function(e){return e.getParamModels()}))));return o=o.filter((function(e){return!e.isAccessory()})),p.ParamModelUtils.collectAccessories(o).forEach((function(e){e.toLocalMatrix()})),{paramModels:o,paramModelAssemblies:n}}function qd(e){return(qd="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 Wd(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function zd(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Wd(i,n,o,A,a,"next",e)}function a(e){Wd(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zd(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 eI(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 o=rI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tI(this,r)}}function tI(e,t){return!t||"object"!==qd(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)}function nI(e){return function(e){if(Array.isArray(e))return oI(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 oI(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 oI(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 oI(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 iI(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?iI(e.subModels):[]})).flat();return t.push.apply(t,nI(e)),t}var AI=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)}(l,e);var t,r,n,o,i,A,a,s,u,c=eI(l);function l(){var e;return Xd(this,l),(e=c.apply(this,arguments)).state=e.stateCreator.create({loading:Gu.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(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l,g,p,h,d,I,y,C;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.modelId,o=t.defer,i=t.hasFitting,A=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,p=c.currTemplateId,n){e.next=4;break}throw new Error("not selected model!");case 4:if(h=n===l,d=p===u,I=this.$actionLoadParamModelJsonData,e.prev=7,y=h&&!s&&d?g:void 0,!A||y){e.next=13;break}return e.next=12,Wu(n,u);case 12:y=e.sent;case 13:if(y){e.next=18;break}return wu.delete(n),e.next=17,zu(n,u);case 17:y=e.sent;case 18:if(y){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return C=h&&!u?iI(y.paramModel):this.state.state.allSubModels,h&&UC().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,I.done.dispatch({params:t,result:{ossContent:y,allSubModels:C}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,I.failed.dispatch({params:t});case 30:o&&o.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e,t){var r=e.params.defer;r&&r.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=Gu.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,o=r.allSubModels,i=t.params.templateId;e.loading=Gu.SUCCESS,e.result=n,e.allSubModels=o,e.currTemplateId=i})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=Gu.FAIL}))})),e}return t=l,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(u=zd(f.a.mark((function e(t){var r,n,o,i,A,a=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(he.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),this.resetView(),(n=UC().scene).cameraController.$actionInit.dispatch(),function(){var e=zd(f.a.mark((function e(){var t,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Nd(),a.getAxr(xy).fittingDesignSense.$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,a.$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=10,this.getAxr(ed).getCurrentCustomData(r);case 10:return o=e.sent,i=Jd(o),(A=new x).addParamModels.apply(A,nI(i.paramModels)),A.addParamModelAssemblies.apply(A,nI(i.paramModelAssemblies)),e.next=17,this.getAxr(bd).$actionAddModelToSense.started.dispatchResolve(A);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"refreshCustomModelData",value:(s=zd(f.a.mark((function e(){var t,r,n,o,i,A;return f.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(),0!==r.length||0!==n.length){e.next=5;break}throw new Error("No custom model in the scene!");case 5:return e.next=7,qu(this.state.state.currModelId);case 7:return o=e.sent,i=Jd(o),r.forEach((function(e){t.removeParamModel(e)})),n.forEach((function(e){t.removeParamModelAssembly(e)})),e.next=13,Promise.all(i.paramModels.map(function(){var e=zd(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Nh.attach)(t,Object(Nh.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 13:return A=i.paramModels.filter((function(e){return!e.getAssembly()})),e.next=16,Ph.updateAttacheds([].concat(nI(A),nI(i.paramModelAssemblies)));case 16:t.addParamModels.apply(t,nI(i.paramModels)),t.addParamModelAssemblies.apply(t,nI(i.paramModelAssemblies));case 18:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=zd(f.a.mark((function e(){var t,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=mu(Lu.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(he.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=zd(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c,l,g,p;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,o=(n=t||{}).timeout,i=void 0===o?5e4:o,A=n.modelId,a=void 0===A?r.currModelId:A,s=n.force,u=void 0!==s&&s,c=n.templateId,u){e.next=14;break}return g=Nd(),this.getAxr(xy).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:g,params:{modelid:a}}),e.prev=5,e.next=8,g.promise;case 8:l=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return p=Nd(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:a,hasFitting:!!l,force:u,templateId:c}),e.abrupt("return",p.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"getTopModelList",value:(i=zd(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=mu(uo),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 i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=zd(f.a.mark((function e(t){var r,n,o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(he.castArray)(t),n=mu(Lu.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[i]).then((function(e){o.push(e)}));case 7:--i,e.next=4;break;case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)}))),function(e){return o.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.setGrooveFittings([]),e.fittingDesign.setFittings([]),e.fittingDesign.setPlankFaceHintModels([])}}])&&Zd(t.prototype,r),n&&Zd(t,n),l}(po.AXR);function aI(e){return(aI="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 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){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)||function(e,t){if(!e)return;if("string"==typeof e)return gI(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 gI(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 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 fI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function pI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){fI(i,n,o,A,a,"next",e)}function a(e){fI(i,n,o,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 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 II(e,t){return(II=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yI(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=EI(e);if(t){var o=EI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return CI(this,r)}}function CI(e,t){return!t||"object"!==aI(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 EI(e){return(EI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var BI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},vI=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&&II(e,t)}(A,e);var t,r,o,i=yI(A);function A(){var e;return hI(this,A),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:Gu.FAIL,design:Object(he.cloneDeep)(BI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(he.cloneDeep)(BI))},e.getConnectedFittingDesign=function(){var t=pI(f.a.mark((function t(r){var n,o,i,A,a,s,u,c,l,g,p=arguments;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.length>1&&void 0!==p[1]&&p[1],o=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(he.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=o.hardwares||{},t.t0=f.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(u=t.t1.value,!A.hasOwnProperty(u)){t.next=16;break}if(!(c=Object(he.find)(A[u]||[],(function(e){return e.id===r})))){t.next=16;break}return s=u,a=c,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&s){t.next=20;break}throw new Error("当前五金不存在!");case 20:l=a.linkedIds,g=function(e){return l.includes(e.id)},i.holes[s]=Object(he.filter)(o.holes[s],g),i.grooves[s]=Object(he.filter)(o.grooves[s],g),t.next=27;break;case 26:Object(he.keys)(i).forEach((function(e){o[e]&&o[e][r]&&(i[e][r]=Object(he.cloneDeep)(o[e][r]))}));case 27:return t.abrupt("return",i);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,o=r.fittingDesign,i=r.design,A=t.holes,a=void 0===A?{}:A,s=t.grooves,u=void 0===s?{}:s,c=t.hardwareGrooves,l=void 0===c?{}:c,g=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),f=g.holeColor,h=g.grooveColor,d=p.ParamModelUtils.flattenModels(i.getCustom().getParamModels()),I={findRelativeModel:function(e){return $t(d,e)},transformModel:Wt};o.addFittings([].concat(lI(jr(a,uI(uI({},I),{},{type:n.HOLE,color:f}))),lI(jr(u,uI(uI({},I),{},{type:n.GROOVE,color:h}))))),o.addGrooveFittings(jr(l,uI(uI({},I),{},{type:n.HARDWARE_GROOVE,color:h,transformModel:Nr})))},e.appendFittingDataToFittingDesign=function(){var t=pI(f.a.mark((function t(r,n){var o,i,A,a,s,u,c,l,g,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.state.state,A=i.design,a=i.autoSave,s=!r.id||r.id===A.id,u=BI,c=n.timeout,l=n.save,g=void 0===l?a:l,p={id:null!==(o=r.id)&&void 0!==o?o:A.id,holes:uI(uI({},s?A.holes:u.holes),r.holes||{}),grooves:uI(uI({},s?A.grooves:u.grooves),r.grooves||{}),hardwares:uI(uI({},s?A.hardwares:u.hardwares),r.hardwares||{}),hardwareGrooves:uI(uI({},s?A.hardwareGrooves:u.hardwareGrooves),r.hardwareGrooves||{})},Object(he.pull)(Object(he.keys)(p),"id").forEach((function(e){var t=p[e];Object(he.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!g){t.next=12;break}return h=Nd(c),e.$actionSaveFittingDesign.started.dispatch({defer:h,design:p}),t.abrupt("return",h.promise);case 12:e.$actionRestoreFittingDesign.dispatch(p),e.fittingAddDataToFittingDesignSense(p);case 14: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(f.a.mark((function e(t,r){var n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,o=t.params,e.next=4,Vd(o.modelid);case 4:return i=e.sent,e.prev=5,e.next=8,Du(uI(uI({},o),i));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:i.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,o=this.fittingAddDataToFittingDesignSense,i=e.result.designData?e.result.designData:Object(he.cloneDeep)(BI),A=this.getAxr(AI).state.state.currModelId;e.result.modelId===A&&(t.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),t.core.fittingDesign.setGrooveFittings([]),r.dispatch(i),o(i),t.core.design.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),this.getAxr(ed).loadFittingHardwareToSense({hardware:i.hardwares}));var a=e.params.defer;a&&a.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,o=this.getAxr(AI).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===o&&(t.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),t.core.fittingDesign.setGrooveFittings([]),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(f.a.mark((function e(t,r){var o,i,A,a,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getAxr(AI).state.state.currModelId,i=t.modelId,A=void 0===i?o:i,e.next=4,Vd(A);case 4:return a=e.sent,A===o&&r.core.fittingDesign.removeFittings({types:[n.HOLE,n.GROOVE]}),s=this.$actionClearFittingDesign,e.prev=7,e.next=10,Fu(a);case 10:s.done.dispatch({params:t,result:void 0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),s.failed.dispatch({params:t});case 16:case"end":return e.stop()}}),e,this,[[7,13]])}))),e.done.every(f.a.mark((function e(t,r){var o,i,A,a,s,u;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.core,A=i.fittingDesign,a=i.design,s=this.getAxr(AI).state.state.currModelId,(null!==(o=t.params.modelId)&&void 0!==o?o:s)===s&&(this.initFittingDesign(),A.removeFittings({types:[n.HOLE,n.GROOVE]}),A.setGrooveFittings([]),a.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()}))),(u=t.params.defer)&&u.resolve();case 6:case"end":return e.stop()}}),e,this)}))),e.failed.every(f.a.mark((function e(t,r){var n;return f.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(t){t.started.every(f.a.mark((function e(t){var r,n,o,i;return f.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,Vd(n.id);case 3:return o=e.sent,i=this.$actionSaveFittingDesign,e.prev=5,e.next=8,Pu(uI(uI({},n),{},{id:o.modelid}),o);case 8:i.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),i.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),t.failed.every(f.a.mark((function e(t,r){var n;return f.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)}))),t.done.every(f.a.mark((function e(t,r){var o,i,A,a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=t.params.design,i=this.getAxr(AI).state.state.currModelId,!o||o.id&&o.id!==i||((A=r.core.fittingDesign).removeFittings({types:[n.HOLE,n.GROOVE]}),A.setGrooveFittings([]),this.fittingAddDataToFittingDesignSense(o),r.core.design.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),this.getAxr(ed).loadFittingHardwareToSense({hardware:o.hardwares})),(a=t.params.defer)&&setTimeout((function(){a.resolve()}));case 5:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){var r=t.params.design,n=UC().viewParamModel.state.state.currModelId;!r||r.id&&r.id!==n||(e.design=r)}))})),e}return t=A,(r=[{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&dI(t.prototype,r),o&&dI(t,o),A}(Pd);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)}}var QI=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,o=e.field;t===r||n.some((function(e){return e.field===o}))||n.push({field:o})}}])&&mI(t.prototype,r),n&&mI(t,n),e}();function bI(e){return(bI="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 _I(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=SI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function wI(e){return function(e){if(Array.isArray(e))return DI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||SI(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 SI(e,t){if(e){if("string"==typeof e)return DI(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)?DI(e,t):void 0}}function DI(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 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){return(xI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PI(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 o=OI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FI(this,r)}}function FI(e,t){return!t||"object"!==bI(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 TI=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&&xI(e,t)}(A,e);var t,r,o,i=PI(A);function A(){return RI(this,A),i.apply(this,arguments)}return t=A,(r=[{key:"getAllFittingModels",value:function(e){var t=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),r=this.stateManager.core.fittingDesign.getFittings(),o=this.stateManager.core.fittingDesign.getGrooveFittings();return[].concat(wI(t),wI(r),wI(o)).filter((function(t){return!e||t.linkParamModelId===e})).map((function(e){return function(e){var t,r=new QI;if(r.id=e.id,e instanceof ie){if(!e.isAppendHardware)return;t=n.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}(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=_I(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.isAppendHardware&&r.push(o),r.push.apply(r,wI(this.findHardwareParamModels(o.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],o=[],i=_I(e);try{for(i.s();!(t=i.n()).done;){var A=t.value;A.modelType===n.HARDWARE?r.push(A):o.push(A)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(o)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.design.getCustom().getParamModels();e.forEach((function(e){var r=$t(t,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=[]}})),kh().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings();e.forEach((function(e){var o;if(e.modelType===n.HARDWARE_GROOVE?o=r.find((function(t){return t.id===e.id})):e.modelType!==n.HOLE&&e.modelType!==n.GROOVE||(o=t.find((function(t){return t.id===e.id}))),o){var i=e.__changeMap.update;(void 0===i?[]:i).forEach((function(t){"isHidden"===t.field&&(null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&MI(t.prototype,r),o&&MI(t,o),A}(Pd);function LI(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?LI(Object(r),!0).forEach((function(t){NI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function NI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function UI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){GI(i,n,o,A,a,"next",e)}function a(e){GI(i,n,o,A,a,"throw",e)}A(void 0)}))}}var jI=function(){var e=UI(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=PA(),e.next=3,n.post("/cos/api/c/task/intersected",{modelIds:t},{params:kI(kI({},r),{},{compress:1})});case 3:return o=e.sent,e.abrupt("return",o.data);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),YI=function(){var e=UI(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),e.next=3,r.gzipGet("/cos/api/task/intersected",{params:{taskId:t}});case 3:return n=e.sent,e.abrupt("return",n.data.d);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),VI=function(){var e=UI(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),e.next=3,r.gzipGet("/cos/api/task/intersected/data",{params:{taskid: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)}}();function HI(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function KI(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){HI(i,n,o,A,a,"next",e)}function a(e){HI(i,n,o,A,a,"throw",e)}A(void 0)}))}}function JI(e,t){return qI.apply(this,arguments)}function qI(){return(qI=KI(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l,g,p,h,d=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>2&&void 0!==d[2]?d[2]:{},o=n.times,i=void 0===o?50:o,A=n.delay,a=void 0===A?1e3:A,s=n.firstDelay,u=n.errorFilter,c=void 0===u?he.noop:u,e.next=4,t();case 4:return l=e.sent,e.next=7,kd(null!=s?s:a);case 7:g=0;case 8:return g++,p=void 0,h=void 0,e.prev=12,e.next=15,r(l);case 15:h=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),p=e.t0;case 21:if(!p){e.next=25;break}if(!1!==c(p,g)){e.next=25;break}throw new Error("break loop because user cancel!");case 25:if(![Mu.CANCEL,Mu.TIMEOUT,Mu.FAIL,Mu.UNKNOWN].includes(h.status)){e.next=29;break}throw new Error("task status: ".concat(h.status));case 29:if(h.status!==Mu.SUCCESS){e.next=31;break}return e.abrupt("return",h.result);case 31:if(!(g>=i)){e.next=33;break}throw new Error("maximum limit is exceeded!");case 33:return e.next=35,kd(a);case 35:e.next=8;break;case 37:case"end":return e.stop()}}),e,null,[[12,18]])})))).apply(this,arguments)}function WI(e){return(WI="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 XI(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){ZI(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 ZI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $I(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function ey(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){$I(i,n,o,A,a,"next",e)}function a(e){$I(i,n,o,A,a,"throw",e)}A(void 0)}))}}function ty(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(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 ny(e,t){return(ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oy(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=Ay(e);if(t){var o=Ay(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return iy(this,r)}}function iy(e,t){return!t||"object"!==WI(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 Ay(e){return(Ay=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ay=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&&ny(e,t)}(s,e);var t,r,n,A,a=oy(s);function s(){var e;return ty(this,s),(e=a.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:Gu.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(f.a.mark((function e(t,r){var n,o,i,A,a,s,u,c,l,g,p;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vd(null===(n=t.models)||void 0===n?void 0:n[0]);case 2:return o=e.sent,i=t.models,A=void 0===i?[o.modelid]:i,a=t.defer,s=this.$actionLoadParamModelIntersectedData,e.prev=5,e.next=8,JI(ey(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jI(A,Object(he.omit)(o,"modelid"));case 2:return t=e.sent,e.abrupt("return",t.d);case 4:case"end":return e.stop()}}),e)}))),function(){var e=ey(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,YI(t);case 2:return r=e.sent,e.abrupt("return",{status:r.status,result:{taskId:t,url:r.address}});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{firstDelay:500});case 8:return u=e.sent,c=UC().viewParamModel.state.state.currModelId===o.modelid,g=u.taskId,p=u.url,e.prev=11,e.next=14,VI(g);case 14:l=e.sent,e.next=27;break;case 17:if(e.prev=17,e.t0=e.catch(11),!p){e.next=25;break}return e.next=22,Tu(p);case 22:e.t1=e.sent,e.next=26;break;case 25:e.t1=void 0;case 26:l=e.t1;case 27:if(!c){e.next=30;break}return e.next=30,s.done.dispatch({params:t,result:{result:l,modelId:o.modelid}});case 30:a&&a.resolve(l),e.next=38;break;case 33:return e.prev=33,e.t2=e.catch(5),e.next=37,s.failed.dispatch({params:t});case 37:a&&a.reject(e.t2);case 38:case"end":return e.stop()}}),e,this,[[5,33],[11,17]])}))),t.done.every((function(t,r){var n=t.params.defer,o=UC().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===o&&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=Gu.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Gu.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Gu.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,A=n.design,a=n.fittingDesign,s=e.state.state.intersectedVisible,u=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),c=u.intersectedColor,l=u.intersectedBodyColor,g=u.grooveIntersectedColor,f=u.grooveIntersectedBodyColor;a.setIntersects([]);var h=t.option,d=void 0===h?{}:h,I=t.intersectedGroups,y=p.ParamModelUtils.flattenModels(A.getCustom().getParamModels()),C=Object(he.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],A=e.intersectType;if(void 0!==d.plankFaceIds&&!d.plankFaceIds.includes(r.plankFaceId))return!1;if($t(y,r.linkedParentModelId)){var a=_r(e,r,$t(y,r.linkedModelId)),s=A===i.BOTH_PLANK?n===o.FACE?c:l:n===o.FACE?g:f;return a.setViewColor(s),a}})).filter((function(e){return!!e}));a.setIntersects(C),s||r.kaf.invisibleManager.hide("scene3d",qg,C.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",qg,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",qg,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(XI(XI({},r),{},{option:t}))},e}return t=s,(r=[{key:"getParamModelIntersectedData",value:(A=ey(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=UC().viewParamModel.state.state.currModelId,o=(n=t||{}).timeout,i=void 0===o?5e4:o,A=n.modelId,a=void 0===A?r:A,s=Nd(i),this.$actionLoadParamModelIntersectedData.started.dispatch({models:[a],defer:s}),this._getParamModelIntersectedCallback.push(s),u=function(){var e=c._getParamModelIntersectedCallback.indexOf(s);c._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",s.promise.then((function(e){return u(),e})).catch((function(e){return u(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})}])&&ry(t.prototype,r),n&&ry(t,n),s}(Pd);function sy(e){return(sy="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 uy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cy(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 ly(e,t){return(ly=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=py(e);if(t){var o=py(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fy(this,r)}}function fy(e,t){return!t||"object"!==sy(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 py(e){return(py=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hy={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},dy=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&&ly(e,t)}(i,e);var t,r,n,o=gy(i);function i(){var e;return uy(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:hy}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(he.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=i,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(he.mapValues)(e,(function(e){return function(e,t){var r={};return Object(he.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,o=r.opacity;return Object(he.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:o,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:o}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(he.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.design,r=e.fittingDesign,n=t.getCustom(),o=this.state.state.option,i=n.getParamModels(),A=Object(he.map)(o,(function(e,t){var r=$t(i,t);if(r)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=Jt(e.plankFaceId,Q.a).mul(.1),r=Lf(e.plankFaceId,n).map((function(e){var r=new Q.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return Of(Of({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kt(r)}(e,r)})).filter((function(e){return!!e}));r.setPlankFaceHintModels(A)}}])&&cy(t.prototype,r),n&&cy(t,n),i}(Pd);function Iy(e){return(Iy="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 Cy(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 Ey(e,t){return(Ey=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function By(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 o=my(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vy(this,r)}}function vy(e,t){return!t||"object"!==Iy(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 Qy=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&&Ey(e,t)}(i,e);var t,r,n,o=By(i);function i(){var e;return yy(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object(he.extend)(e,t)}))})),e}return t=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&Cy(t.prototype,r),n&&Cy(t,n),i}(Pd);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 _y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wy(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 Sy(e,t){return(Sy=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 o=My(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(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 My(e){return(My=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=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)}(i,e);var t,r,n,o=Dy(i);function i(){var e;return _y(this,i),(e=o.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(vI),e.intersected=e.partialCreator.create(ay),e.senseSetting=e.partialCreator.create(Qy),e.fittingModel=e.partialCreator.create(TI),e.plankFaceHint=e.partialCreator.create(dy),e}return t=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&wy(t.prototype,r),n&&wy(t,n),i}(po.AXR);function Py(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 Fy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Py(Object(r),!0).forEach((function(t){Oy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oy(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,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function Ly(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Ty(i,n,o,A,a,"next",e)}function a(e){Ty(i,n,o,A,a,"throw",e)}A(void 0)}))}}Zu()(function(){var e=Ly(f.a.mark((function e(t){var r,n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=PA(),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)}}(),Fy({promise:!0},$u));function ky(){return(ky=Ly(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,PA().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,o=n.c,i=n.m,A=n.d,"0"!==o){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(o+i);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ny(){return(Ny=Ly(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,PA().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,o=n.c,i=n.m,A=n.d,"0"!==o){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(o+i);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Gy=Zu()((function(e){return ky.apply(this,arguments)}),Fy(Fy({},$u),{},{promise:!0})),Uy=Zu()((function(e){return Ny.apply(this,arguments)}),Fy(Fy({},$u),{},{promise:!0}));function jy(e){return function(e){if(Array.isArray(e))return Yy(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 Yy(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 Yy(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 Yy(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 Vy(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}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)}}var Ky=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,o,i;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:(o=f.a.mark((function e(t){var r,n,o,i,A,a,s=this,u=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>1&&void 0!==u[1]?u[1]:"__global__",n=Object(he.castArray)(t),o=[],i=[],A=new Map,n.forEach((function(e){var t=s.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?i.push(e):o.push(e)})),a=function(e){return[].concat(jy(e.hardwares||[]),jy(e.textures||[]),jy(e.virtualModels||[]),jy(e.paramModelProducts||[]),jy(e.moldings||[]))},!o.length){e.next=12;break}return e.next=10,Gy(o).then(a);case 10:e.sent.forEach((function(e){s.setProduct(e,r)}));case 12:if(!i.length){e.next=17;break}return e.next=15,Uy(i).then(a);case 15:e.sent.forEach((function(e){s.setProduct(e,r)}));case 17:return[].concat(o,i).forEach((function(e){var t=s.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){Vy(i,r,n,A,a,"next",e)}function a(e){Vy(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return i.apply(this,arguments)})}])&&Hy(t.prototype,r),n&&Hy(t,n),e}();function Jy(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function qy(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Jy(i,n,o,A,a,"next",e)}function a(e){Jy(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Wy(e){return function(e){if(Array.isArray(e))return zy(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 zy(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 zy(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 zy(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 Xy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(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 $y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ky;Xy(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,o;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 this.cached.set(e,t),t}},{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,Wy(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 ap.BRANDGOOD:case ap.CATEGORY:break;case ap.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var o,i=e._changeMap.originId||e.id,A=[t];o=A.pop();){if(o.id===i)return o;A.push.apply(A,Wy(o.getChildNodes()))}}},{key:"attach",value:(o=qy(f.a.mark((function e(){var t,r,n,o,i,A,a,s,u=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=t.pop())){e.next=18;break}A=(i=o)._changeMap,a=i._origin,e.t0=a,e.next=e.t0===ap.SENSE?8:e.t0===ap.CATEGORY||e.t0===ap.BRANDGOOD||e.t0===ap.TEMPLATE_ID?11:12;break;case 8:return s=A.originId||o.id,r.modelIds.push(s),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(o&&e.type===Zf.STORE&&o.hasParam(e.attr)){var t=o.getParam(e.attr);t&&[tp.MATERIAL,tp.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,Wy(o.getChild()).concat(Wy(o.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(Wy(Object(he.uniq)(r.modelIds).map(function(){var e=qy(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.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 o.apply(this,arguments)})}])&&Zy(t.prototype,r),n&&Zy(t,n),e}(),eC=r(713);function tC(e){return(tC="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 rC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nC(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 oC(e,t,r){return(oC="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=sC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function iC(e,t){return(iC=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 o=sC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aC(this,r)}}function aC(e,t){return!t||"object"!==tC(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)}var uC=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&&iC(e,t)}(i,e);var t,r,n,o=AC(i);function i(){var e;return rC(this,i),(e=o.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(bd),e.next=3,Object(ld.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==Uu.SUCCESS){e.next=13;break}return e.next=6,Object(ld.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(ld.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(ld.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(f.a.mark((function e(t,r){var n,o,i,A,a,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=o.length?Object(eC.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()):Object(eC.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()),s=Ld(a),A.updateInitCameraAttributes(s),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=i,(r=[{key:"init",value:function(){oC(sC(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&nC(t.prototype,r),n&&nC(t,n),i}(Pd);function cC(e){return(cC="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 lC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=fC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw i}}}}function gC(e){return function(e){if(Array.isArray(e))return pC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||fC(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 fC(e,t){if(e){if("string"==typeof e)return pC(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)?pC(e,t):void 0}}function pC(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 hC(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function dC(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){hC(i,n,o,A,a,"next",e)}function a(e){hC(i,n,o,A,a,"throw",e)}A(void 0)}))}}function IC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yC(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 CC(e,t,r){return(CC="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=mC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function EC(e,t){return(EC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BC(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=mC(e);if(t){var o=mC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vC(this,r)}}function vC(e,t){return!t||"object"!==cC(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 mC(e){return(mC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QC=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)}(s,e);var t,r,n,o,i,A,a=BC(s);function s(){var e;return IC(this,s),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(uC),e.state=e.stateCreator.create({renderMode:Cs.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(f.a.mark((function e(t,r){var n,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Cs.RenderMode.SHADING,o=!1,e.t0=t.mode,e.next=e.t0===Ju.SHADING?5:e.t0===Ju.OUTLINE_WITH_SHADING?7:e.t0===Ju.TRANSLUCENT?9:e.t0===Ju.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=Cs.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=Cs.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return o=!0,e.abrupt("break",14);case 11:return n=Cs.RenderMode.OUTLINE_WITH_SHADING,o=!0,e.abrupt("break",14);case 14:return e.next=16,Object(ld.put)(this.$actionMergeState.message({renderMode:n,translucent:o}));case 16:kh().viewer.toggleShowModelOutline(n===Cs.RenderMode.OUTLINE_WITH_SHADING),kh().viewer.triggerReducer(),this.emit(Hu.renderModeChange);case 19:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?Cs.RenderMode.OUTLINE_WITH_SHADING:Cs.RenderMode.SHADING,e.next=3,Object(ld.put)(this.$actionMergeState.message({renderMode:n}));case 3:kh().viewer.toggleShowModelOutline(n===Cs.RenderMode.OUTLINE_WITH_SHADING),this.emit(Hu.renderModeChange);case 5:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(f.a.mark((function e(t,r){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ld.put)(this.$actionMergeState.message({translucent:t}));case 2:kh().viewer.triggerReducer(),this.emit(Hu.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(f.a.mark((function e(t,r){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ld.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=s,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;CC(mC(s.prototype),"init",this).call(this),kh().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?Ku.translucentModel:Ku.opaqueModel})),kh().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:"findParamModelById",value:function(e){return $t(this.getAllParamModels(),e)}},{key:"getAllCustomModels",value:(A=dC(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Rp(e,{origin:ap.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(i=dC(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.findParamModelById(t))){e.next=3;break}return e.abrupt("return",Rp(r,{origin:ap.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=dC(f.a.mark((function e(t){var r,n,o,i,A,a,s,u,c=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,(n=new $y((function(e){return c.findParamModelById(e)}))).addParamModelLite.apply(n,gC(r)),e.next=5,n.attach();case 5:return e.next=7,Promise.all(r.map((function(e){return Mp(e,n)})));case 7:o=e.sent,i=[],A=[],a=lC(o);try{for(a.s();!(s=a.n()).done;)(u=s.value).create&&u.custom&&u.model&&i.push(u),!u.create&&u.model&&A.push(u.model)}catch(e){a.e(e)}finally{a.f()}(i.length||A.length)&&i.length&&i.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),kh().viewer.triggerReducer();case 14:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&yC(t.prototype,r),n&&yC(t,n),s}(po.AXR);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)}function _C(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 wC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_C(Object(r),!0).forEach((function(t){SC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function SC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DC(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return RC(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 RC(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 RC(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 MC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r){return(PC="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=LC(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function FC(e,t){return(FC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OC(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 o=LC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TC(this,r)}}function TC(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 LC(e){return(LC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kC={rawSelected:[],selectedData:[]},NC=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&&FC(e,t)}(i,e);var t,r,n,o=OC(i);function i(){var e;return MC(this,i),(e=o.apply(this,arguments)).state=e.stateCreator.create(kC).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(he.unzip)([t,r]).every((function(e){var t=DC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return wC(wC({},e),{},{selectedData:t})})),e.emit(i.EVENT_SELECT_CHANGED))},e._onStateChange=function(){e.onStateChange()},e}return t=i,(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(){PC(LC(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),PC(LC(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){PC(LC(i.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Ul.UPDATE,this._onStateChange),this.stateManager.core.pad.on(ns.EVENT_PARAM_MODELS_CHANGED,this.onModelsChange),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(ns.EVENT_PARAM_MODELS_CHANGED,this.onModelsChange),this.state.reduce((function(){return kC})),this.selectionStateManager.off(Ul.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[],PC(LC(i.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,t)&&(this.selected=t)}this.state.state.rawSelected!==e&&(this.state.reduce((function(t){return(t=wC({},t)).rawSelected=e,t})),this.onModelsChange())}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===Na}))}},{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),o=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=0,A=o.length;i<A;++i)if(n[i]!==o[i])return!0;return!1}}])&&xC(t.prototype,r),n&&xC(t,n),i}(po.AXR);NC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var GC={entry:bd,scene:QC,select:NC,fittingDesign:xy,baseDesignInfo:ed,viewParamModel:AI};function UC(){return kh().axr.axrs}var jC=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function YC(e){return(YC="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 VC(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 HC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?VC(Object(r),!0).forEach((function(t){KC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function KC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JC(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function qC(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){JC(i,n,o,A,a,"next",e)}function a(e){JC(i,n,o,A,a,"throw",e)}A(void 0)}))}}function WC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zC(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 XC(e,t){return(XC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZC(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=eE(e);if(t){var o=eE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $C(this,r)}}function $C(e,t){return!t||"object"!==YC(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 eE(e){return(eE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tE=function(){return UC().fittingDesign.fittingDesignSense},rE=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&&XC(e,t)}(u,e);var t,r,n,o,i,A,a,s=ZC(u);function u(){return WC(this,u),s.apply(this,arguments)}return t=u,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];tE().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return tE().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=qC(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(UC().viewParamModel.state.state.currModelId!==t||tE().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,Vd(t);case 5:return r=e.sent,e.abrupt("return",Du(HC(HC({},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 tE().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=$t(p.ParamModelUtils.flattenModels(UC().entry.getStateManager().core.design.getCustom().getParamModels()),t);return r?{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,o=0;o<n;o++){var i={type:Qr.POINT,val:t[o]},A={type:Qr.LINE,val:r[o]};if(!Or(i.val))return!1;if(!Tr(A.val))return!1;if(!kr(i,A))return!1;for(var a=o+1;a<n;a++){var s={type:Qr.POINT,val:t[a]},u={type:Qr.LINE,val:r[a]};if(!kr(i,s))return!1;if(!kr(i,u))return!1;if(!kr(A,s))return!1;if(!kr(A,u))return!1}}return!0}(Nr(e,r).path)}:{validated:!1}}},{key:"appendFittingDesign",value:(A=qC(f.a.mark((function e(t){var r,n=arguments;return f.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",tE().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(i=qC(f.a.mark((function e(t){var r,n,o,i=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=Nd(n),tE().$actionSaveFittingDesign.started.dispatch({defer:o,design:t}),e.abrupt("return",o.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=qC(f.a.mark((function e(t){var r,n,o,i,A;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,A=Nd(o),tE().$actionClearFittingDesign.started.dispatch({defer:A,modelId:i}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&zC(t.prototype,r),n&&zC(t,n),u}(jC);function nE(e){return(nE="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 iE(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 AE(e,t){return(AE=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=uE(e);if(t){var o=uE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sE(this,r)}}function sE(e,t){return!t||"object"!==nE(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 uE(e){return(uE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cE=(new Ar.a).setFromCenterAndSize(new Q.a(0,0,0),new Q.a(200,200,100)),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&&AE(e,t)}(i,e);var t,r,n,o=aE(i);function i(){return oE(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,o=e.cameraAttributes.position,i=n.clone().sub(r).length(),A=n.clone().add(o.clone().sub(n).normalize().mul(i));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return cE}}])&&iE(t.prototype,r),n&&iE(t,n),i}(So.Scene3DStateManager);function gE(e){return(gE="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 pE(e,t){return(pE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hE(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 o=IE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dE(this,r)}}function dE(e,t){return!t||"object"!==gE(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)}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&&pE(e,t)}(r,e);var t=hE(r);function r(){return fE(this,r),t.apply(this,arguments)}return r}(So.types.combine({scene3D:lE})),CE=window.document.createElement("script");CE.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(CE);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)}function BE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vE(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 mE(e,t){return(mE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QE(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 o=_E(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(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 _E(e){return(_E=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&&mE(e,t)}(i,e);var t,r,n,o=QE(i);function i(){var e;return BE(this,i),(e=o.apply(this,arguments)).rootState=new yE,e}return t=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new Lh(this,this.rootState);e.init(),e.run()}}])&&vE(t.prototype,r),n&&vE(t,n),i}(Au.BasePlugin);function SE(e){return(SE="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 DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RE(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 ME(e,t){return(ME=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=FE(e);if(t){var o=FE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PE(this,r)}}function PE(e,t){return!t||"object"!==SE(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 FE(e){return(FE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}wE.dependencies=[So.AppServicePlugin,pu];var OE=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&&ME(e,t)}(i,e);var t,r,n,o=xE(i);function i(){return DE(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"toggleModelViewIntersected",value:function(e){UC().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){UC().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&RE(t.prototype,r),n&&RE(t,n),i}(jC);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 LE(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function kE(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){LE(i,n,o,A,a,"next",e)}function a(e){LE(i,n,o,A,a,"throw",e)}A(void 0)}))}}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GE(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 UE(e,t){return(UE=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=VE(e);if(t){var o=VE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return YE(this,r)}}function YE(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 VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HE=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&&UE(e,t)}(s,e);var t,r,n,o,i,A,a=jE(s);function s(){return NE(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"getAllCustomModels",value:(A=kE(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(i=kE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=kE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&GE(t.prototype,r),n&&GE(t,n),s}(jC);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 JE(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function qE(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){JE(i,n,o,A,a,"next",e)}function a(e){JE(i,n,o,A,a,"throw",e)}A(void 0)}))}}function WE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 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=eB(e);if(t){var o=eB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $E(this,r)}}function $E(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 eB(e){return(eB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tB,rB,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&&XE(e,t)}(a,e);var t,r,n,o,i,A=ZE(a);function a(){return WE(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(i=qE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"save",value:(o=qE(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}])&&zE(t.prototype,r),n&&zE(t,n),a}(jC);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 iB(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 aB(e,t){return(aB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sB(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 o=cB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uB(this,r)}}function uB(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 cB(e){return(cB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(tB||(tB={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(rB||(rB={}));var lB=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&&aB(e,t)}(i,e);var t,r,n,o=sB(i);function i(){return iB(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case tB.View3D:t=So.PerspectiveCameraMode.View3D;break;case tB.Roamer:t=So.PerspectiveCameraMode.Roamer}kh().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=kh().getStateManager().scene3D;switch(e){case rB.UP:case rB.FRONT:t=So.ArrowType.UP;break;case rB.DOWN:case rB.BACK:t=So.ArrowType.DOWN;break;case rB.LEFT:t=So.ArrowType.LEFT;break;case rB.RIGHT:t=So.ArrowType.RIGHT}if(t){if(e===rB.UP||e===rB.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&AB(t.prototype,r),n&&AB(t,n),i}(jC);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){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 hB(e,t){return(hB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dB(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=yB(e);if(t){var o=yB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return IB(this,r)}}function IB(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 yB(e){return(yB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var 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&&hB(e,t)}(i,e);var t,r,n,o=dB(i);function i(){return fB(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"setDefaultHint",value:function(e){UC().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){UC().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){UC().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&pB(t.prototype,r),n&&pB(t,n),i}(jC);function EB(e){return(EB="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 BB(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function vB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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){return(QB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bB(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 o=wB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _B(this,r)}}function _B(e,t){return!t||"object"!==EB(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 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&&QB(e,t)}(a,e);var t,r,n,o,i,A=bB(a);function a(){return vB(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:function(e){return UC().viewParamModel.getParamModelJsonData(e)}},{key:"getParamIntersected",value:(o=f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,UC().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(he.map)(n.intersectedGroups,(function(e){return Ud(Ud({},e),{},{intersecteds:Object(he.map)(e.intersecteds,(function(e){return Object(he.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function A(e){BB(i,r,n,A,a,"next",e)}function a(e){BB(i,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(e){return UC().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return UC().viewParamModel.getParamModelPhotoData(e)}}])&&mB(t.prototype,r),n&&mB(t,n),a}(jC),DB=new uc.a.EventEmitter;function RB(e){return(RB="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 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 xB(e,t){return(xB=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=OB(e);if(t){var o=OB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FB(this,r)}}function FB(e,t){return!t||"object"!==RB(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 OB(e){return(OB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var TB,LB,kB=function(){return UC().select};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(TB||(TB={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(LB||(LB={}));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&&xB(e,t)}(i,e);var t,r,n,o=PB(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).__generateEntity=function(e){return Object(he.castArray)(e).map((function(e){var t={__sceneId:Yu.SCENE_ID,entityId:e.id,entityType:Na};return e.type===LB.CASBIN&&(t.entityId=UC().baseDesignInfo.state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){DB.emit("EVENT_SELECT_MODEL_CHANGE",e.getSelected())},kB().on(NC.EVENT_SELECT_CHANGED,e.onSelectedChanged),e}return t=i,(r=[{key:"getSelected",value:function(){var e=kB().state.state.selectedData,t=UC().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof ie&&r.isAppendHardware)return{data:[r.hardwareData],type:TB.CASBIN};var n=Object(he.map)(e,"id"),o=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:o,type:TB.MODEL}}return{data:[],type:TB.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);kB().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);kB().unSelect(t)}else kB().select([])}},{key:"on",value:function(e){DB.on("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"off",value:function(e){DB.off("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"once",value:function(e){DB.once("EVENT_SELECT_MODEL_CHANGE",e)}},{key:"__onDestroy",value:function(){kB().off(NC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&MB(t.prototype,r),n&&MB(t,n),i}(jC);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 UB(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function jB(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){UB(i,n,o,A,a,"next",e)}function a(e){UB(i,n,o,A,a,"throw",e)}A(void 0)}))}}function YB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VB(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 KB(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=qB(e);if(t){var o=qB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JB(this,r)}}function JB(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 qB(e){return(qB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var WB=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)}(s,e);var t,r,n,o,i,A,a=KB(s);function s(){return YB(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"viewSelected",value:(A=jB(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(i=jB(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=kh().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){UC().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){UC().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){UC().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(o=jB(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",UC().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})}])&&VB(t.prototype,r),n&&VB(t,n),s}(jC);function zB(e){return(zB="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 XB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZB(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 $B(e,t){return($B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ev(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=rv(e);if(t){var o=rv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tv(this,r)}}function tv(e,t){return!t||"object"!==zB(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 rv(e){return(rv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nv=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&&$B(e,t)}(i,e);var t,r,n,o=ev(i);function i(){return XB(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;kh().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){kh().designModeContext.registerMultiSelectShortcut(e)}}])&&ZB(t.prototype,r),n&&ZB(t,n),i}(jC),ov=r(422),iv=r.n(ov),Av=new po.I18NManager,av="custom_order_split",sv={"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 uv(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function cv(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){uv(i,n,o,A,a,"next",e)}function a(e){uv(i,n,o,A,a,"throw",e)}A(void 0)}))}}var lv=Object(he.once)((function(){return!!Object(Yr.parseServQueryParams)()}));function gv(){return fv.apply(this,arguments)}function fv(){return(fv=cv(f.a.mark((function e(){var t,r,n=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=Yr.servkit.createTerminal({id:t.clientId||"custom-order-split",type:Yr.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:Yr.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 pv=r(513),hv=r.n(pv),dv=r(1107),Iv=r.n(dv);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 Cv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ev(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 Bv(e,t){return(Bv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vv(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=Qv(e);if(t){var o=Qv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mv(this,r)}}function mv(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 Qv(e){return(Qv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bv=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&&Bv(e,t)}(i,e);var t,r,n,o=vv(i);function i(){return Cv(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,o=e.className;return pi.a.createElement("div",{className:hv()(Iv.a.empty,o)},!r&&pi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&pi.a.createElement("p",null,t))}}])&&Ev(t.prototype,r),n&&Ev(t,n),i}(pi.a.PureComponent);function _v(e){return(_v="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 wv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sv(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 Dv(e,t){return(Dv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rv(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=xv(e);if(t){var o=xv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mv(this,r)}}function Mv(e,t){return!t||"object"!==_v(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 xv(e){return(xv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pv=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&&Dv(e,t)}(i,e);var t,r,n,o=Rv(i);function i(){return wv(this,i),o.apply(this,arguments)}return t=i,(r=[{key:"render",value:function(){var e=this.props;return pi.a.createElement(So.Scene3D,e)}}])&&Sv(t.prototype,r),n&&Sv(t,n),i}(fi.PureComponent),Fv=r(1108),Ov=r.n(Fv);function Tv(e){return(Tv="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 Lv(){return(Lv=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 kv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nv(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 Gv(e,t){return(Gv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uv(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 o=Yv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jv(this,r)}}function jv(e,t){return!t||"object"!==Tv(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)}fi.PureComponent;var Vv=r(87);function Hv(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,o=!1,i=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){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kv(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 Kv(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 Kv(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=pi.a;var Jv=document.getElementById("root");function qv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wv(e,t,r,n,o,i,A){try{var a=e[i](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function zv(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){Wv(i,n,o,A,a,"next",e)}function a(e){Wv(i,n,o,A,a,"throw",e)}A(void 0)}))}}function Xv(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 Zv=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(A.ZH_CN,{zh_CN:sv}),function(e){vu=e}(this)}var t,r,n,o,i;return t=e,(r=[{key:"isInCustomMiniAppMode",value:function(){return lv()}},{key:"start",value:(i=zv(f.a.mark((function e(t){var r,n,o=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInCustomMiniAppMode()){e.next=7;break}if(Yr.sappSDK.isStarted){e.next=4;break}return e.next=4,Yr.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=zv(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 4:this.sappSDK=Yr.sappSDK,e.next=10;break;case 7:return e.next=9,gv(t);case 9:this.sappSDK=e.sent;case 10:return e.next=12,Promise.resolve([So.App,wE]).then((function(e){var t=Hv(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(Jv)})).catch((function(e){Object(Vv.unmountComponentAtNode)(Jv),Object(Vv.render)(pi.a.createElement(bv,null),Jv),console.error("micros/pad",e)}));case 12:return(r=this.getCustomMiniAppService(io))?(PA().setMiniAppHttpProxyClientService(r),Uh(PA())):Uh(xA()),(Ph=new Gh.AttachedService).config.setRequestClient(Oh),Fh=new Gh.ParamModelDataService({paramModelConstructor:ie,requestClient:Oh}),new Gh.ParamModelAssemblyDataService({paramModelAssemblyConstructor:fe,requestClient:Oh}),n=this.getService(WB),e.prev=16,e.next=19,n.viewSelected();case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(16),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 24:case"end":return e.stop()}}),e,this,[[16,21]])}))),function(e){return i.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(he.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),iv.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:ov.ENUM.TranslatorType.I18next,packages:[av],resource:qv({},av,t)}),Av.init({namespace:av,resources:av})}},{key:"stop",value:(o=zv(f.a.mark((function e(){var t;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(co))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(he.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(e){if(jC.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 Yr.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&Xv(t.prototype,r),n&&Xv(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 oe})),r.d(t,"loadNamespaces",(function(){return ie})),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(185),o=r.n(n),i=r(81),A=r.n(i),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(209),g=r.n(l),f=r(238),p=r.n(f),h=r(239),d=r.n(h),I=r(100),y=r.n(I),C=r(1100),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 o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.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 w(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var A=n(i.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return o()?{}:{obj:e,k:n(i.shift())}}function S(e,t,r){var n=w(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=w(e,t),n=r.obj,o=r.k;if(n)return n[o]}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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var F=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,p()(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]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[e,t];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split(".")),D(this.data,i)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var A=[e,t];r&&(A=A.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),S(this.data,A,n),o.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 o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=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,o):s=A()({},s,r),S(this.data,a,s),i.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),O={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))})),t}},T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,p()(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,o=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t){var r=this;if("object"!==o()(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,i=this.extractFromKey(e[e.length-1],t),a=i.key,s=i.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),p=f&&f.res,h=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(p),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 p&&"boolean"!=typeof p&&"number"!=typeof p;if(E&&p&&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(h,p,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:h;for(var b in p)if(Object.prototype.hasOwnProperty.call(p,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=p[b])}p=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(p=p.join(C))&&(p=this.extendTranslation(p,e,t));else{var w=!1,S=!1;if(!this.isValidLookup(p)&&void 0!==t.defaultValue){if(w=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);p=t["defaultValue".concat(D)]}p||(p=t.defaultValue)}this.isValidLookup(p)||(S=!0,p=a);var R=t.defaultValue&&t.defaultValue!==p&&this.options.updateMissing;if(S||w||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:p);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 F=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:p,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:p,R,t),r.emit("missingKey",e,u,n,p)};if(this.options.saveMissing){var O=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&O?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return F([e],t)}))})):F(M,a)}}p=this.extendTranslation(p,e,t,f),S&&p===a&&this.options.appendNamespaceToMissingKey&&(p="".concat(u,":").concat(a)),S&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,r,n){var o=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 i=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(i=A()({},this.options.interpolation.defaultVariables,i)),e=this.interpolator.interpolate(e,i,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return o.translate.apply(o,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=O.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,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)||(i=e,f.forEach((function(r){if(!A.isValidLookup(t)){o=r;var i,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(i=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+i),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=i);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{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 L(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]=L(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]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(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),o=[],i=function(e){e&&(r.isWhitelisted(e)?o.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){o.indexOf(e)<0&&i(r.formatLanguageCode(e))})),o}}]),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=[],o=this.getRule(e);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(e,o);n.push("".concat(t).concat(i))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var o=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var A=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),Y=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 o,i,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),o=n.shift().trim(),i=n.join(a.formatSeparator).trim();return a.format(D(t,o),i,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(o=this.regexpUnescape.exec(e))&&(i=u(o[1].trim()),e=e.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;o=this.regexp.exec(e);){if(void 0===(i=u(o[1].trim())))if("function"==typeof c){var l=c(e,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=b(i));if(i=this.escapeValue?s(this.escape(i)):s(i),e=e.replace(o[0],i),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=A()({},o);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,i)).replace(/'/g,'"');try{i=JSON.parse(n),t&&(i=A()({},t,i))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),i),i))&&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}(),V=r(710),H=r.n(V);var K=function(e){function t(e,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),o=g()(this,p()(t).call(this)),m.call(y()(y()(o))),o.backend=e,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?A.indexOf(a)<0&&A.push(a):(o.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),i.indexOf(a)<0&&i.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(i.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:i,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=H()(n,2),i=o[0],A=o[1];t&&this.emit("failedLoading",i,A,t),r&&this.store.addResourceBundle(i,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,o,s,u,c,l;n=r.loaded,o=A,u=w(n,[i],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(o)),s||c[l].push(o),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,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=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&&o<5?setTimeout((function(){n.read.call(n,e,t,r,o+1,2*i,A)}),i):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=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."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.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("|"),o=H()(n,2),i=o[0],A=o[1];this.read(i,A,"read",null,null,(function(n,o){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(i," failed"),n),!n&&o&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(i),o),t.loaded(e,n,o)}))}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function J(){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"===o()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===o()(e[2])||"object"===o()(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 q(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,p()(t).call(this)),m.call(y()(y()(e))),e.options=q(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()({},J(),this.options,q(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 o=new k(this.options);this.store=new F(this.options.resources,this.options);var i=this.services;i.logger=v,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new j(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new Y(this.options),i.backendConnector=new K(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new T(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];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 o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.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&&O.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 o=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(o){!function(e,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(o,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var i=A()({},n);if("object"!==o()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,r.t(t,i)};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||[],o=e.filter((function(e){return n.indexOf(e)<0}));return o.length?(this.options.preload=n.concat(o),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,o=A()({},this.options,r,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.translator=new T(i.services,i.options),i.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];i.emit.apply(i,[e].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),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),oe=z.loadLanguages.bind(z),ie=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)}])}));