@manycore/custom-sdk 3.1.17 → 3.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.__customSdkVersion = '3.1.
|
|
1
|
+
window.__customSdkVersion = '3.1.19';!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):"function"==typeof define&&define.amd?define(["servkit","lodash","react","react-dom","@manycore/custom-miniapp-sdk"],e):"object"==typeof exports?exports.CustomSdk=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):t.CustomSdk=e(t.servkit,t._,t.React,t.ReactDOM,t["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__6__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__12__,__WEBPACK_EXTERNAL_MODULE__150__,__WEBPACK_EXTERNAL_MODULE__321__){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1381)}([function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"h",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"f",(function(){return c})),r.d(e,"b",(function(){return A})),r.d(e,"e",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"g",(function(){return h})),r.d(e,"i",(function(){return p})),r.d(e,"j",(function(){return d}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function u(t,e,r,o){var i,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}function c(t,e){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;function f(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}function d(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError},function(t,e,r){"use strict";var n=r(23);r.d(e,"b",(function(){return n.BBox2d})),r.d(e,"c",(function(){return n.BBox3d})),r.d(e,"d",(function(){return n.CCS2d})),r.d(e,"e",(function(){return n.CCS3d})),r.d(e,"g",(function(){return n.Interval})),r.d(e,"l",(function(){return n.Matrix2})),r.d(e,"m",(function(){return n.Matrix3})),r.d(e,"n",(function(){return n.Matrix4})),r.d(e,"i",(function(){return n.MPoint2d})),r.d(e,"j",(function(){return n.MVector2d})),r.d(e,"k",(function(){return n.MVector3d})),r.d(e,"o",(function(){return n.Num})),r.d(e,"p",(function(){return n.Point2d})),r.d(e,"q",(function(){return n.Point3d})),r.d(e,"r",(function(){return n.Point4d})),r.d(e,"s",(function(){return n.Quaternion})),r.d(e,"t",(function(){return n.TOLERANCE})),r.d(e,"u",(function(){return n.Tolerance})),r.d(e,"v",(function(){return n.Transform2d})),r.d(e,"w",(function(){return n.UV})),r.d(e,"x",(function(){return n.Vector2d})),r.d(e,"y",(function(){return n.Vector3d})),r.d(e,"a",(function(){return n.Algorithm})),r.d(e,"B",(function(){return n.op3d})),r.d(e,"C",(function(){return n.rpSolve})),r.d(e,"h",(function(){return n.LegendreGaussIntegration})),r.d(e,"A",(function(){return n.numericalGradient})),r.d(e,"E",(function(){return n.unconstrainedMinimize})),r.d(e,"z",(function(){return n.findWithValue})),r.d(e,"F",(function(){return n.unconstrainedMinimizeWithInvHMat})),r.d(e,"D",(function(){return n.svd})),r.d(e,"f",(function(){return n.GaussNewton}))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -206,4 +206,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
206
206
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
207
207
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
208
208
|
PERFORMANCE OF THIS SOFTWARE.
|
|
209
|
-
***************************************************************************** */var ym,vm=function(t,e){return(vm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function mm(t,e){function r(){this.constructor=t}vm(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Im(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":gm(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function Em(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Cm(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Em(arguments[e]));return t}!function(t){t.CABINET="CABINET",t.WARDROBE="WARDROBE",t.DOOR_WINDOW="DW",t.CABINET_COPY="CABINET_COPY",t.WARDROBE_COPY="WARDROBE_COPY",t.DOOR_WINDOW_COPY="DW_COPY"}(ym||(ym={}));var bm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return mm(e,t),e.prototype.getParamModelDataByIds=function(t,e){return Object(pg.API_UNSUPPORT)()},e.prototype.getTopParamModels=function(t){return Object(pg.API_UNSUPPORT)()},Im([pg.anno.decl.api()],e.prototype,"getParamModelDataByIds",null),Im([pg.anno.decl.api()],e.prototype,"getTopParamModels",null),e=Im([pg.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:Vy.INNER})],e)}(pg.ServService);var Bm,wm,Pm,Sm=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PopBufferMtl=void 0,e.toPopBufferMtl=function(t){var e=t.parameters,r=new a;r.setObjName(t.objName),t.brandGoodId&&r.setBrandGoodId(t.brandGoodId);if(e)for(var o=0,i=e.length;o<i;o++){var s=e[o];switch(s.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(s.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(s.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(s.value));break;case"transparentType":r.setTransparentType(Number(s.value))}}return r};var r,n=(r=_e.default)&&r.__esModule?r:{default:r};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(a)?a:String(a)),n)}var i,a}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(t){return this.objName=t,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(t){return this.brandGoodId=t,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(t){return this.diffuseTexture=t,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(t){return this.diffuseColor=t,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(t){return this.refractColor=t,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(t){return this.transparentType=t,this}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.PopBufferMtl=a})),_m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return mm(e,t),e.prototype.toJSON=function(){return{paramPackages:Cm(this.paramPackages.values()),hardwares:Cm(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(t){var e=Em(t,2);e[0];var r=e[1],n=new qv.a;return Object(Or.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Cm(this.displayInfos.values()),wireFrames:Object(Or.fromPairs)(Cm(this.wireGeometrysMap.entries()).map((function(t){return[t[0],t[1].vertices]})))}},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.unSerialize=function(t){var e=this,r="string"==typeof t?JSON.parse(t):t,n=Object(Or.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(t){var e=new qv.a;if(Object(Or.extend)(e,t),e.meshModels=e.meshModels.map((function(t){var e=t.displayMaterial,r=new zv.a,n=new Eo.a;return Object(Or.extend)(n,t.geometry),r.texture=t.texture,r.displayMaterial=e?Sm.toPopBufferMtl(e):void 0,r.geometry=n,r})),e.furnitureModel){var r=new Gv.FurnitureModel;Object(Or.extend)(r,e.furnitureModel),r.size=new _e.default(r.size),r.position=new _e.default(r.position),r.rotate=new _e.default(r.rotate),r.scale=new _e.default(r.scale),e.furnitureModel=r}return e}))),r.wireFrames&&Object(Or.each)(r.wireFrames,(function(t,r){e.addWireGeometrysMap(r,t)})),this.addCustomResources(n)},e}(Hv.a);!function(t){t[t.willExit=0]="willExit"}(Bm||(Bm={})),function(t){t[t.exit=0]="exit"}(wm||(wm={})),function(t){t[t.personalLibrary=1]="personalLibrary",t[t.enterpriseLibrary=2]="enterpriseLibrary"}(Pm||(Pm={}));var Qm=r(219),Om=r(262),Dm=function(){function t(t){var e=this;this.keyValue={},this.keyEnum={},this.keyExist={},t.values().forEach((function(t){var r=t.name();e.keyEnum[r]=t,e.keyExist[r]=!1})),this.keyType=t}return t.prototype.clear=function(){var t=this;Object.keys(this.keyExist).forEach((function(e){t.keyExist[e]=!1})),this.keyValue={}},t.prototype.delete=function(t){var e=t.name(),r=this.keyExist[e];return r&&(this.keyExist[e]=!1,delete this.keyValue[e]),r},t.prototype.forEach=function(t,e){var r=this;Object.keys(this.keyValue).forEach((function(n){t.call(e,r.keyValue[n],r.keyEnum[n],r)}))},t.prototype.get=function(t){return this.keyValue[t.name()]},t.prototype.has=function(t){return this.keyExist[t.name()]},t.prototype.set=function(t,e){var r=t.name();return this.keyExist[r]=!0,this.keyValue[r]=e,this},t.prototype.keys=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyEnum[e]}))},t.prototype.values=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyValue[e]}))},t.prototype.entries=function(){var t=this,e=[];return Object.keys(this.keyValue).forEach((function(r){e.push([t.keyEnum[r],t.keyValue[r]])})),e},t.prototype.clone=function(){var e=new t(this.keyType);return this.forEach((function(t,r){return e.set(r,t)})),e},t}(),xm=r(369),Mm=r(699),Rm=function(t,e){this.points=t,this.transform=e,this.polygon=new xs.default(t.map((function(t){return new bn.default(e.worldToLocal(t))})))},Tm=function(t,e,r){this.point=t,this.normal=e,this.position=r},jm=r(210),Lm=r(101),km=r(304),Nm=function(t,e){this.point=t,this.offset=e},Fm=function(){function t(t,e,r,n){this.points=[t,e],this.isStart=r,this.isEnd=n,this.lineSegment=new Lm.default(t.point,e.point),this.lengthRange=new jm.default(t.position,e.position)}return t.prototype.intersect=function(t,e){var r=this.lineSegment,n=t.lineSegment,o=Lm.default.estimateLineAndLine(r,n,!1);if(o.status===km.a.JOINT){var i=!0;e?(this.isStart||void 0===o.parameterA||(i=o.parameterA>0),this.isEnd||void 0===o.parameterA||(i=i&&o.parameterA<1),t.isStart||void 0===o.parameterB||(i=i&&o.parameterB>0),t.isEnd||void 0===o.parameterB||(i=i&&o.parameterB<1)):i=o.areSegmentsIntersected(!1);var a=new bn.default;return a.x=this.lengthRange.interpolate(o.parameterA),a.y=t.lengthRange.interpolate(o.parameterB),i?new Nm(o.point,a):void 0}},t}(),Gm=r(538),Um=function(){function t(t){this.lengths=t,this.intersections=[]}return t.prototype.addIntersection=function(t){this.intersections.push(t)},t.prototype.getPoints=function(){return this.intersections.map((function(t){return t.point}))},t.prototype.getPointsInside=function(t){var e,r,n=[];try{for(var o=Object(Ts.k)(this.intersections),i=o.next();!i.done;i=o.next()){var a=i.value;a.offset.x>-t&&a.offset.x<this.lengths.x+t&&a.offset.y>-t&&a.offset.y<this.lengths.y+t&&n.push(a.point)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}();function zm(t,e){void 0===e&&(e=1);var r,n=[];return t.forEach((function(t){void 0!==r&&bn.default.isEqual(t,r,e)||(r=t,n.push(t))})),n[n.length-1]=t[t.length-1],n}var Ym=function(){function t(t){if(this.pointCount=0,t.length<2)throw new Error("Polyline must has more than one valid Point.");this.buildPolyline(zm(t))}return t.prototype.getPoint=function(t){if(0===t)return this.getStart().clone();if(1===t)return this.getEnd().clone();for(var e=t*this.length(),r=this.pointCount-1,n=0;n<this.pointCount;n++)if(this.getPositionAt(n)>=e){r=n;break}if(0===r)return this.getStart().clone();var o=this.getLengthRangeAt(r-1).getParameter(e);return this.getLineSegmentAt(r-1).interpolate(o)},t.prototype.getTangent=function(t){return this.getRightNormal(t).leftDirect()},t.prototype.getRightNormal=function(t){return this.getRightNormalByPosition(t*this.length())},t.prototype.getRightNormalByPosition=function(t){for(var e=1;e<this.pointCount;e++)if(!(this.getPositionAt(e)<=t)){var r=(t-this.getPositionAt(e-1))/(this.getPositionAt(e)-this.getPositionAt(e-1));return bn.default.lerp(this.getNormalAt(e-1),this.getNormalAt(e),r)}return this.getNormalAt(this.pointCount-1).clone()},t.prototype.getNearestPointParameter=function(t){if(this.pointCount<2)return 0;for(var e=Number.MAX_VALUE,r=0,n=0;n<this.pointCount-1;n++){var o=this.getLineSegmentAt(n),i=this.getLengthRangeAt(n),a=o.getNearestPointParameter(t,!0),s=o.interpolate(a),u=t.distanceSquared(s),c=i.interpolate(a);u<e&&(e=u,r=c)}return r/this.length()},t.prototype.getPoints=function(){return this.polylinePoints.map((function(t){return t.point}))},t.prototype.getPointParameters=function(){var t=this.length();return this.getPositions().map((function(e){return e/t}))},t.prototype.getSegmentPoints=function(t){if(!this.length())return this.getPoints();for(var e=jm.default.mul(t,this.length()),r=[this.getPoint(t.min)],n=0;n<this.pointCount&&!(this.getPositionAt(n)>e.max);n++)this.getPositionAt(n)>e.min&&r.push(this.getPointAt(n));return r.push(this.getPoint(t.max)),zm(r)},t.prototype.getPolylineIntersection=function(t,e){var r=new Um(new bn.default(this.length(),t.length()));if(!e&&!this.boundingBox.intersects(t.boundingBox,!0))return r;var n=this.polylineSegments,o=t.polylineSegments;return n.forEach((function(t){return o.forEach((function(n){var o=t.intersect(n,e);o&&r.addIntersection(o)}))})),r},t.prototype.extend=function(e,r){var n=this.getSegmentPoints((new jm.default).setFromPoints([e,r]));if(0!==n.length)return new t(e>r?n.reverse():n)},t.prototype.intersect=function(t,e){return void 0===e&&(e=1),this.boundingBox.intersects(t.boundingBox,!0,2*e)?this.getPolylineIntersection(t,!0).getPointsInside(e):[]},t.prototype.getStart=function(){return this.getPointAt(0)},t.prototype.getEnd=function(){return this.getPointAt(this.pointCount-1)},t.prototype.getEndpoints=function(){return[this.getStart(),this.getEnd()]},t.prototype.length=function(){return 0===this.pointCount?0:this.getPositionAt(this.pointCount-1)},t.prototype.toString=function(){return"Polyline2 {points: "+this.getPoints().map((function(t){return t.toParenString()})).join(",")+", length: "+this.length()},t.prototype.buildPolyline=function(t){this.pointCount=t.length,this.boundingBox=(new Us.default).includePoints(t),this.polylinePoints=[],this.polylineSegments=[];var e=this.pointCount;if(1===e)return this.polylinePoints.push(new Tm(t[0],new bn.default(0,0),0)),void console.warn("Polyline must has more than one valid Point.");for(var r=new bn.default,n=new bn.default,o=0,i=0;i<e;i++){var a=t[i],s=0!==i?t[i-1]:void 0,u=i<e-1?t[i+1]:void 0;s&&(o+=s.distance(a));var c=void 0;!s&&u?c=bn.default.sub(u,a).rightDirect().normalize():!u&&s?c=bn.default.sub(a,s).rightDirect().normalize():s&&u&&(c=bn.default.bisectorCounterClockwise(r.subVectors(s,a),n.subVectors(u,a))),this.polylinePoints.push(new Tm(a,c,o)),s&&this.polylineSegments.push(new Fm(this.polylinePoints[i-1],this.polylinePoints[i],1===i,i===e-1))}},t.prototype.getPositions=function(){return this.polylinePoints.map((function(t){return t.position}))},t.prototype.getPointAt=function(t){return this.polylinePoints[t].point},t.prototype.getNormalAt=function(t){return this.polylinePoints[t].normal},t.prototype.getPositionAt=function(t){return this.polylinePoints[t].position},t.prototype.getLineSegmentAt=function(t){return this.polylineSegments[t].lineSegment},t.prototype.getLengthRangeAt=function(t){return this.polylineSegments[t].lengthRange},t}(),Hm=r(697),Vm=r(703),qm=r(315),Wm=r(286),Km=function(t,e){this.start=t,this.end=e},Jm=function(){function t(t,e){this.points=t,this.lines=e}return t.fromPolyline=function(e,r){void 0===r&&(r=!0);for(var n=[],o=e.length,i=0;i<o;i++)n.push(new Km(i,(i+1)%o));return!1===r&&n.splice(o-1,1),new t(e,n)},t.fromShapeSize=function(e){var r=[new bn.default(0,0),new bn.default(e.x,0),new bn.default(e.x,e.y),new bn.default(0,e.y)];return t.fromPolyline(r,!0)},t}(),Xm=r(688),Zm=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Us.default,Os.default,xm.default,Be.default,Mm.a,we.default,Rm,jm.default,Lm.default,li.a,Gm.default,Pe.default,Ds.a,xs.default,Ms.a,Ym,Hm.a,Vm.a,Se.default,qm.a,Wm.default,Jm,Km,Rs.a,Xm.a,Fs,bn.default,_e.default,ArrayBuffer,or.Vector3,Om.default,Dm,Qh.ParamStore,Tm,Fm,zv.a,Eo.a,Gv.FurnitureModel,Map,or.SkyBackground]:[];Object(Qm.b)({isKnownImmutableInstance:function(t){return Zm.some((function(e){return t instanceof e}))}});Qm.a;var $m=r(345);function tI(t){return(tI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nI(n.key),n)}}function nI(t){var e=function(t,e){if("object"!=tI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tI(e)?e:String(e)}function oI(t,e){return(oI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iI(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sI(t);if(e){var o=sI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aI(this,r)}}function aI(t,e){if(e&&("object"===tI(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sI(t){return(sI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uI,cI=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oI(t,e)}(i,t);var e,r,n,o=iI(i);function i(){var t;return eI(this,i),(t=o.apply(this,arguments)).rootState=new kp,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new Hd(this,this.rootState);t.init(),t.run()}}])&&rI(e.prototype,r),n&&rI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}($m.a);cI.dependencies=[du.a];var AI,lI,fI,hI,pI,dI,gI,yI=function(t){if(!uI)throw new Error("please new Application before call method");return uI.getCustomMiniAppService(t)},vI=r(1399),mI={maxAge:6e5,max:20},II=Symbol("fitting-data"),EI=Symbol("groove-fitting-entity"),CI=Symbol("intersect-data"),bI=Symbol("param-model-hint-entity"),BI=Symbol("fitting-hint-entity"),wI=Symbol("plank-outline-hint-entity"),PI=Symbol("hole-entity"),SI=Symbol("square-groove-entity"),_I=Symbol("round-corner-groove-entity"),QI=Symbol("special-shaped-groove-entity"),OI=Symbol("path-groove-entity"),DI=Symbol("plank-area-face-hint-entity");!function(t){t.FAIL="fail",t.SUCCESS="success",t.LOADING="loading"}(AI||(AI={})),function(t){t[t.READY=0]="READY",t[t.LOADING=1]="LOADING",t[t.FAILED=2]="FAILED",t[t.INVALID=3]="INVALID",t[t.SUCCESS=4]="SUCCESS"}(lI||(lI={})),function(t){t[t.READY=0]="READY",t[t.RUNNING=1]="RUNNING",t[t.FAILED=2]="FAILED",t[t.SUCCESS=3]="SUCCESS"}(fI||(fI={})),function(t){t.SCENE_ID="cp"}(hI||(hI={})),function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(pI||(pI={})),function(t){t.selectBlank="sb",t.renderModeChange="r",t.doorVisibilityChange="d"}(dI||(dI={})),function(t){t.SHADING="0",t.OUTLINE_WITH_SHADING="1",t.TRANSLUCENT="2",t.OUTLINE_AND_TRANSLUCENT="3",t.FULLY_TRANSPARENT="4"}(gI||(gI={}));gI.SHADING,gI.OUTLINE_WITH_SHADING,gI.TRANSLUCENT,gI.OUTLINE_AND_TRANSLUCENT,gI.FULLY_TRANSPARENT;var xI,MI,RI,TI=[Qe.ParamModelType.PARAM_ENTITY,Qe.ParamModelType.PARAM_FURNITURE,Qe.ParamModelType.PARAM_PRIMITIVE],jI={scene3D:Symbol("scene3D")},LI=r(321),kI=r(251),NI=r(557);function FI(t){RI=t}function GI(t){return(GI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var UI=["paramModelData"];function zI(t){return function(t){if(Array.isArray(t))return YI(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return YI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YI(t,e)}(t)||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 YI(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function HI(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function VI(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */VI=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==GI(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(GI(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function qI(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function WI(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qI(i,n,o,a,s,"next",t)}function s(t){qI(i,n,o,a,s,"throw",t)}a(void 0)}))}}function KI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,XI(n.key),n)}}function XI(t){var e=function(t,e){if("object"!=GI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=GI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==GI(e)?e:String(e)}function ZI(t,e){return(ZI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=eE(t);if(e){var o=eE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tE(this,r)}}function tE(t,e){if(e&&("object"===GI(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function eE(t){return(eE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZI(t,e)}(i,t);var e,r,n,o=$I(i);function i(){var t;return KI(this,i),(t=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0},t.lastCurrentCustomDataArgs=[],t.getCurrentBaseDesignInfo=WI(VI().mark((function e(){var r,n;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.state.designInfo)){e.next=3;break}return e.abrupt("return",r);case 3:return n=yI(LI.MiniAppDesignBaseInfoService),e.next=6,n.getDesignBaseInfo();case 6:return r=e.sent,t.state.designInfo=r,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)}))),t.getCurrentCustomData=function(){var e=WI(VI().mark((function e(r){var n,o;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.currentCustomData,r){e.next=3;break}return e.abrupt("return",n);case 3:if(o=Object(Or.castArray)(r),!Object(Or.difference)(o,t.lastCurrentCustomDataArgs).length&&n){e.next=11;break}return e.next=8,GL(r);case 8:n=e.sent,e.next=12;break;case 11:return e.abrupt("return",n);case 12:return t.lastCurrentCustomDataArgs=o,t.state.currentCustomData=n,e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.loadFittingHardwareToSense=function(){var e=WI(VI().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.length>1&&void 0!==g[1]?g[1]:ge.V1,(o=Object(Or.uniq)(Object(Or.flatten)(Object(Or.map)(r.hardware,(function(t){return t.map((function(t){return t.brandGoodId}))}))))).length){e.next=4;break}return e.abrupt("return");case 4:return i=t.getStateManager().core,a=i.design,s=i.pad,e.next=8,Promise.allSettled(Object(Or.map)(o,function(){var t=WI(VI().mark((function t(e){var r;return VI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ok(e);case 2:return r=t.sent,t.abrupt("return",[e,r]);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 8:return u=e.sent,e.next=11,ik(o);case 11:c=e.sent,A=Object(Or.mapValues)(Object(Or.keyBy)(Object(Or.filter)(u,(function(t){return"fulfilled"===t.status})).map((function(t){return t.value})),(function(t){return t[0]})),(function(t){return t[1]})),l=a.getCustom(),f=[],h={},p=VI().mark((function t(){var e,o,i,a,u,l,p;return VI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.hardware[d],(o=s.findModelOrAssemblyModelById(d))?(i=o.getConcatenatedMatrix(),a=o.getSize(),u=(new Pe.default).makeTranslation(new _e.default(-a.x/2,a.y/2,-a.z/2)),l=n===ge.V2?i.clone():i.clone().multiply(u),p=Object(Or.map)(e,(function(t){var e=A[t.brandGoodId],r=c[t.brandGoodId]||{x:0,y:0,z:0};if(e){var i=e.paramModelData,a=HI(e,UI),s=t.rotate,u=(new gr).parse(i);Object(kI.attach)(u,Object(kI.toAttachedMap)(a)),u.setIsAppendHardware(!0),u.setLinkedIds(t.linkedIds),u.setHardwareData(t),u.setHardwareVersion(n),u.linkParamModelId=o.id;var f=l.clone().multiply((new Pe.default).compose(new _e.default(t.position),new we.default(s.x,s.y,s.z),new _e.default(t.scale)).multiply((new Pe.default).setPosition(new _e.default(r)))),p=Qs.a.decompose(f),d=p.rotation,g=p.position,y=p.scale,v=new _e.default(g);return u.setPosition({x:v.x,y:v.y,z:v.z}),u.setRotation({x:d.x,y:d.y,z:d.z}),u.setScale(y),u.assignUniqueId(),h[t.id]=u.id,u}})).filter((function(t){return!!t})),f.push.apply(f,zI(p))):Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!");case 3:case"end":return t.stop()}}),t)})),e.t0=VI().keys(r.hardware);case 18:if((e.t1=e.t0()).done){e.next=23;break}return d=e.t1.value,e.delegateYield(p(),"t2",21);case 21:e.next=18;break;case 23:if(!f.length){e.next=27;break}return e.next=26,xI.updateAttacheds(f);case 26:l.addParamModels.apply(l,f);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&JI(e.prototype,r),n&&JI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR),nE=r(132),oE=r(80);function iE(t){return(iE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function aE(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=lE(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function sE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sE(Object(r),!0).forEach((function(e){cE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cE(t,e,r){return(e=pE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AE(t){return function(t){if(Array.isArray(t))return fE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||lE(t)||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 lE(t,e){if(t){if("string"==typeof t)return fE(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fE(t,e):void 0}}function fE(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function hE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pE(n.key),n)}}function pE(t){var e=function(t,e){if("object"!=iE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=iE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==iE(e)?e:String(e)}var dE=function(){function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._isRealPath=!1,this._changeMap={},this.faceHint={},this.id=Object(Xr.default)(),this.modelID=e,this.paths=r,r.forEach((function(t){t.plankArea=o})),this.pathMap=n}var e,r,n;return e=t,(r=[{key:"getRealPaths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var r=e.force,n=void 0!==r&&r,o=e.resetCenter,i=void 0===o||o;if(!n&&i&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!n&&!i&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new t(this.modelID,[],new Map);var a=this.getFace2ds();if(this.paths.length>1){var s=[];c.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),c.FacesBoolean.FaceBooleanType.subtract,s),a=s}if(i&&a.length){var u,A={loops:(u=[]).concat.apply(u,AE(a.map((function(t){return t.loops}))))};Object(oE.b)(A);var l=A.box.center,f=c.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(t){t.loops.forEach((function(t){t.forEach((function(t){t.transform(f)}))}))}))}var h=[],p=[],d=new Map;a.forEach((function(t){var e=t.loops[0],r=t.loops.slice(1),n=yE(ye.OUTER,e),o=r.map((function(t){return yE(ye.INNER,t,!0)}));h.push(n),p.push.apply(p,AE(o)),d.set(n,o)}));var g=new t(this.modelID,[].concat(h,p),d);return i?this._realPathsResetCenterCache=g:this._realPathsCache=g,g._isRealPath=!0,g}},{key:"getCenterPoint",value:function(){var t,e,r=this.paths.filter((function(t){return t.type===ye.OUTER}));if(r.length)return(t=r.map(gE),e=new c.BBox2d,t.forEach((function(t){if(t.bcGroups){var r,n=aE(t.bcGroups);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.box=new c.BBox2d;var i,a=aE(o.boundedCurves);try{for(a.s();!(i=a.n()).done;){var s=i.value;o.box.merge(s.getBounding())}}catch(t){a.e(t)}finally{a.f()}e.merge(o.box)}}catch(t){n.e(t)}finally{n.f()}}else{var u,A=aE(t.loops);try{for(A.s();!(u=A.n()).done;){var l,f=aE(u.value);try{for(f.s();!(l=f.n()).done;){var h=l.value;e.merge(h.getBounding())}}catch(t){f.e(t)}finally{f.f()}}}catch(t){A.e(t)}finally{A.f()}}})),e).center}},{key:"getFace2ds",value:function(){return this.paths.map(gE)}},{key:"_trackUpdateField",value:function(t,e,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,o=t.field;e===r||n.some((function(e){return e.field===o&&e.context.id===t.context.id}))||n.push(t)}},{key:"changeMap",get:function(){return this._changeMap},set:function(t){this._changeMap=t}},{key:"getFaceHint",value:function(){return this.faceHint}},{key:"setFaceHint",value:function(t){this.faceHint[t.id]=t}},{key:"removeFaceHint",value:function(t){this.faceHint[t]=void 0}}])&&hE(e.prototype,r),n&&hE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gE(t){var e=[];if(t.lines.forEach((function(t){var r=t.start;r.getType()!==At.NONE&&e.push(r.getCurveLineAndPoints().curveLine),e.push(t.getRealLine())})),t.offset){var r=(0,c.LoopCCW.isPolygonCCW2D)(e.map((function(t){return t.startPoint})))?t.offset:-t.offset;return{loops:c.Path2dOffset.offsetPath2d(e,r).resultPaths}}return{loops:[e]}}function yE(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.map((function(t){return new Tn({type:At.NONE,position:t.startPoint})})),o=e.map((function(t){var e;return e=t instanceof c.LineSeg2d?{type:lt.SEGMENT}:t instanceof c.Arc2d?vE(t):mE(t),new Qn(e)})),i=c.LoopCCW.isPolygonCCW2D(n.map((function(t){return t.getPosition()})));r!==i&&(n=n.reverse(),o=(o=o.reverse().map((function(t){return"boolean"==typeof t.clockwise&&(t.clockwise=!t.clockwise),t}))).slice(1).concat(o[0]));var a=CE(n.map((function(t){return t.getPosition()})));return n=n.slice(a).concat(n.slice(0,a)),o=o.slice(a).concat(o.slice(0,a)),new Hn({type:t,points:n,lines:o,forceCCW:!1})}function vE(t){var e={};e.type=lt.CIRCLE_ARC,e.radius=t.radius,e.clockwise=!t.isCCW;var r=t.center,n=t.startPoint,o=t.endPoint,i=new c.LineSeg2d(n,o),a=i.length/2,s=new c.Vector2d(i.getPoint(a)),u=new c.Vector2d(r).subtracted(s).normalized();return e.clockwise?e.minorArc=u.isSameDirection(i.rightNormal):e.minorArc=u.isSameDirection(i.leftNormal),e}function mE(t){var e={};return e.type=lt.ELLIPSE_ARC,e.majorRadius=t.majorRadius,e.minorRadius=t.minorRadius,e.clockwise=!t.isCCW,e.ellipseCenter=t.ccs.origin,e}var IE=void 0;function EE(t){IE=t;var e=t.changeMap.update;if(e&&e.length>0){var r=t._isRealPath?t.getCenterPoint():null,n=r?c.Matrix3.makeTranslation(-r.x,-r.y):void 0;e.forEach((function(t){var e=t.field,r=t.context;"hint"===e&&((r=r).getHint()?$d(r,n):function(t,e){var r=Vd().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=n.findIndex((function(r){return r.linkModel.id===t&&r.id===e}));if(o>-1){var i=Wd(n);i.splice(o,1),r.setPlankOutlineHintModels(i)}}(r.path.plankArea.modelID,r.id))})),t.changeMap=uE(uE({},t.changeMap),{},{update:[]})}!function(t){var e=t.getFaceHint();e[se.TOP]?tg(e[se.TOP],t):eg(se.TOP,t.id);e[se.BOT]?tg(e[se.BOT],t):eg(se.BOT,t.id)}(t)}function CE(t){if(!t.length)return 0;var e=t[0].y,r=t[0].x;t.slice(1).forEach((function(t){e<t.y&&(e=t.y),r>t.x&&(r=t.x)}));var n,o,i=-r,a=-e;return t.forEach((function(e,r){var s=e.x,u=e.y,c=Math.pow(s+i,2)+Math.pow(u+a,2);void 0===n||c<n?(n=c,o=r):n===c&&t[o].x>e.x&&(o=r)})),o}function bE(t){return(bE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function BE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,PE(n.key),n)}}function PE(t){var e=function(t,e){if("object"!=bE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bE(e)?e:String(e)}function SE(t,e){return(SE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _E(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=OE(t);if(e){var o=OE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return QE(this,r)}}function QE(t,e){if(e&&("object"===bE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OE(t){return(OE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var DE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SE(t,e)}(i,t);var e,r,n,o=_E(i);function i(){var t;return BE(this,i),(t=o.apply(this,arguments)).paramModelConstructor=gr,t}return e=i,(r=[{key:"parseParamModelAssemblies",value:function(t){var e=this;return t.forEach((function(t){var r=(new Pr).parse(t,e,{isRootWorldMatrix:!0});e.addParamModelAssembly(r)})),this}}])&&wE(e.prototype,r),n&&wE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_m);function xE(t){return(xE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ME(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TE(n.key),n)}}function TE(t){var e=function(t,e){if("object"!=xE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xE(e)?e:String(e)}function jE(){return(jE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LE(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function LE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=GE(t)););return t}function kE(t,e){return(kE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function NE(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=GE(t);if(e){var o=GE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FE(this,r)}}function FE(t,e){if(e&&("object"===xE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function GE(t){return(GE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var UE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kE(t,e)}(i,t);var e,r,n,o=NE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ME(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return DE}},{key:"generate",value:function(t){return t=jE(GE(i.prototype),"generate",this).call(this,t)}}])&&RE(e.prototype,r),n&&RE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qe.CoreParamModelAssemblyBackup);function zE(t){return(zE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function YE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,VE(n.key),n)}}function VE(t){var e=function(t,e){if("object"!=zE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zE(e)?e:String(e)}function qE(){return(qE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=WE(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function WE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ZE(t)););return t}function KE(t,e){return(KE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function JE(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ZE(t);if(e){var o=ZE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return XE(this,r)}}function XE(t,e){if(e&&("object"===zE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ZE(t){return(ZE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&KE(t,e)}(i,t);var e,r,n,o=JE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return YE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return DE}},{key:"generate",value:function(t){return t=qE(ZE(i.prototype),"generate",this).call(this,t)}}])&&HE(e.prototype,r),n&&HE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qe.CoreParamModelBackup),tC=r(332);function eC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new DE;e.parseParamModels(t.paramModels).parseParamModelGroups(t.paramModelGroups).parseParamModelAssemblies(t.paramModelCombinations);var r=e.getParamModelAssemblies(),n=e.getParamModels().filter((function(t){return!t.isAccessory()}));return Object(Or.uniqBy)(tC.ParamModelUtils.collectAccessories(n),"id").forEach((function(t){t.toLocalMatrix()})),{paramModels:n,paramModelAssemblies:r}}var rC=Math.sqrt(2),nC=Math.PI/6,oC=Math.PI/3+Math.PI;function iC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oC,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nC,n=t.getPosition(),o=t.getSize(),i=n.clone(),a=o.length()*rC,s=new _e.default(Math.cos(r)*Math.cos(e),Math.cos(r)*Math.sin(e),Math.sin(r)).mul(a).applyMatrix4(t.getMatrix());return{lookAt:i,position:s}}var aC,sC=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,t,e)}))};function uC(t){var e,r,n,o=function(t){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t.call.apply(t,[this].concat(r))}};return{promise:new Promise((function(i,a){e=o(i),r=o(a),"number"==typeof t&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(t,"ms")))}),t))})),resolve:e,reject:r}}function cC(t){return(cC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function AC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?AC(Object(r),!0).forEach((function(e){fC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fC(t,e,r){var n;return n=function(t,e){if("object"!=cC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==cC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hC(t){return t["@type"]===X.THROUGH_SHELL}function pC(t){var e=t.elements;return(new or.Matrix4).set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function dC(t,e){return _e.default.sub(t,e.clone().mul(_e.default.dot2(t,e)/_e.default.dot2(e,e)))}function gC(t){return(gC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yC(t,e,r){var n;return n=function(t,e){if("object"!=gC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vC(t,e){var r=t.getSize(),n=(new Pe.default).getInverse(t.getConcatenatedMatrix()),o=e.clone().applyMatrix4(pC(n)),i=o.x,a=o.y,s=o.z,u=yC(yC(yC(yC(yC(yC({},aC.TOP,Math.abs(s-r.z/2)),aC.LEFT,Math.abs(i+r.x/2)),aC.BACK,Math.abs(a+r.y/2)),aC.RIGHT,Math.abs(i-r.x/2)),aC.FRONT,Math.abs(a-r.y/2)),aC.BOT,Math.abs(s+r.z/2)),c=Object.entries(u).reduce((function(t,e){return e[1]<t[1]?e:t}));return c[1]<.01?+c[0]:aC.UNKNOWN}function mC(t){if(t instanceof Pr)return t;var e=t.getRoot(),r=e.getAssembly();return r||e}function IC(t){return(IC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function EC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function CC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?EC(Object(r),!0).forEach((function(e){bC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bC(t,e,r){var n;return n=function(t,e){if("object"!=IC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=IC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==IC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.UNKNOWN=-1]="UNKNOWN",t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.BACK=2]="BACK",t[t.RIGHT=3]="RIGHT",t[t.FRONT=4]="FRONT",t[t.BOT=5]="BOT"}(aC||(aC={}));var BC={getJsonConfig:{defaultTemplateId:void 0,ignoreResetPosition:!1}};function wC(t){return BC[t]}function PC(t){return t<1?{transparent:!0,opacity:t,depthWrite:!1}:{transparent:!1,opacity:t,depthWrite:!0}}function SC(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e&&(t.outlineMode=or.OutlineMode.Disabled),r&&or.TypeAssert.isMesh(t)&&(t.useOriginMaterialInTransparentMode=!0),n&&(t.castPlanarShadow=!1,t.castShadow=!1)}var _C=[];function QC(t){return(QC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var OC,DC=["paramModelData"],xC=["paramModelData"];function MC(t){return function(t){if(Array.isArray(t))return RC(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return RC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RC(t,e)}(t)||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 RC(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function TC(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function jC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TC(i,n,o,a,s,"next",t)}function s(t){TC(i,n,o,a,s,"throw",t)}a(void 0)}))}}function LC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */LC=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==QC(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(QC(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kC(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function NC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,GC(n.key),n)}}function GC(t){var e=function(t,e){if("object"!=QC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=QC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QC(e)?e:String(e)}function UC(t,e){return(UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zC(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=HC(t);if(e){var o=HC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return YC(this,r)}}function YC(t,e){if(e&&("object"===QC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function HC(t){return(HC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.design="design",t.series="series"}(OC||(OC={}));var VC=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&UC(t,e)}(i,t);var e,r,n,o=zC(i);function i(){var t;return NC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({main:lI.READY,design:lI.READY,series:lI.READY}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionLoad=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o,i,a;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e);case 2:return n=t.sent,o=n.paramModelData,i=kC(n,DC),a=(new gr).parse(o),Object(kI.attach)(a,Object(kI.toAttachedMap)(i)),t.next=9,xI.updateAttacheds([a]);case 9:return r.core.design.getCustom().addParamModels(a),r.core.fittingDesign.setFittings(_C),t.next=13,Object(nE.put)(this.$actionLoad.done.message({params:e,result:lI.SUCCESS}));case 13:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddModelToSense=t.unitCreator.async((function(e){e.started.latest((function(t,e){var r=this,n=t.custom,o=t.needAttach;return LC().mark((function t(){var i,a,s,u;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.getParamModels(),a=n.getParamModelAssemblies(),!o){t.next=5;break}return t.next=5,Promise.all(i.map(function(){var t=jC(LC().mark((function t(e){var r;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(kI.attach)(e,Object(kI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:if(e.core.design.setCustom(n),s=i.filter((function(t){return!t.getAssembly()})),!o){t.next=11;break}return u=[].concat(MC(s),MC(a)),t.next=11,xI.updateAttacheds(u);case 11:return t.next=13,Object(nE.put)(r.$actionAddModelToSense.done.message({params:{custom:n,needAttach:o},result:lI.SUCCESS}));case 13:case"end":return t.stop()}}),t)}))()})),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAutoRefreshModel=t.unitCreator.sync((function(t){})),t.$actionAddParamModelToSense=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.map((function(t){var e=t.paramModelData,r=kC(t,xC),n=(new gr).parse(e,new DE);return Object(kI.attach)(n,Object(kI.toAttachedMap)(r)),n})),t.next=3,xI.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,MC(o)),t.next=6,Object(nE.put)(this.$actionAddParamModelToSense.done.message({params:e,result:lI.SUCCESS}));case 6:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddParamModelAssemblyToSense=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o,i,a;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.design.getCustom(),o=new DE,i=e.map((function(t){return(new Pr).parse(t,o)})),a=o.getParamModels(),t.next=6,Promise.all(a.map(function(){var t=jC(LC().mark((function t(e){var r;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(kI.attach)(e,Object(kI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:return t.next=8,xI.updateAttacheds(MC(i));case 8:return n.addParamModelAssemblies.apply(n,MC(i)),n.addParamModels.apply(n,MC(a)),t.next=12,Object(nE.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:e,result:lI.SUCCESS}));case 12:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&FC(e.prototype,r),n&&FC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function qC(t){return(qC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JC(n.key),n)}}function KC(t,e,r){return e&&WC(t.prototype,e),r&&WC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function JC(t){var e=function(t,e){if("object"!=qC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qC(e)?e:String(e)}function XC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZC(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$C(t,e)}function $C(t,e){return($C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rb(t);if(e){var o=rb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eb(this,r)}}function eb(t,e){if(e&&("object"===qC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rb(t){return(rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}pu.AXR;var nb=function(t){ZC(r,t);var e=tb(r);function r(){return XC(this,r),e.apply(this,arguments)}return KC(r)}(pu.AXRPartial),ob=(pu.AXRManager,r(155));function ib(t){return(ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ab(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ab=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ib(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ib(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function sb(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function ub(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sb(i,n,o,a,s,"next",t)}function s(t){sb(i,n,o,a,s,"throw",t)}a(void 0)}))}}var cb=function(){var t=ub(ab().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f;return ab().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_(),n=r.baseDesignInfo,t.next=3,n.getCurrentBaseDesignInfo();case 3:return o=t.sent,i=o.designId,a=o.levelid,s={modelid:null!=e?e:"",designid:i,levelid:a,toolType:0},u=n.getStateManager().core.design.getCustom(),e||((c=u.getParamModelAssemblies()).length?s.modelid=c[0].id:(A=u.getParamModels().filter((function(t){return!t.isAppendHardware}))).length&&(s.modelid=A[0].id)),t.next=11,n.getCurrentCustomData(null!=e?e:s.modelid);case 11:return l=t.sent,f=l.toolType,s.toolType=f,t.abrupt("return",s);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ab=function(t){var e=Vd().getStateManager().pad,r=V_().viewParamModel.state.state.currModelId,n=e.findModelOrAssemblyModelById(t);if(n){var o=n.getIdPath(),i=n.getRoot();if(i instanceof gr){var a=i.getAssembly();a&&o.unshift(a.id)}return o.includes(r)?n:void 0}},lb=function(t){var e,r;if(t instanceof Pr)return t.getInvisible();for(;t;){if(t.getInvisible())return!0;r=t,t=t.getParent()}return(null===(e=null==r?void 0:r.getAssembly())||void 0===e?void 0:e.getInvisible())||!1},fb=function(){var t=ub(ab().mark((function t(e){var r,n,o,i,a;return ab().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_(),n=r.scene,o=n.getStateManager(),i=o.scene3D,a=uC(5e3),i.once(ob.h.CameraUpdate.symbol,(function(){return a.resolve()})),i.updateCameraAttributes(e),t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function hb(t){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function db(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pb(Object(r),!0).forEach((function(e){gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gb(t,e,r){return(e=Cb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yb(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vb(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yb(i,n,o,a,s,"next",t)}function s(t){yb(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mb=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==hb(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(hb(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Ib(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cb(n.key),n)}}function Cb(t){var e=function(t,e){if("object"!=hb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hb(e)?e:String(e)}function bb(){return(bb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Bb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Bb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_b(t)););return t}function wb(t,e){return(wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_b(t);if(e){var o=_b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sb(this,r)}}function Sb(t,e){if(e&&("object"===hb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _b(t){return(_b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qb(t){return function(t){if(Array.isArray(t))return Ob(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ob(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(t,e)}(t)||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 Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Db={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function xb(t){return Object(Or.values)(t).some((function(t){return Object(Or.isEmpty)(t)}))}function Mb(t,e){var r=t.getParamModelAssemblies().find((function(t){return t.id===e}));if(r||(r=t.getParamModels().find((function(t){return t.id===e}))),!r)return[];for(var n=[],o=[r];o.length;){var i=o.shift();n.push(i.id),o.push.apply(o,Qb(i.getChildNodes()))}return n}function Rb(t){return Object(Or.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(e){return Object(Or.keys)(t[e]).sort()})).flat())}function Tb(t,e){var r=new Set(e);return t.filter((function(t){return!r.has(t)}))}var jb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wb(t,e)}(i,t);var e,r,n,o=Pb(i);function i(){var t;return Ib(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({autoSave:!0,designLoading:AI.FAIL,design:Object(Or.cloneDeep)(Db)}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(mb().mark((function t(e,r){var n,o,i,a,s,u,c,A;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.done.messageType(),i=this.$actionRestoreFittingDesign.messageType(),a=n.$actionAutoRefreshModel.messageType(),t.next=7,Object(nE.take)([o,i,a]);case 7:s=r.core,u=s.fittingDesign,c=s.design,u.setFittings([]),u.setGrooveFittings([]),c.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V1&&t.dispose()})),A=this.state.state.design,this.fittingAddDataToFittingDesignSense(A),this.getAxr(rE).loadFittingHardwareToSense({hardware:A.hardwares}),t.next=1;break;case 17:case"end":return t.stop()}}),t,this)})))})),t.$actionEnableAutoSave=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.autoSave=e}))})),t.initFittingDesign=function(){t.$actionRestoreFittingDesign.dispatch(Object(Or.cloneDeep)(Db))},t.getConnectedFittingDesign=function(){var e=vb(mb().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h=arguments;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],o=t.state.state.design,r){e.next=4;break}return e.abrupt("return",Object(Or.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){e.next=26;break}a=o.hardwares||{},e.t0=mb().keys(a);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(c=e.t1.value,!a.hasOwnProperty(c)){e.next=16;break}if(!(A=Object(Or.find)(a[c]||[],(function(t){return t.id===r})))){e.next=16;break}return u=c,s=A,e.abrupt("break",18);case 16:e.next=8;break;case 18:if(s&&u){e.next=20;break}throw new Error("当前五金不存在!");case 20:l=s.linkedIds,f=function(t){return l.includes(t.id)},i.holes[u]=Object(Or.filter)(o.holes[u],f),i.grooves[u]=Object(Or.filter)(o.grooves[u],f),e.next=27;break;case 26:Object(Or.keys)(i).forEach((function(t){o[t]&&o[t][r]&&(i[t][r]=Object(Or.cloneDeep)(o[t][r]))}));case 27:return e.abrupt("return",i);case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.fittingAddDataToFittingDesignSense=function(){var e=vb(mb().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sC(1);case 2:n=t.stateManager.core,o=n.fittingDesign,i=n.pad,a=V_().fittingDesign.senseSetting.getSenseSettings(),s=Object(Or.pick)(a,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,A=r.grooves,l=void 0===A?{}:A,f=r.hardwareGrooves,h=void 0===f?{}:f,p={findRelativeModel:i.findModelOrAssemblyModelById,transformModel:Ps},o.setFittings([].concat(Qb(Zd(c,db(db({},p),{},{type:J.HOLE,defaultConfig:s}))),Qb(Zd(l,db(db({},p),{},{type:J.GROOVE,defaultConfig:s}))))),o.setGrooveFittings(Zd(h,db(db({},p),{},{type:J.HARDWARE_GROOVE,transformModel:hu,defaultConfig:s})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.appendFittingDataToFittingDesign=function(){var e=vb(mb().mark((function e(r,n){var o,i,a,s,u,c,A,l,f,h,p;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.state.state,a=i.design,s=i.autoSave,u=!r.id||r.id===a.id,c=Db,A=n.timeout,l=n.save,f=void 0===l?s:l,h={id:null!==(o=r.id)&&void 0!==o?o:a.id,holes:db(db({},u?a.holes:c.holes),r.holes||{}),grooves:db(db({},u?a.grooves:c.grooves),r.grooves||{}),hardwares:db(db({},u?a.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:db(db({},u?a.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Or.pull)(Object(Or.keys)(h),"id").forEach((function(t){var e=h[t];Object(Or.keys)(e).forEach((function(t){0===e[t].length&&delete e[t]}))})),!f){e.next=12;break}return p=uC(A),t.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),e.abrupt("return",p.promise);case 12:t.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.$actionRestoreFittingDesign=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.design=e}))})),t.$actionLoadFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s=this;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$actionLoadFittingDesign,o=e.params,t.next=4,cb(o.modelid);case 4:return i=t.sent,t.prev=5,t.next=8,DL(db(db({},o),i));case 8:a=t.sent,pu.Util.safeExec((function(){var t=r.core.design.getCustom(),n=s.getAxr($w).state.state.currModelId;if(n===e.params.modelid&&a){var o=Mb(t,n),i=Rb(a),u=Tb(i,o);yI(sm).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:i.join(","),notExistsIds:u.join(","),notExistsIdsCount:!!u.length})}})),n.done.dispatch({params:e,result:{designData:a,modelId:i.modelid}}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(5),n.failed.dispatch({params:e});case 16:case"end":return t.stop()}}),t,this,[[5,13]])}))),t.done.every((function(t,e){var r=this.$actionRestoreFittingDesign,n=t.result.designData?t.result.designData:Object(Or.cloneDeep)(Db),o=this.getAxr($w).state.state.currModelId;t.result.modelId===o&&r.dispatch(n);var i=t.params.defer;i&&i.resolve(t.result.designData)})),t.failed.every((function(t,e){var r,n=this.getAxr($w).state.state.currModelId;(null===(r=t.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var o=t.params.defer;o&&o.reject(new Error("load fitting design error"))}))})),t.$actionClearFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr($w).state.state.currModelId,o=e.modelId,i=void 0===o?n:o,t.next=4,cb(i);case 4:return a=t.sent,s=this.$actionClearFittingDesign,t.prev=6,t.next=9,jL(a);case 9:s.done.dispatch({params:e,result:void 0}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),s.failed.dispatch({params:e});case 15:case"end":return t.stop()}}),t,this,[[6,12]])}))),t.done.every(mb().mark((function t(e,r){var n,o,i;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=this.getAxr($w).state.state.currModelId,(null!==(n=e.params.modelId)&&void 0!==n?n:o)===o&&this.initFittingDesign(),(i=e.params.defer)&&i.resolve();case 5:case"end":return t.stop()}}),t,this)}))),t.failed.every(mb().mark((function t(e,r){var n;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return t.stop()}}),t)})))})),t.$actionSaveFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s,u=this;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.state.state.design,o=e.design,i=void 0===o?n:o,t.next=4,cb(i.id);case 4:return a=t.sent,s=this.$actionSaveFittingDesign,pu.Util.safeExec((function(){var t=yI(sm),e=u.getAxr($w).state.state.currModelId,o=r.core.design.getCustom();if(i&&(!i.id||e===a.modelid)){var s=Mb(o,e),c=Rb(i),A=Tb(c,s);xb(Object(Or.omit)(n,["id"]))?t.log({logKey:"FittingDesignCreate",modelId:a.modelid,allModelIds:s.join(","),fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length}):t.log({logKey:"FittingDesignUpdate",modelId:a.modelid,fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length})}})),t.prev=7,t.next=10,TL(db(db({},i),{},{id:a.modelid}),a);case 10:s.done.dispatch({params:e,result:void 0}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(7),s.failed.dispatch({params:e,result:t.t0});case 16:case"end":return t.stop()}}),t,this,[[7,13]])}))),t.failed.every(mb().mark((function t(e,r){var n,o;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&(o=e.result||new Error("保存失败"),n.reject(o));case 2:case"end":return t.stop()}}),t)}))),t.done.every(mb().mark((function t(e,r){var n,o,i;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.params.design,o=this.getAxr($w).state.state.currModelId,!n||n.id&&n.id!==o||this.$actionRestoreFittingDesign.dispatch(n),(i=e.params.defer)&&setTimeout((function(){i.resolve()}));case 5:case"end":return t.stop()}}),t,this)})))})),t}return e=i,(r=[{key:"init",value:function(){bb(_b(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Eb(e.prototype,r),n&&Eb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function Lb(t){return(Lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kb(t){return function(t){if(Array.isArray(t))return Nb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(t,e)}(t)||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 Nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Fb=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Lb(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lb(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ub(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zb(n.key),n)}}function zb(t){var e=function(t,e){if("object"!=Lb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Lb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Lb(e)?e:String(e)}function Yb(){return(Yb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Hb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Hb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kb(t)););return t}function Vb(t,e){return(Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kb(t);if(e){var o=Kb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wb(this,r)}}function Wb(t,e){if(e&&("object"===Lb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kb(t){return(Kb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vb(t,e)}(i,t);var e,r,n,o=qb(i);function i(){var t;return Gb(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshFittingHint=t.unitCreator.sync((function(t){t.latest(Fb().mark((function t(){var e,r;return Fb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateFittingHintConf=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){Yb(Kb(i.prototype),"init",this).call(this),this.$actionRefreshFittingHint.dispatch()}},{key:"setFittingHint",value:function(t){this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"clearFittingHint",value:function(t){var e=t?Object(Or.omit)(this.state.state.option,t):{};this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"setFittingHardwareHint",value:function(t){var e=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),r=Object(Or.fromPairs)(e.map((function(t){return t.hardwareData?[t.hardwareData.id,t.id]:[]})).filter((function(t){return 2===t.length})));V_().scene.$actionModelHint.dispatch(Object(Or.mapKeys)(t,(function(t,e){return r[e]||""})))}},{key:"clearFittingHardwareHint",value:function(t){t||V_().scene.$actionModelHint.dispatch({});var e=Object(Or.castArray)(t),r=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),n=Object(Or.fromPairs)(r.map((function(t){return t.hardwareData?[t.id,t.hardwareData.id]:[]})).filter((function(t){return 2===t.length}))),o=V_().scene.state.state.overrideMaterialOption;V_().scene.$actionModelHint.dispatch(Object(Or.omitBy)(o,(function(t,r){var o=n[r];return!!o&&e.includes(o)})))}},{key:"rerenderToSense",value:function(){var t=this.state.state.option,e=this.stateManager.core,r=e.design,n=e.fittingDesign,o=r.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),i=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getArcSquareGrooveModels(),A=n.getRoundCornerGrooveModels(),l=n.getSpecialShapedGrooveModels(),f=n.getPathGrooveModels(),h=Object(Or.map)(t,(function(t,e){var r=[].concat(kb(o),kb(i),kb(a),kb(s),kb(u),kb(A),kb(l),kb(f),kb(c)).find((function(t){return t.id===e}));if(r)return new un({linkModel:r,hintOutline:t.outline})})).filter((function(t){return!!t}));n.setFittingHintModels(h)}}])&&Ub(e.prototype,r),n&&Ub(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function Xb(t){return(Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$b(n.key),n)}}function $b(t){var e=function(t,e){if("object"!=Xb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xb(e)?e:String(e)}var tB=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.__changeMap={}}var e,r,n;return e=t,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({field:"isHidden"},this.isHidden,t),this.isHidden=t}},{key:"__trackUpdateField",value:function(t,e,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,o=t.field;e===r||n.some((function(t){return t.field===o}))||n.push({field:o})}}])&&Zb(e.prototype,r),n&&Zb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function eB(t){var e,r=new tB;if(r.id=t.id,t instanceof gr){if(!t.isAppendHardware)return;e=J.HARDWARE,r.isHidden=t.getInvisible(),r.originalData=t.hardwareData}else t instanceof Cn||t instanceof mo?(r.isHidden=!t.visible,e=t.type,r.originalData=t.fittingData):(r.isHidden=!t.visible,e=t.type,r.originalData=t.data);return r.linkParamModelId=t.linkParamModelId,r.modelType=e,r}function rB(t){return(rB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nB(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=iB(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function oB(t){return function(t){if(Array.isArray(t))return aB(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||iB(t)||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 iB(t,e){if(t){if("string"==typeof t)return aB(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?aB(t,e):void 0}}function aB(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cB(n.key),n)}}function cB(t){var e=function(t,e){if("object"!=rB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rB(e)?e:String(e)}function AB(t,e){return(AB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hB(t);if(e){var o=hB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fB(this,r)}}function fB(t,e){if(e&&("object"===rB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hB(t){return(hB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pB=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&AB(t,e)}(i,t);var e,r,n,o=lB(i);function i(){return sB(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAllFittingModels",value:function(t){var e=new Set;if(t){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(t);if(!r)return[];for(var n=[r];n.length;){var o=n.shift();e.add(o.id),n.push.apply(n,oB((null==o?void 0:o.getChildNodes())||[]))}}var i=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),a=this.stateManager.core.fittingDesign.getFittings(),s=this.stateManager.core.fittingDesign.getGrooveFittings(),u=this.stateManager.core.fittingDesign.getHoleModels(),c=this.stateManager.core.fittingDesign.getSquareGrooveModels(),A=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),l=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),f=this.stateManager.core.fittingDesign.getPathGrooveModels(),h=[].concat(oB(i),oB(a),oB(s),oB(u),oB(c),oB(A),oB(l),oB(f));return e.size>0&&(h=h.filter((function(t){return e.has(t.linkParamModelId)}))),h.map((function(t){return eB(t)}))}},{key:"findHardwareParamModels",value:function(t){var e,r=[],n=nB(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.isAppendHardware&&r.push(o),r.push.apply(r,oB(this.findHardwareParamModels(o.getChildNodes())))}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"save",value:function(t){var e,r=[],n=[],o=nB(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;i.modelType===J.HARDWARE?r.push(i):n.push(i)}}catch(t){o.e(t)}finally{o.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(t){var e=this.stateManager.core.pad;t.forEach((function(t){var r=e.findModelOrAssemblyModelById(t.id);if(r){var n=t.__changeMap.update;(void 0===n?[]:n).forEach((function(e){"isHidden"===e.field&&r.setInvisible(t.getHidden())})),t.__changeMap.update=[]}})),dL().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(t){var e=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getHoleModels(),o=this.stateManager.core.fittingDesign.getSquareGrooveModels(),i=this.stateManager.core.fittingDesign.getArcSquareGrooveModels(),a=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),s=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),u=this.stateManager.core.fittingDesign.getPathGrooveModels(),c=this.stateManager.core.fittingDesign.getFittingHintModels();t.forEach((function(t){var A;t.modelType===J.HARDWARE_GROOVE?A=r.find((function(e){return e.id===t.id})):t.modelType===J.HOLE||t.modelType===J.GROOVE?A=e.find((function(e){return e.id===t.id})):t.modelType===J.HOLE_V2?A=n.find((function(e){return e.id===t.id})):t.modelType===J.SQUARE_GROOVE?A=[].concat(oB(o),oB(i)).find((function(e){return e.id===t.id})):t.modelType===J.ROUND_CORNER_GROOVE?A=a.find((function(e){return e.id===t.id})):t.modelType===J.SPECIAL_SHAPED_GROOVE?A=s.find((function(e){return e.id===t.id})):t.modelType===J.PATH_GROOVE&&(A=u.find((function(e){return e.id===t.id})));var l=c.find((function(e){return e.linkModel.id===t.id}));if(A){var f=t.__changeMap.update;(void 0===f?[]:f).forEach((function(e){"isHidden"===e.field&&(null==A||A.setVisible(!t.getHidden()),null==l||l.setVisible(!t.getHidden()))})),t.__changeMap.update=[]}}))}}])&&uB(e.prototype,r),n&&uB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function dB(t){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var gB=["holes","grooves"];function yB(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vB(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yB(i,n,o,a,s,"next",t)}function s(t){yB(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mB(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function IB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mB(Object(r),!0).forEach((function(e){EB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function EB(t,e,r){return(e=_B(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function bB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bB=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==dB(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(dB(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function BB(t){return function(t){if(Array.isArray(t))return wB(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return wB(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wB(t,e)}(t)||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 wB(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function PB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_B(n.key),n)}}function _B(t){var e=function(t,e){if("object"!=dB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dB(e)?e:String(e)}function QB(){return(QB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=OB(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function OB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=RB(t)););return t}function DB(t,e){return(DB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function xB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=RB(t);if(e){var o=RB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return MB(this,r)}}function MB(t,e){if(e&&("object"===dB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function RB(t){return(RB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var TB=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&DB(t,e)}(a,t);var e,r,n,o,i=xB(a);function a(){var t;return PB(this,a),(t=i.apply(this,arguments)).state=t.stateCreator.create({fittings:[],hardwares:[]}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionAddFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.fittings=[].concat(BB(t.fittings),[e])}))})),t.$actionClearFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.fittings=[]}))})),t.$actionAddHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.hardwares=[].concat(BB(t.hardwares),[e])}))})),t.$actionClearHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.hardwares=[]}))})),t.$actionViewerInit=t.unitCreator.sync((function(t){t.latest(bB().mark((function t(e,r){var n,o;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(nE.take)([o]);case 5:this.clearHardware(),this.clearFitting(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshFittingViewer=t.unitCreator.sync((function(t){t.latest(bB().mark((function t(){var e,r,n,o,i=this;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:n=this.state.state.hardwares,o=this.state.state.fittings,this.clearHardware(),this.clearFitting(),o.forEach((function(t){return i.addFitting(t)})),n.forEach((function(t){return i.addHardware(t)})),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.addFitting=function(e){var r,n,o=Object(Or.cloneDeep)(e);return null===(r=o.holes)||void 0===r||r.forEach((function(t){Object(Or.isNil)(t.holeId)&&(t.holeId=Object(Xr.default)())})),null===(n=o.grooves)||void 0===n||n.forEach((function(t){Object(Or.isNil)(t.grooveId)&&(t.grooveId=Object(Xr.default)())})),t.addDataToFittingViewer(o),t.$actionAddFitting.dispatch(o),o},t.clearFitting=function(){var e=t.stateManager.core.fittingDesign;e.setHoleModels([]),e.setSquareGrooveModels([]),e.setArcSquareGrooveModels([]),e.setRoundCornerGrooveModels([]),e.setSpecialShapedGrooveModels([]),e.setPathGrooveModels([]),t.$actionClearFitting.dispatch()},t.getFitting=function(e){var r=t.state.state.fittings,n=Object(Or.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.getHardware=function(e){var r=t.state.state.hardwares,n=Object(Or.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.addDataToFittingViewer=function(e){var r,n,o,i,a,s,u,c,A,l,h,p=t.stateManager.core.fittingDesign,d=V_().fittingDesign.senseSetting.getSenseSettings(),g=Object(Or.pick)(d,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),y={findRelativeModel:Ab},v=e.holes,m=e.grooves,I=CB(e,gB),E=!!e.finishedProfile&&!Object(Or.isNil)(e.arcPlane);if(v&&(s=v.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:rg}),{color:g.holeColor,opacity:g.holeOpacity})}))),m){var C=Object(Or.groupBy)(m,"geometryType");E?c=null===(r=C[f.SQUARE])||void 0===r?void 0:r.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:hg}),{color:g.grooveColor,opacity:g.grooveOpacity})})):u=null===(n=C[f.SQUARE])||void 0===n?void 0:n.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:Wi}),{color:g.grooveColor,opacity:g.grooveOpacity})})),A=null===(o=C[f.ROUND_CORNER])||void 0===o?void 0:o.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:ng}),{color:g.grooveColor,opacity:g.grooveOpacity})})),l=null===(i=C[f.SPECIAL_SHAPED])||void 0===i?void 0:i.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:og}),{color:g.grooveColor,opacity:g.grooveOpacity})})),h=null===(a=C[f.PATH])||void 0===a?void 0:a.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:ig}),{color:g.grooveColor,opacity:g.grooveOpacity})}))}s&&s.length>0&&p.addHoleModels(s),u&&u.length>0&&p.addSquareGrooveModels(u),c&&c.length>0&&p.addArcSquareGrooveModels(c),A&&A.length>0&&p.addRoundCornerGrooveModels(A),l&&l.length>0&&p.addSpecialShapedGrooveModels(l),h&&h.length>0&&p.addPathGrooveModels(h)},t.addHardwareToViewer=function(){var e=vB(bB().mark((function e(r){var n,o,i,a;return bB().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.modelId,o=r.hardwares,i=Ab(n)){e.next=4;break}throw new Error("".concat(n," 关联的模型不存在"));case 4:return a=Ag(i),e.next=7,t.getAxr(rE).loadFittingHardwareToSense({hardware:EB({},a.id,o)},ge.V2);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=a,(r=[{key:"init",value:function(){QB(RB(a.prototype),"init",this).call(this),this.$actionViewerInit.dispatch(),this.$actionRefreshFittingViewer.dispatch()}},{key:"initFittingViewer",value:function(){this.clearHardware(),this.clearFitting()}},{key:"addHardware",value:(o=vB(bB().mark((function t(e){var r,n;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(Or.cloneDeep)(e),null===(r=n.hardwares)||void 0===r||r.forEach((function(t){Object(Or.isNil)(t.id)&&(t.id=Object(Xr.default)())})),t.next=4,this.addHardwareToViewer(n);case 4:return this.$actionAddHardware.dispatch(n),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"clearHardware",value:function(){this.stateManager.core.design.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V2&&t.dispose()})),this.$actionClearHardware.dispatch()}}])&&SB(e.prototype,r),n&&SB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(nb);function jB(t){return(jB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var LB=["modelId","defer"],kB=["timeout","modelId"];function NB(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FB(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function GB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?FB(Object(r),!0).forEach((function(e){UB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function UB(t,e,r){return(e=qB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function YB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */YB=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==jB(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(jB(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function HB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qB(n.key),n)}}function qB(t){var e=function(t,e){if("object"!=jB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jB(e)?e:String(e)}function WB(){return(WB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=KB(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function KB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$B(t)););return t}function JB(t,e){return(JB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function XB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$B(t);if(e){var o=$B(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ZB(this,r)}}function ZB(t,e){if(e&&("object"===jB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $B(t){return($B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JB(t,e)}(s,t);var e,r,n,o,i,a=XB(s);function s(){var t;return HB(this,s),(t=a.apply(this,arguments)).state=t.stateCreator.create({intersectedLoading:AI.FAIL,intersectedResult:void 0,intersectedVisible:!1}),t.$reducerState=t.reducerCreator.create(t.state),t._getParamModelIntersectedCallback=[],t.$actionRefreshIntersect=t.unitCreator.sync((function(t){t.latest(YB().mark((function t(){var e,r,n;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:(n=this.state.state.intersectedResult)&&this.$actionAddIntersectedDataToSense.dispatch(n),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionLoadParamModelIntersectedData=t.unitCreator.async((function(e){e.started.every(YB().mark((function t(e,r){var n,o,i,a,s,u,c,A,l;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,cb(e.modelId);case 2:return n=t.sent,o=yI(rm),i=e.modelId,a=void 0===i?n.modelid:i,s=e.defer,u=zB(e,LB),c=V_().viewParamModel.state.state.currModelId===a,A=this.$actionLoadParamModelIntersectedData,t.prev=7,t.next=10,o.getIntersectedById(GB({modelId:a},u));case 10:if(l=t.sent,!c){t.next=14;break}return t.next=14,A.done.dispatch({params:e,result:{result:l,modelId:a}});case 14:s&&s.resolve(l),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(7),this._getParamModelIntersectedCallback.forEach((function(e){e.reject(t.t0)}));case 21:case"end":return t.stop()}}),t,this,[[7,17]])}))),e.done.every((function(e,r){var n=e.params.defer,o=V_().viewParamModel.state.state.currModelId;n&&n.resolve(e.result.result),e.result.modelId===o&&t.$actionAddIntersectedDataToSense.dispatch(e.result.result)})),e.started.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.LOADING})),e.done.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.SUCCESS,t.intersectedResult=e.result.result})),e.failed.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.FAIL}))})),t.$actionAddIntersectedDataToSense=t.unitCreator.sync((function(e){e.every((function(e,r){var n=r.core,o=n.fittingDesign,i=n.pad,a=t.state.state.intersectedVisible,s=t.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),u=s.intersectedColor,c=s.intersectedBodyColor,A=s.intersectedThroughColor,l=s.grooveIntersectedColor,f=s.grooveIntersectedBodyColor;o.setIntersects([]);var h=e.option,p=void 0===h?{}:h,d=e.intersectedGroups,g=Object(Or.map)(d,(function(t){var e=!0===p.references?1:0,r=t.intersecteds[e],n=r["@type"],o=t.intersectType;if(void 0!==p.plankFaceIds){var a=hC(r)||Object(Or.isNil)(r.plankFaceId)?null:r.plankFaceId;if(!p.plankFaceIds.includes(a))return!1}var s=i.findModelOrAssemblyModelById(r.linkedModelId);if(s){var h=Ks(t,r,s),d=new Map([[$.BOTH_PLANK,new Map([[X.FACE,u],[X.SHELL,c],[X.THROUGH_SHELL,A]])],[$.PLANK_FURNITURE,new Map([[X.FACE,l],[X.SHELL,f]])]]).get(o).get(n);return h.setViewColor(d),h}})).filter((function(t){return!!t}));o.setIntersects(g),a||r.kaf.invisibleManager.hide("scene3d",CI,g.map((function(t){return t.id})))}))})),t.$actionToggleShowIntersected=t.unitCreator.sync((function(e){e.latest((function(t,e){var r=e.core.fittingDesign;t?e.kaf.invisibleManager.display("scene3d",CI,r.getIntersects().map((function(t){return t.id}))):e.kaf.invisibleManager.hide("scene3d",CI,r.getIntersects().map((function(t){return t.id})))})),e.produce(t.$reducerState,(function(t,e){t.intersectedVisible=e}))})),t.toggleShowIntersectGroupData=function(e){var r=t.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");t.$actionAddIntersectedDataToSense.dispatch(GB(GB({},r),{},{option:e}))},t}return e=s,(r=[{key:"init",value:function(){WB($B(s.prototype),"init",this).call(this),this.$actionRefreshIntersect.dispatch()}},{key:"getParamModelIntersectedData",value:(o=YB().mark((function t(e){var r,n,o,i,a,s,u,c,A,l=this;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_().viewParamModel.state.state.currModelId,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r:a,u=zB(n,kB),c=uC(i),this.$actionLoadParamModelIntersectedData.started.dispatch(GB(GB({modelId:s},u),{},{defer:c,timeout:i})),this._getParamModelIntersectedCallback.push(c),A=function(){var t=l._getParamModelIntersectedCallback.indexOf(c);l._getParamModelIntersectedCallback.splice(t,1)},t.abrupt("return",c.promise.then((function(t){return A(),t})).catch((function(t){return A(),Promise.reject(t)})));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){NB(i,r,n,a,s,"next",t)}function s(t){NB(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&VB(e.prototype,r),n&&VB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(nb);function ew(t){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rw(Object(r),!0).forEach((function(e){ow(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ow(t,e,r){var n;return n=function(t,e){if("object"!=ew(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ew(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ew(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iw(t,e){var r=e.x,n=e.y,o=e.z;[0,5].includes(t)&&(r-=.1,n-=.1),[1,3].includes(t)&&(o-=.1,r-=.1),[2,4].includes(t)&&(o-=.1,n-=.1);var i=r/2,a=n/2,s=o/2,u=[{x:-i,y:-a,z:s},{x:i,y:-a,z:s},{x:i,y:a,z:s},{x:-i,y:a,z:s}],c=u.map((function(t){return nw(nw({},t),{},{z:-t.z})}));switch(t){case 0:return u;case 1:return[u[0],c[0],c[3],u[3]];case 2:return[u[0],c[0],c[1],u[1]];case 3:return[u[1],c[1],c[2],u[2]];case 4:return[u[2],c[2],c[3],u[3]];case 5:return c}return[]}function aw(t){return(aw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sw=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==aw(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(aw(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aw(n.key),n)}}function Aw(t){var e=function(t,e){if("object"!=aw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aw(e)?e:String(e)}function lw(){return(lw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=fw(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function fw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gw(t)););return t}function hw(t,e){return(hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gw(t);if(e){var o=gw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dw(this,r)}}function dw(t,e){if(e&&("object"===aw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gw(t){return(gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yw={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},vw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hw(t,e)}(i,t);var e,r,n,o=pw(i);function i(){var t;return uw(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{},defaultConfig:yw}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshPlankFaceHint=t.unitCreator.sync((function(t){t.latest(sw().mark((function t(){var e,r;return sw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateDefaultOption=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.defaultConfig=Object(Or.extend)({},t.defaultConfig,e)}))})),t.$actionUpdateHintOption=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){lw(gw(i.prototype),"init",this).call(this),this.$actionRefreshPlankFaceHint.dispatch()}},{key:"setDefaultHintConfig",value:function(t){this.$actionUpdateDefaultOption.dispatch(t)}},{key:"setModelHint",value:function(t){var e=this,r=Object(Or.mapValues)(t,(function(t){return function(t,e){var r={};return Object(Or.isObject)(t.hintOutline)?r.hintOutline=t.hintOutline:!0===t.hintOutline&&(r.hintOutline=e.outline),t.hintPlankFace&&t.hintPlankFace.length&&(r.hintPlankFace=t.hintPlankFace.map((function(t){var r="color"in t?t:e.plankFace,n=r.color,o=r.opacity;return Object(Or.isArray)(t.plankFaceId)?t.plankFaceId.map((function(t){return{color:n,opacity:o,plankFaceId:t}})):{plankFaceId:t.plankFaceId,color:n,opacity:o}})).flat()),r}(t,e.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(t){var e=t?Object(Or.omit)(this.state.state.option,t):{};this.setModelHint(e)}},{key:"rerenderToSense",value:function(){var t=this.stateManager.core,e=t.fittingDesign,r=t.pad,n=this.state.state.option,o=Object(Or.map)(n,(function(t,e){var n=r.findModelOrAssemblyModelById(e);if(n)return function(t,e){var r={linkModel:e};if(t.hintPlankFace&&t.hintPlankFace.length){var n=e.getSize();r.plankFaces=t.hintPlankFace.map((function(t){var e=zi(t.plankFaceId,_e.default).mul(.1),r=iw(t.plankFaceId,n).map((function(t){var r=new _e.default(t).add(e);return{x:r.x,y:r.y,z:r.z}}));return nw(nw({},t),{},{points:r})}))}if(t.hintOutline&&(r.hintOutline=t.hintOutline),r.plankFaces||r.hintOutline)return new ti(r)}(t,n)})).filter((function(t){return!!t}));e.setPlankFaceHintModels(o)}}])&&cw(e.prototype,r),n&&cw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function mw(t){return(mw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Iw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ew(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cw(n.key),n)}}function Cw(t){var e=function(t,e){if("object"!=mw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mw(e)?e:String(e)}function bw(t,e){return(bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pw(t);if(e){var o=Pw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ww(this,r)}}function ww(t,e){if(e&&("object"===mw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pw(t){return(Pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bw(t,e)}(i,t);var e,r,n,o=Bw(i);function i(){var t;return Iw(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:he,holeOpacity:1,grooveOpacity:1,attachOrderRender:!0}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionSenseSetting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){e.renderIgnoreCategory&&(e.renderIgnoreCategory=Object(Or.castArray)(e.renderIgnoreCategory)),Object(Or.extend)(t,e)}))})),t}return e=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&Ew(e.prototype,r),n&&Ew(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function _w(t){return(_w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ow(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dw(n.key),n)}}function Dw(t){var e=function(t,e){if("object"!=_w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_w(e)?e:String(e)}function xw(t,e){return(xw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tw(t);if(e){var o=Tw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rw(this,r)}}function Rw(t,e){if(e&&("object"===_w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tw(t){return(Tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xw(t,e)}(i,t);var e,r,n,o=Mw(i);function i(){var t;return Qw(this,i),(t=o.apply(this,arguments)).fittingDesignSense=t.partialCreator.create(jb),t.intersected=t.partialCreator.create(tw),t.senseSetting=t.partialCreator.create(Sw),t.fittingModel=t.partialCreator.create(pB),t.plankFaceHint=t.partialCreator.create(vw),t.fittingHint=t.partialCreator.create(Jb),t.fittingViewer=t.partialCreator.create(TB),t}return e=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Ow(e.prototype,r),n&&Ow(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function Lw(t){return(Lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kw(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Nw(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){kw(i,n,o,a,s,"next",t)}function s(t){kw(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Fw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Fw=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Lw(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lw(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Gw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zw(n.key),n)}}function zw(t){var e=function(t,e){if("object"!=Lw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Lw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Lw(e)?e:String(e)}function Yw(){return(Yw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Hw(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Hw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kw(t)););return t}function Vw(t,e){return(Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kw(t);if(e){var o=Kw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ww(this,r)}}function Ww(t,e){if(e&&("object"===Lw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kw(t){return(Kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jw(t){return function(t){if(Array.isArray(t))return Xw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Xw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xw(t,e)}(t)||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 Xw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Zw(t){var e=t.map((function(t){return t.subModels&&t.subModels.length?Zw(t.subModels):[]})).flat();return e.push.apply(e,Jw(t)),e}var $w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vw(t,e)}(f,t);var e,r,n,o,i,a,s,u,c,A,l=qw(f);function f(){var t;return Gw(this,f),(t=l.apply(this,arguments)).state=t.stateCreator.create({loading:AI.FAIL,allSubModels:[],result:void 0,currModelId:""}),t.$reducerState=t.reducerCreator.create(t.state),t._startAutoSyncModelView=Object(Or.once)((function(){WL(!0);var e=Object(Or.debounce)((function(e){t._refreshCustomModel(e)}),500),r=function(r){var n=t.state.state.currModelId;r.some((function(t){return t.id===n}))&&e(n)};HL().on(r),VL().on(r),qL().on(r)})),t.$actionSetModelId=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.currModelId!==e&&(t.result=void 0,t.allSubModels=[]),t.currModelId=e}))})),t.$actionLoadParamModelJsonData=t.unitCreator.async((function(e){e.started.every(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p,d,g,y,v,m,I,E;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.defer,o=e.hasFitting,i=void 0!==o&&o,a=e.force,s=void 0!==a&&a,u=e.templateId,c=void 0===u?wC("getJsonConfig").defaultTemplateId:u,A=e.timeout,l=e.ignoreResetPosition,f=void 0===l?wC("getJsonConfig").ignoreResetPosition:l,h=this.state.state,p=h.currModelId,d=h.result,g=h.currTemplateId,r){t.next=4;break}throw new Error("not selected model!");case 4:if(y=r===p,v=g===c,m=this.$actionLoadParamModelJsonData,t.prev=7,I=y&&!s&&v?d:void 0,!i||I){t.next=13;break}return t.next=12,UL(r,c);case 12:I=t.sent;case 13:if(I){t.next=18;break}return QL.delete(r),t.next=17,zL(r,c,f,A);case 17:I=t.sent;case 18:if(I){t.next=20;break}throw new Error("输入json数据出现异常");case 20:return E=y&&!c?Zw(I.paramModel):this.state.state.allSubModels,y&&V_().scene.$actionToggleSelectModel.dispatch(!0),t.next=24,m.done.dispatch({params:e,result:{ossContent:I,allSubModels:E}});case 24:t.next=31;break;case 26:return t.prev=26,t.t0=t.catch(7),t.next=30,m.failed.dispatch({params:e});case 30:n&&n.reject(t.t0);case 31:case"end":return t.stop()}}),t,this,[[7,26]])}))),e.done.every((function(t){var e=t.params.defer;e&&e.resolve(t.result.ossContent)})),e.started.produce(t.$reducerState,(function(t,e){t.loading=AI.LOADING})),e.done.produce(t.$reducerState,(function(t,e){var r=e.result,n=r.ossContent,o=r.allSubModels,i=e.params,a=i.templateId,s=i.modelId===t.currModelId;t.loading=AI.SUCCESS,t.result=s?n:t.result,t.allSubModels=s?o:t.allSubModels,t.currTemplateId=a})),e.failed.produce(t.$reducerState,(function(t,e){t.loading=AI.FAIL}))})),t}return e=f,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"init",value:function(){Yw(Kw(f.prototype),"init",this).call(this)}},{key:"_refreshCustomModel",value:(A=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p=this;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.state.state.currModelId===e){t.next=2;break}return t.abrupt("return");case 2:return r=this.getStateManager().core.design.getCustom(),n=r.getParamModels().filter((function(t){return!t.isAppendHardware})),o=r.getParamModelAssemblies(),t.next=7,GL(e);case 7:i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),u=s.paramModels,c=s.paramModelAssemblies;try{A=Object(Or.keyBy)(u,(function(t){return t.id})),(l=ol(n,u,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModels(t)})),l.delete.forEach((function(t){return r.removeParamModel(t)})),l.update.forEach((function(t){return new $E(A[t.id]).generate(t)})),f=Object(Or.keyBy)(c,(function(t){return t.id})),(h=ol(o,c,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModelAssemblies(t)})),h.delete.forEach((function(t){return r.removeParamModelAssembly(t)})),h.update.forEach((function(t){return new UE(f[t.id]).generate(t)})),this.getAxr(VC).$actionAutoRefreshModel.dispatch()}catch(t){console.error("partial sync model view fail",t),r.setParamModels(u),r.setParamModelAssemblies(c)}this.getStateManager().core.pad.once(wp.EVENT_PARAM_MODELS_CHANGED,(function(){p.getAxr(VC).$actionAutoRefreshModel.dispatch(),IE&&EE(IE)}));case 14:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"viewParamModelById",value:(c=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Or.isArray)(e)?e[0]:e,this.$actionSetModelId.dispatchResolve(r),n=V_().scene,this.resetView(),(o=this.getAxr(jw).fittingDesignSense).initFittingDesign(),this.getAxr(jw).fittingViewer.initFittingViewer(),function(){var t=Nw(Fw().mark((function t(){var e;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=uC(),o.$actionLoadFittingDesign.started.dispatch({defer:e,params:{modelid:r}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),t.next=13,this.getAxr(rE).getCurrentCustomData(r);case 13:return i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),(u=new ke).addParamModels.apply(u,Jw(s.paramModels)),u.addParamModelAssemblies.apply(u,Jw(s.paramModelAssemblies)),t.next=22,this.getAxr(VC).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!i.context});case 22:if(t.prev=22,!V_().fittingDesign.senseSetting.getSenseSettings().attachOrderRender){t.next=29;break}return t.next=27,YL(r);case 27:(c=t.sent).length&&(A=c.reduce((function(t,e){return t[e.id]={opacity:.15,color:"#000000"},t}),{}),V_().scene.$actionSetCustomModelMaterial.dispatch(A));case 29:t.next=34;break;case 31:t.prev=31,t.t0=t.catch(22),console.error("组件提审模型获取失败",t.t0);case 34:case"end":return t.stop()}}),t,this,[[22,31]])}))),function(t){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Nw(Fw().mark((function t(){var e,r,n,o,i,a,s,u,c,A;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getStateManager().core.design.getCustom(),r=e.getParamModels().filter((function(t){return!t.isAppendHardware})),n=e.getParamModelAssemblies(),o=this.state.state.currModelId,(0!==r.length||0!==n.length)&&o){t.next=6;break}throw new Error("No custom model in the scene!");case 6:return e.clearAllParamModels(),t.next=9,GL(this.state.state.currModelId);case 9:return i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),e.addParamModels.apply(e,Jw(s.paramModels)),e.addParamModelAssemblies.apply(e,Jw(s.paramModelAssemblies)),u=this.getAxr(jw).fittingViewer,t.next=18,u.getFitting();case 18:return c=t.sent,t.next=21,u.getHardware();case 21:return A=t.sent,this.stateManager.core.pad.once(wp.EVENT_PARAM_MODELS_CHANGED,(function(){c.map((function(t){return u.addFitting(t)})),A.map((function(t){return u.addHardware(t)}))})),t.next=26,this.getAxr(VC).$actionAddModelToSense.started.dispatchResolve({custom:e,needAttach:!i.context});case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(s=Nw(Fw().mark((function t(){var e,r;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=yI(LI.MiniAppSelectModelService),t.next=3,null==e?void 0:e.getSelected();case 3:if(!(null==(r=t.sent)?void 0:r.length)){t.next=9;break}return t.next=7,this.viewParamModelById(Object(Or.map)(r,"id").filter((function(t){return!!t})));case 7:t.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getParamModelJsonData",value:(a=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.state,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r.currModelId:a,u=n.force,c=void 0!==u&&u,A=n.templateId,l=n.ignoreResetPosition,c){t.next=14;break}return h=uC(),this.getAxr(jw).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:h,params:{modelid:s}}),t.prev=5,t.next=8,h.promise;case 8:f=t.sent,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),console.log(t.t0);case 14:return p=uC(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:s,hasFitting:!!f,force:c,templateId:A,timeout:"number"==typeof i?i/1e3:void 0,ignoreResetPosition:l}),t.abrupt("return",p.promise);case 17:case"end":return t.stop()}}),t,this,[[5,11]])}))),function(t){return a.apply(this,arguments)})},{key:"validateModelStable",value:function(t){var e=this.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(e){for(var r=[e],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var o=r.shift();o.getType()===Ss.ParamModelType.PARAM_PRIMITIVE&&o.getLegal()?(n.total++,o.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(o.id))):r.push.apply(r,Jw(o.getChildNodes()))}return n}}},{key:"getTopModelList",value:(i=Nw(Fw().mark((function t(e){var r;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=yI(bm),t.next=3,r.getTopParamModels(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=Nw(Fw().mark((function t(e){var r,n,o,i;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Object(Or.castArray)(e),n=yI(LI.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){t.next=10;break}return t.next=7,n.getParamModelPhotoById(r[i]).then((function(t){o.push(t)}));case 7:--i,t.next=4;break;case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"resetView",value:function(){var t=this.getStateManager().core,e=t.design.getCustom();e.clearAllParamModels();var r=e.getParamModelAssemblies();r.length&&r.map((function(t){return e.removeParamModelAssembly(t)})),t.fittingDesign.setIntersects([]),t.fittingDesign.setPlankFaceHintModels([]),t.fittingDesign.setFittingHintModels([]),t.fittingDesign.setPlankOutlineHintModels([]),t.fittingDesign.setPlankAreaFaceHints([]),IE=void 0}}])&&Uw(e.prototype,r),n&&Uw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(pu.AXR);function tP(t){return(tP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eP(t){return function(t){if(Array.isArray(t))return rP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return rP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rP(t,e)}(t)||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 rP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nP=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==tP(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(tP(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function oP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,aP(n.key),n)}}function aP(t){var e=function(t,e){if("object"!=tP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tP(e)?e:String(e)}function sP(){return(sP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=uP(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function uP(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fP(t)););return t}function cP(t,e){return(cP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fP(t);if(e){var o=fP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lP(this,r)}}function lP(t,e){if(e&&("object"===tP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fP(t){return(fP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var hP=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cP(t,e)}(i,t);var e,r,n,o=AP(i);function i(){var t;return oP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({show:!1,message:"模型数据更新提示",description:"设计方案中的模型数据已更新,建议完成模型数据更新后继续操作",defaultPosition:{x:(window.innerWidth-360-12)/window.innerWidth,y:12/window.innerHeight}}),t.$reducerState=t.reducerCreator.create(t.state),t._detectionResultMap=new Map,t._prevDetectResult=void 0,t.$actionInit=t.unitCreator.sync((function(t){t.latest(nP().mark((function t(e,r){var n,o,i,a;return nP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr($w);case 1:return o=n.$actionSetModelId.messageType(),t.next=5,Object(nE.take)([o]);case 5:i=t.sent,a=i.payload,this._detectionResultMap.clear(),this._prevDetectResult=void 0,this.$actionMergeState.dispatch({show:!1}),JL(a),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.debEmitDetectResult=Object(Or.debounce)((function(t){return _r.emit(wr.DETECT_RESULT_CHANGE,t)}),100),t.getDetectResult=function(t){return eP(t.values()).every((function(t){return t}))},t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.enableDetectionOnce=Object(Or.once)((function(){t.toggleDetection(!0)})),t.setDetectionUIOnce=Object(Or.once)((function(e){var r=Object(Or.cloneDeep)(e),n=r.defaultPosition;n&&(r.defaultPosition={x:n.x/window.innerWidth,y:n.y/window.innerHeight}),t.$actionMergeState.dispatch(r)})),t}return e=i,(r=[{key:"module",value:function(){return"Detection"}},{key:"init",value:function(){sP(fP(i.prototype),"init",this).call(this),this.$actionInit.dispatch(),this.initialization()}},{key:"initialization",value:function(){var t=this;KL().on((function(e){var r=e.productId,n=e.detectRuleItem,o=e.result;if(t.getAxr($w).state.state.currModelId===r){t._detectionResultMap.set(n,o);var i=t.getDetectResult(t._detectionResultMap);i!==t._prevDetectResult&&(t.debEmitDetectResult({productId:r,result:i}),t._prevDetectResult=i),i?t.$actionMergeState.dispatch({show:!1}):t.$actionMergeState.dispatch({show:!0})}}))}},{key:"toggleDetection",value:function(t){XL(t)}}])&&iP(e.prototype,r),n&&iP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function pP(t,e){for(var r=t.toFixed(e).split("."),n=r[1];"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);return n?r[0]+"."+n:r[0]}function dP(t){var e=new c.BBox3d;return t.forEach((function(t){e.addPoint(t.clone())})),new Be.default(new _e.default({x:e.width,y:e.height,z:e.depth}),new _e.default(e.center),new _e.default({x:0,y:0,z:0}))}function gP(t){return(gP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yP(t,e,r){var n;return n=function(t,e){if("object"!=gP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vP(t){return(vP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EP(n.key),n)}}function IP(t,e,r){return e&&mP(t.prototype,e),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EP(t){var e=function(t,e){if("object"!=vP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vP(e)?e:String(e)}var CP=IP((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.start=e,this.end=r,this.getMainLine=function(){var t=n.start.point,e=n.end.point;return new li.a(t.clone(),e.clone())},this.getCapLines=function(t){var e=n.start,r=e.point,o=e.face,i=e.element,a=n.end.point,s=n.getLineDirection,u=o.getNormal().clone(),c=r.clone(),A=a.clone(),l=s(),f=new _e.default,h=mC(i).getConcatenatedMatrix(),p=Qs.a.decompose(h).euler,d=(new Se.default).setFromEuler(p).invert();if(l===me.Z)f=dC(new _e.default(0,t,0).applyQuaternion(d),u);else if(l===me.Y){f=dC(new _e.default(t,0,0).applyQuaternion(d),u)}else{f=dC(new _e.default(0,0,t).applyQuaternion(d),u)}var g=f.clone().normalize().mul(t),y=f.clone().negate().normalize().mul(t);return[new li.a(new _e.default(c.x,c.y,c.z).add(g),new _e.default(c.x,c.y,c.z).add(y)),new li.a(new _e.default(A.x,A.y,A.z).add(g),new _e.default(A.x,A.y,A.z).add(y))]},this.getLineDirection=function(){var t=n.start,e=t.point,r=t.element,o=n.end.point,i=e.clone(),a=o.clone().clone().sub(i.clone()),s=mC(r).getConcatenatedMatrix(),u=Qs.a.decompose(s).euler,c=(new Se.default).setFromEuler(u);a.applyQuaternion(c);var A,l=(A=a,new _e.default(Math.abs(A.x),Math.abs(A.y),Math.abs(A.z))).normalize(),f=l.x,h=l.y,p=l.z,d=Math.max(f,h,p);return d===f?me.X:d===h?me.Y:me.Z}}));function bP(t){return function(t){if(Array.isArray(t))return PP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wP(t)||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 BP(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||wP(t,e)||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 wP(t,e){if(t){if("string"==typeof t)return PP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?PP(t,e):void 0}}function PP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var SP=new Map([[me.X,{indexArray:[7,6],offsetNormal:new _e.default(0,0,1),lineColor:"#FF5533",lineOpacity:1,textStyle:{color:"#FF5533",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[me.Y,{indexArray:[7,4],offsetNormal:new _e.default(-1,0,0),lineColor:"#16D9A8",lineOpacity:1,textStyle:{color:"#16D9A8",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[me.Z,{indexArray:[0,4],offsetNormal:new _e.default(0,-1,0),lineColor:"#338BFF",lineOpacity:1,textStyle:{color:"#338BFF",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}]]),_P=new Map([[me.X,.5],[me.Y,.7],[me.Z,.3]]);function QP(t,e){var r=SP.get(e);if(!r)throw new Error("unknown direction");var n=function(t){if(0!==t.length){var e=t[0].getMatrix(),r=(new Pe.default).getInverse(e),n=new Os.default,o=Qs.a.decompose(e).rotation;return t.forEach((function(t){n.includePoints(t.getPoints().map((function(t){return t.clone().applyMatrix4(r)})))})),new Be.default(n.getSize().clone(),n.getCenter().clone().applyMatrix4(e),o)}}(t.map((function(t){return t.getConcatenatedBox3()})));if(!n)throw new Error("mergedBox not exist");var o=n.getPoints(),i=n.getRotation(),a=BP(r.indexArray,2),s=a[0],u=a[1],c=r.offsetNormal,A=r.lineColor,l=r.lineOpacity,f=r.textStyle,h=c.clone().applyQuaternion((new Se.default).setFromEuler(new we.default(i.x,i.y,i.z))).normalize(),p=h.clone().mul(30),d=o[s].add(p),g=o[u].add(p),y=new li.a(d,g),v=h.clone().mul(20),m=v.clone().negate();return{mainLine:y,capLines:[new li.a(d.clone().add(v),d.clone().add(m)),new li.a(g.clone().add(v),g.clone().add(m))],lineStyle:{color:A,opacity:l},textStyle:f}}function OP(t){var e=new Map(t.map((function(t){return[t.getConcatenatedBox3(),t]}))),r=new Map(bP(e.keys()).map((function(t){return Object.values(function(t){var e=t.getPoints();function r(t,r,n){var o=e[t].clone(),i=_e.default.sub(e[r],o),a=_e.default.sub(e[n],o);return new Wm.default(o,i,a)}return{faces:yP(yP(yP(yP(yP(yP({},Ee.Bottom,r(3,2,0)),Ee.Front,r(0,1,4)),Ee.Left,r(3,0,7)),Ee.Right,r(1,2,5)),Ee.Back,r(2,3,6)),Ee.Top,r(4,5,7))}}(t).faces).map((function(e){return[e,t]}))})).flat(1)),n=bP(r.keys()).reduce((function(t,e){var r=e.getNormal().clone(),n=bP(t.keys()).find((function(t){return _e.default.isParallel(t,r,.01)}));return n?t.get(n).push(e):t.set(r,[e]),t}),new Map);n.forEach((function(t,e){var n=t.map((function(t){return{face:t,faceOrder:_e.default.dot2(t.getCenter(),e),boxOrder:_e.default.dot2(r.get(t).getPosition(),e)}}));n.sort((function(t,e){return t.faceOrder-e.faceOrder}));var o=[];n.forEach((function(t){var e=o[o.length-1]||[],r=e[0];if(r&&c.Num.isEqual(r.faceOrder,t.faceOrder,.01))return void e.push(t);o.push([t])})),o.forEach((function(t){t.length>1&&t.sort((function(t,e){return t.boxOrder-e.boxOrder}))}));var i=new Map(o.flat(1).map((function(t,e){return[t.face,e]})));t.sort((function(t,e){return i.get(t)-i.get(e)}))}));var o=new Map;n.forEach((function(t,e){t.forEach((function(t,r,n){for(var i=t.getNormal().clone(),a=t.getCenter().clone(),s=new qm.a(a,i),u=_e.default.dot2(i,e)>0;;){u?r++:r--;var c=n[r];if(!c)break;var A=c.intersectRay(s,!1);if(A){if(_e.default.dot2(i,c.getNormal())>0)break;var l={facePair:[t,c],line:new li.a(a,A)};o.has(e)?o.get(e).push(l):o.set(e,[l]);break}}}))}));var i=bP(o.values()).map((function(t){return e=t,r=Object(Or.groupBy)(e,(function(t){return t.facePair.map((function(t){return t.toString()})).slice().sort().join("-")})),Object.entries(r).map((function(t){var e=BP(t,2),r=(e[0],e[1]);return r.sort((function(t,e){return _e.default.cross2(t.facePair[0].directionU.clone(),t.facePair[0].directionV.clone()).length()-_e.default.cross2(e.facePair[0].directionU.clone(),e.facePair[0].directionV.clone()).length()})),r[0]}));var e,r})).flat(1).filter((function(t){return t.line.length()>.4})).map((function(t){return new CP({point:t.line.start,face:t.facePair[0],box:r.get(t.facePair[0]),element:e.get(r.get(t.facePair[0]))},{point:t.line.end,face:t.facePair[1],box:r.get(t.facePair[1]),element:e.get(r.get(t.facePair[1]))})})),a=Object(Or.groupBy)(i,(function(t){return t.getLineDirection()})),s=new Map;return Object.entries(a).forEach((function(t){var e=BP(t,2),r=e[0],n=e[1],o=SP.get(r);s.set(r,{lineStyle:{color:o.lineColor,opacity:o.lineOpacity},textStyle:o.textStyle,lines:n.map((function(t){return{mainLine:t.getMainLine(),capLines:t.getCapLines(20)}}))})})),s}function DP(t){return(DP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xP(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||RP(t,e)||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 MP(t){return function(t){if(Array.isArray(t))return TP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||RP(t)||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 RP(t,e){if(t){if("string"==typeof t)return TP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?TP(t,e):void 0}}function TP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jP=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==DP(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(DP(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function LP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NP(n.key),n)}}function NP(t){var e=function(t,e){if("object"!=DP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DP(e)?e:String(e)}function FP(t,e){return(FP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zP(t);if(e){var o=zP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UP(this,r)}}function UP(t,e){if(e&&("object"===DP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zP(t){return(zP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var YP=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FP(t,e)}(i,t);var e,r,n,o=GP(i);function i(){var t;return LP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({dimensionRulers:new Map,spacingDistanceRulers:new Map}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(jP().mark((function t(e,r){var n,o;return jP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(nE.take)([o]);case 5:this.$actionSetDimensionRulers.dispatch(new Map),this.$actionSetSpacingDistanceRulers.dispatch(new Map),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshRulerLines=t.unitCreator.sync((function(t){t.latest(jP().mark((function t(){var e,r;return jP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.refreshDimensionRulers(),this.refreshSpacingDistanceRulers(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetDimensionRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.dimensionRulers=e}))})),t.$actionSetSpacingDistanceRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.spacingDistanceRulers=e}))})),t.refreshDimensionRulers=function(){var e=t.state.state.dimensionRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeDimensionRulerConfig(i,a);r.set(n,{originData:o,rulerConfig:s})})),t.$actionSetDimensionRulers.dispatch(r)},t}return e=i,(r=[{key:"module",value:function(){return"RulerLine"}},{key:"init",value:function(){this.$actionInit.dispatch(),this.$actionRefreshRulerLines.dispatch()}},{key:"refreshSpacingDistanceRulers",value:function(){var t=this,e=this.state.state.spacingDistanceRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeSpacingDistanceRulers(i,a);r.set(n,{originData:o,rulerConfigs:s})})),this.$actionSetSpacingDistanceRulers.dispatch(r)}},{key:"_computeDimensionRulerConfig",value:function(t,e){var r,n,o,i,a,s=this,u=t.modelIds,c=t.direction;if(0===u.length)throw new Error("modelIds parameter array length must be greater than 0");var A=u.map((function(t){return s.stateManager.core.pad.findModelOrAssemblyModelById(t)})),l=A.filter((function(t){return!t}));if(l.length>0)throw new Error("model: ".concat(l.join(",")," not exist"));var f=QP(A,c),h=f.mainLine,p=f.capLines,d=f.lineStyle,g=f.textStyle;return{mainLine:h,capLines:p,text:pP(h.length(),1),textPosition:h.getCenter(),lineStyle:{color:null!==(n=null===(r=null==e?void 0:e.lineStyle)||void 0===r?void 0:r.color)&&void 0!==n?n:d.color,opacity:null!==(i=null===(o=null==e?void 0:e.lineStyle)||void 0===o?void 0:o.opacity)&&void 0!==i?i:d.opacity},textStyle:null!==(a=null==e?void 0:e.textStyle)&&void 0!==a?a:g}}},{key:"_computeSpacingDistanceRulers",value:function(t,e){var r=t.modelFilter,n=this.stateManager.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),a=tC.ParamModelUtils.flattenModels(o,{getAccessories:function(t){return t.getChildNodes().filter((function(t){return t.getLegal()}))}}),s=[].concat(MP(a),MP(i));return MP(OP(s.filter((function(t){return r({id:(e=t).id,prodCatId:e.getCategory().categoryId});var e}))).entries()).map((function(t){var e=xP(t,2),r=e[0],n=e[1],o=n.lineStyle,i=n.lines,a=n.textStyle;return i.map((function(t){var e=t.mainLine;return{mainLine:e,capLines:t.capLines,lineStyle:o,textStyle:a,text:pP(e.length(),1),textPosition:new _e.default(new c.LineSeg3d(c.Point3d.fromObject(e.start),c.Point3d.fromObject(e.end)).getPoint(e.length()*_P.get(r)))}}))})).flat()}},{key:"addDimensionRuler",value:function(t,e){var r=this._computeDimensionRulerConfig(t),n=Object(Xr.default)(),o=new Map(this.state.state.dimensionRulers).set(n,{originData:{param:t,option:e},rulerConfig:r});return this.$actionSetDimensionRulers.dispatch(o),n}},{key:"removeDimensionRuler",value:function(t){if(t){var e=new Map(this.state.state.dimensionRulers);e.delete(t),this.$actionSetDimensionRulers.dispatch(e)}else this.$actionSetDimensionRulers.dispatch(new Map)}},{key:"addSpacingDistanceRuler",value:function(t,e){var r=this._computeSpacingDistanceRulers(t,e),n=Object(Xr.default)(),o=new Map(this.state.state.spacingDistanceRulers).set(n,{originData:{param:t,option:e},rulerConfigs:r});return this.$actionSetSpacingDistanceRulers.dispatch(o),n}},{key:"removeSpacingDistanceRuler",value:function(t){if(t){var e=new Map(this.state.state.spacingDistanceRulers);e.delete(t),this.$actionSetSpacingDistanceRulers.dispatch(e)}else this.$actionSetSpacingDistanceRulers.dispatch(new Map)}}])&&kP(e.prototype,r),n&&kP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR),HP=r(761),VP=r.n(HP);function qP(t){return(qP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function KP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JP(n.key),n)}}function JP(t){var e=function(t,e){if("object"!=qP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qP(e)?e:String(e)}function XP(t,e){return(XP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tS(t);if(e){var o=tS(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $P(this,r)}}function $P(t,e){if(e&&("object"===qP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tS(t){return(tS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var eS=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XP(t,e)}(i,t);var e,r,n,o=ZP(i);function i(){var t;return WP(this,i),(t=o.apply(this,arguments)).bzProperties=new Map,t}return e=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:"isHidden"},this.isHidden,t),this.isHidden=t}}])&&KP(e.prototype,r),n&&KP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(jt);function rS(t){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nS(Object(r),!0).forEach((function(e){iS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function iS(t,e,r){var n;return n=function(t,e){if("object"!=rS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==rS(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var aS={x:0,y:0,z:0},sS={x:0,y:0,z:0};function uS(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=e.category,i=e.origin,a=new eS,s=!(t instanceof gr)||t.isRoot(),u=n||s?t:t.getRoot(),c=u instanceof gr;a.id=u.id,a.isRoot=!c||u.isRoot(),a.isHidden=!!u.getInvisible(),a.name=u.getName();var A=W.ASSEMBLY;if(c?A=W.COMMON:t.isTemplateAssembly()&&(A=W.TEMPLATE_ASSEMBLY),a.modelType=A,a.position=a.isRoot?aS:u.getPosition(),a.rotation=a.isRoot?sS:u.getRotation(),a.size="function"==typeof u.getScaledSize?u.getScaledSize():u.getSize(),a.params=AS(u),a.category=o||u.getCategory().categoryId,c){var l=u.getModel();a.productId=null==l?void 0:l.obsBrandGoodId}return n&&(a.root=n),a.isRoot&&(a._origin=i),a.children=(c?u.getChildren():u.getParamModels()).map((function(t){return uS(t,e,r,n||a)})),a.accessories=(c?u.getAccessories():[]).map((function(t){return uS(t,e,r,n||a)})),r.set(a.id,a),u!==t&&r.has(t.id)?r.get(t.id):a}function cS(t,e){var r=t.isRoot?t:t.root;if(!r)return{};var n=r._changeMap,o=e.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),a=n.cloned;return a&&(o=o.clone(!1)),o=function t(e,r,n,o){var i=e._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var a=i.update,s=void 0===a?[]:a,u=i.addNodes,c=void 0===u?[]:u,A=o?oS({},o):{parentModelLite:e,parentModel:n,rootModelLite:e,rootModel:n};s.forEach((function(t){if(t.type===Y.ATTRIBUTE)switch(t.attr){case"position":n.setPosition(e.getPosition());break;case"rotate":n.setRotation(e.getRotation());break;case"isHidden":n.setInvisible(e.getHidden()),function(t){var e=t.getInvisible();V_().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===t.id&&r.setVisible(!e)}))}(n)}if(t.type===Y.STORE){var o=n.getParamStore().getParam(t.attr),i=e.getParam(t.attr);if(o&&i){var a=i.getValue();[Ss.ParamType.MATERIAL,Ss.ParamType.SHAPE].includes(o.getType())&&(a=r.getUnSafeObsBrandGoodToBrandGoodId(a)),a&&o.setValue(a),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),c.forEach((function(o){var i=o.type,a=o.linkId,s=(i===q.CHILD?e.getChild():e.getAccessory()).find((function(t){return t.id===a}));if(s){var u=r.getUnSafeParamModelFromParamModelLite(s);u&&((s._changeMap.cloned||s._origin!==G.SENSE)&&(u=u.clone(!1)),i===q.CHILD?(u.setIsAppend(!0),u.setAppendType(VP.a.CENTER),n.addChild(u)):n.addAccessory(u),t(s,r,u,oS(oS({},A),{},{parentModel:n,parentModelLite:e})),(s._changeMap.cloned||s._origin!==G.SENSE)&&u.assignUniqueId())}}));var l=function(o){return function(i){if(!c.some((function(t){return t.type===o&&t.linkId===i.id}))){var a=n instanceof Qe.CoreParamModelAssembly?n.getParamModels():o===q.ACCESSORY?n.getAccessories():n.getChildren(),s=i._changeMap.originId||i.id,u=a.find((function(t){return t.id===s}));u&&t(i,r,u,oS(oS({},A),{},{parentModel:n,parentModelLite:e}))}}};return e.getChild().forEach(l(q.CHILD)),e.getAccessory().forEach(l(q.ACCESSORY)),n}(r,e,o),a&&o&&o.assignUniqueId(),{create:a,custom:i,model:o}}function AS(t){var e=new Map;return t.getParamStore().forEach((function(t,r){e.set(r,function(t){var e=new Dt;if(e.data={type:t.getType(),displayName:t.getDisplayName(),name:t.getName(),value:t.getValue(),max:t.getMax(),min:t.getMin(),editable:t.getEditable()||t.getOverridable(),optionValues:t.getOptionValues().map((function(t){return{name:t.name,value:t.value}})),recommendValues:t.getRecommendValues().map((function(t){return{name:t.name,value:t.value}})),primitiveOverride:t.getPrimitiveOverride(),step:t.getStep()},[k.MATERIAL,k.SHAPE].includes(e.getType())){var r=t.getProduct();e.data.value=r?r.obsBrandGoodId:""}return e}(t))})),e}var lS=r(273),fS=r.n(lS);function hS(t){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pS(Object(r),!0).forEach((function(e){gS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gS(t,e,r){var n;return n=function(t,e){if("object"!=hS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==hS(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */yS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==hS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(hS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function vS(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function mS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){vS(i,n,o,a,s,"next",t)}function s(t){vS(i,n,o,a,s,"throw",t)}a(void 0)}))}}fS()(function(){var t=mS(yS().mark((function t(e){var r,n;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),t.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:e});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),dS({promise:!0},mI));function IS(){return(IS=mS(yS().mark((function t(e){var r,n,o,i,a;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_d().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ES(){return(ES=mS(yS().mark((function t(e){var r,n,o,i,a;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_d().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var CS=fS()((function(t){return IS.apply(this,arguments)}),dS(dS({},mI),{},{promise:!0})),bS=fS()((function(t){return ES.apply(this,arguments)}),dS(dS({},mI),{},{promise:!0}));function BS(t){return(BS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==BS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(BS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function PS(t){return function(t){if(Array.isArray(t))return SS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return SS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SS(t,e)}(t)||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 SS(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _S(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function QS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,OS(n.key),n)}}function OS(t){var e=function(t,e){if("object"!=BS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=BS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==BS(e)?e:String(e)}var DS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cached=new Map}var e,r,n,o,i;return e=t,(r=[{key:"setProduct",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(e);r||(r=new Map,this.cached.set(e,r)),r.set(t.brandGoodId,t.obsBrandGoodId),r.set(t.obsBrandGoodId,t.brandGoodId)}},{key:"getToggledBrandGood",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(e=this.cached.get(r))||void 0===e?void 0:e.get(t)}},{key:"removeCachedModel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(t)}},{key:"safeGetToggleBrandGood",value:(o=wS().mark((function t(e){var r,n,o,i,a,s,u=this,c=arguments;return wS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Or.castArray)(e),o=[],i=[],a=new Map,n.forEach((function(t){var e=u.getToggledBrandGood(t,r);e?a.set(t,e):/^[0-9]$/.test(t.toString())?i.push(t):o.push(t)})),s=function(t){return[].concat(PS(t.hardwares||[]),PS(t.textures||[]),PS(t.virtualModels||[]),PS(t.paramModelProducts||[]),PS(t.moldings||[]))},!o.length){t.next=12;break}return t.next=10,CS(o).then(s);case 10:t.sent.forEach((function(t){u.setProduct(t,r)}));case 12:if(!i.length){t.next=17;break}return t.next=15,bS(i).then(s);case 15:t.sent.forEach((function(t){u.setProduct(t,r)}));case 17:return[].concat(o,i).forEach((function(t){var e=u.getToggledBrandGood(t,r);e&&a.set(t,e)})),t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){_S(i,r,n,a,s,"next",t)}function s(t){_S(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&QS(e.prototype,r),n&&QS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xS(t){return(xS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function MS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */MS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==xS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(xS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function RS(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function TS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){RS(i,n,o,a,s,"next",t)}function s(t){RS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function jS(t){return function(t){if(Array.isArray(t))return LS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return LS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LS(t,e)}(t)||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 LS(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,FS(n.key),n)}}function FS(t){var e=function(t,e){if("object"!=xS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xS(e)?e:String(e)}var GS,US=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new DS;kS(this,t),this.callback=e,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var e,r,n,o;return e=t,(r=[{key:"getParamModelFromId",value:function(t){if(this.cached.has(t))return this.cached.get(t);var e=this.callback(t);return e?(this.cached.set(t,e),e):void 0}},{key:"getUnSafeParamModel",value:function(t){return this.cached.get(t)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(t){return this.brandGoodsTranslate.getToggledBrandGood(t)}},{key:"addParamModelLite",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=this.models).push.apply(t,jS(r.map((function(t){return t.root||t}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(t){var e,r=t.root||t;switch(t._origin||r._origin){case G.BRANDGOOD:case G.CATEGORY:break;case G.SENSE:var n=r._changeMap.originId||r.id;e=this.getUnSafeParamModel(n)}if(!e||r===t)return e;for(var o,i=t._changeMap.originId||t.id,a=[e];o=a.pop();){if(o.id===i)return o;a.push.apply(a,jS(o.getChildNodes()))}}},{key:"attach",value:(o=TS(MS().mark((function t(){var e,r,n,o,i,a,s,u,c=this;return MS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=e.pop())){t.next=18;break}a=(i=o)._changeMap,s=i._origin,t.t0=s,t.next=t.t0===G.SENSE?8:t.t0===G.CATEGORY||t.t0===G.BRANDGOOD||t.t0===G.TEMPLATE_ID?11:12;break;case 8:return u=a.originId||o.id,r.modelIds.push(u),t.abrupt("break",12);case 11:return t.abrupt("break",12);case 12:if(!a.deleted){t.next=14;break}return t.abrupt("continue",3);case 14:a.update&&a.update.forEach((function(t){if(o&&t.type===Y.STORE&&o.hasParam(t.attr)){var e=o.getParam(t.attr);e&&[k.MATERIAL,k.SHAPE].includes(e.getType())&&e.getValue()&&n.push(e.getValue())}})),e.push.apply(e,jS(o.getChild()).concat(jS(o.getAccessory()))),t.next=3;break;case 18:return t.next=20,Promise.allSettled(jS(Object(Or.uniq)(r.modelIds).map(function(){var t=TS(MS().mark((function t(e){return MS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c.getParamModelFromId(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 20:return t.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&NS(e.prototype,r),n&&NS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zS(t){GS=t}var YS=r(768);function HS(t){return(HS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function VS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */VS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==HS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(HS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function qS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function WS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,KS(n.key),n)}}function KS(t){var e=function(t,e){if("object"!=HS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=HS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==HS(e)?e:String(e)}function JS(){return(JS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=XS(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function XS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=e_(t)););return t}function ZS(t,e){return(ZS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=e_(t);if(e){var o=e_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return t_(this,r)}}function t_(t,e){if(e&&("object"===HS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function e_(t){return(e_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var r_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZS(t,e)}(i,t);var e,r,n,o=$S(i);function i(){var t;return qS(this,i),(t=o.apply(this,arguments)).$actionInit=t.unitCreator.sync((function(t){t.latest(VS().mark((function t(e,r){var n;return VS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return t.next=4,Object(nE.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 4:if(n.state.state.main!==lI.SUCCESS){t.next=7;break}return t.next=7,Object(nE.put)(this.$actionSetCamera.message(!0));case 7:t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetCamera=t.unitCreator.sync((function(t){t.latest(VS().mark((function t(e,r){var n,o,i,a,s,u;return VS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(a=r.scene3D).updateEnableCameraAnimation(!1),s=o.length?Object(YS.computeAssemblyBox)(o.map((function(t){return t.getBox3()})),o[0].getMatrix4()):Object(YS.computeAssemblyBox)(i.map((function(t){return t.getBox3()})),i[0].getMatrix4()),u=iC(s),a.updateInitCameraAttributes(u),a.updateScaleFactorRange(.5,4),e?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 10:case"end":return t.stop()}}),t)})))})),t}return e=i,(r=[{key:"init",value:function(){JS(e_(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&WS(e.prototype,r),n&&WS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function n_(t){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o_(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a_(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function i_(t){return function(t){if(Array.isArray(t))return s_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a_(t)||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 a_(t,e){if(t){if("string"==typeof t)return s_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s_(t,e):void 0}}function s_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u_(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function c_(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u_(i,n,o,a,s,"next",t)}function s(t){u_(i,n,o,a,s,"throw",t)}a(void 0)}))}}function A_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A_(Object(r),!0).forEach((function(e){E_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==n_(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n_(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function h_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,C_(n.key),n)}}function d_(){return(d_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=g_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function g_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=I_(t)););return t}function y_(t,e){return(y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v_(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=I_(t);if(e){var o=I_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m_(this,r)}}function m_(t,e){if(e&&("object"===n_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function I_(t){return(I_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function E_(t,e,r){return(e=C_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C_(t){var e=function(t,e){if("object"!=n_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=n_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n_(e)?e:String(e)}var b_=E_(E_(E_(E_(E_(E_(E_(E_(E_(E_({},Ie.HOLE,4),Ie.GROOVE,1),Ie.HARDWARE_GROOVE,2),Ie.HARDWARE,3),Ie.PARAM_MODEL,0),Ie.HOLE_V2,5),Ie.SQUARE_GROOVE,5),Ie.ROUND_CORNER_GROOVE,5),Ie.SPECIAL_SHAPED_GROOVE,5),Ie.PATH_GROOVE,5),B_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y_(t,e)}(l,t);var e,r,n,o,i,a,s,u,A=v_(l);function l(){var t;return h_(this,l),(t=A.apply(this,arguments)).cameraController=t.partialCreator.create(r_),t.state=t.stateCreator.create({renderMode:or.RenderMode.SHADING,selectable:!0,overrideMaterialOption:{},interactionPriority:b_,customModelMaterial:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.$actionToggleRenderMode=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){var n,o,i;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=or.RenderMode.SHADING,o=QA.Unset,t.t0=e.mode,t.next=t.t0===gI.SHADING?5:t.t0===gI.OUTLINE_WITH_SHADING?7:t.t0===gI.TRANSLUCENT?9:t.t0===gI.OUTLINE_AND_TRANSLUCENT?11:t.t0===gI.FULLY_TRANSPARENT?14:17;break;case 5:return n=or.RenderMode.SHADING,t.abrupt("break",17);case 7:return n=or.RenderMode.OUTLINE_WITH_SHADING,t.abrupt("break",17);case 9:return o=QA.Translucent,t.abrupt("break",17);case 11:return n=or.RenderMode.OUTLINE_WITH_SHADING,o=QA.Translucent,t.abrupt("break",17);case 14:return n=or.RenderMode.OUTLINE_WITH_SHADING,o=QA.Transparent,t.abrupt("break",17);case 17:return t.next=19,Object(nE.put)(this.$actionMergeState.message({renderMode:n}));case 19:i=[or.RenderMode.OUTLINE_WITH_SHADING,or.RenderMode.TRANSPARENT_LINE].includes(n),dL().viewer.toggleShowModelOutline(i),dL().viewer.togglePlankOutline(!1),i&&this.enableHardwaresOutline(),dL().viewer.updateTransparentMode(o),r.scene3D.updateRenderMode(n),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 27:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleWhiteMode=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.scene3D.updateRenderMode(e?or.RenderMode.OUTLINE_ONLY:or.RenderMode.SHADING),dL().viewer.togglePlankOutline(e),e?this.disableHardwaresOutline():this.enableHardwaresOutline(),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 5:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderBorder=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){var n;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.enableHardwaresOutline(),n=e?or.RenderMode.OUTLINE_WITH_SHADING:or.RenderMode.SHADING,t.next=4,Object(nE.put)(this.$actionMergeState.message({renderMode:n}));case 4:dL().viewer.toggleShowModelOutline(n===or.RenderMode.OUTLINE_WITH_SHADING),dL().viewer.togglePlankOutline(!1),r.scene3D.updateRenderMode(n),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderTranslucent=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:dL().viewer.updateTransparentMode(e?QA.Translucent:QA.Unset),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 3:case"end":return t.stop()}}),t,this)})))})),t.$actionModelHint=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({overrideMaterialOption:e}));case 2:dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 4:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleSelectModel=t.unitCreator.sync((function(t){t.every(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({selectable:e}));case 2:case"end":return t.stop()}}),t,this)})))})),t.$actionSetInteractionPriority=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){var r=Object.assign(t,{interactionPriority:l_(l_({},t.interactionPriority),e)});dL().viewer.setInteractionPriorityConfig(r.interactionPriority.hardware,r.interactionPriority.paramModel)}))})),t.$actionSetCustomModelMaterial=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({customModelMaterial:e}));case 2:dL().viewer.triggerReducer();case 3:case"end":return t.stop()}}),t,this)})))})),t}return e=l,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var t=this;d_(I_(l.prototype),"init",this).call(this),dL().viewer.registerReducer((function(e,r,n){var o=t.state.state.customModelMaterial[e.id]||{},i=o.opacity,a=o.color;n.opacity=e.isAppendHardware?1:i,n.outlineMode=e.outlineMode,n.color=a})),dL().viewer.registerReducer((function(e,r,n){var o=e.getAssembly(),i=!0;o&&(i=!o.getInvisible()),i&&(i=!e.getInvisible()),e.isAppendHardware&&(n.overrideMaterial=t.state.state.overrideMaterialOption[e.id]),n.visible=i}))}},{key:"getAllHardwares",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware}))}},{key:"disableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=or.OutlineMode.Disabled}))}},{key:"enableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=or.OutlineMode.Outlined}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return!t.isAppendHardware}))}},{key:"getAllCustomModels",value:(u=c_(f_().mark((function t(){var e;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAllParamModels(),t.abrupt("return",e.map((function(t){return uS(t,{origin:G.SENSE})})));case 2:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getCustomModelById",value:(s=c_(f_().mark((function t(e){var r;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(e))){t.next=3;break}return t.abrupt("return",uS(r,{origin:G.SENSE}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"save",value:(a=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,c,A;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,n=this.getStateManager().core.pad,(o=new US(n.findModelOrAssemblyModelById)).addParamModelLite.apply(o,i_(r)),t.next=6,o.attach();case 6:return t.next=8,Promise.all(r.map((function(t){return cS(t,o)})));case 8:i=t.sent,a=[],s=[],u=o_(i);try{for(u.s();!(c=u.n()).done;)(A=c.value).create&&A.custom&&A.model&&a.push(A),!A.create&&A.model&&s.push(A.model)}catch(t){u.e(t)}finally{u.f()}(a.length||s.length)&&a.length&&a.forEach((function(t){var e;null===(e=t.custom)||void 0===e||e.addParamModels(t.model)})),dL().viewer.triggerReducer();case 15:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"focusFace",value:function(t){var e=V_().viewParamModel.state.state.currModelId;if(e){var r,n=this.getStateManager(),o=n.core,i=n.scene3D,a=o.design.getCustom().getParamModels().find((function(t){return t.$id===e})),s=o.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e})),u=(a||s).getBox3(),c=u.getPosition(),A=u.getSize().length()*rC,l=u.getMatrix();switch(t){case Ee.Right:r=new _e.default(A,0,0).applyMatrix4(l);break;case Ee.Left:r=new _e.default(-A,0,0).applyMatrix4(l);break;case Ee.Front:r=new _e.default(0,-A,0).applyMatrix4(l);break;case Ee.Back:r=new _e.default(0,A,0).applyMatrix4(l);break;case Ee.Top:this.focusFace(Ee.Front),r=new _e.default(0,0,A).applyMatrix4(l);break;case Ee.Bottom:this.focusFace(Ee.Front),r=new _e.default(0,0,-A).applyMatrix4(l)}i.updateCameraAttributes({lookAt:c,position:r})}}},{key:"updateCameraType",value:function(t){this.getStateManager().scene3D.updateCameraType(t===pe.Orthographic?ob.a.Orthographic:ob.a.Perspective,!0)}},{key:"lookAt",value:(i=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.keepView,o=void 0===n||n,i=this.getStateManager(),a=i.scene3D,s=Ab(r)){t.next=5;break}throw new Error("".concat(r,"模型不存在"));case 5:if(!lb(s)){t.next=8;break}throw new Error("".concat(r,"模型不可见"));case 8:if(u=s.getConcatenatedBox3(),c=u.getPosition(),!o){t.next=18;break}return A=a.state.cameraAttributes,l=A.lookAt,f=A.position,h=f.clone().sub(l.clone()).normalize(),p=f.distance(l),t.next=16,fb({lookAt:c,position:c.clone().add(h.clone().mul(p))});case 16:t.next=20;break;case 18:return t.next=20,fb({lookAt:c});case 20:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"adaptViewer",value:(o=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,A,l,f,h,p,d,g,y,v,m,I,E,C,b,B,w,P,S,_,Q,O,D,x,M,R,T,j,L,k,N,F,G,U;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,!((n=e.scale)<=0)){t.next=4;break}throw new Error("不支持小于等于".concat(0," 的比例"));case 4:if(o=this.getStateManager(),i=o.scene3D,a=Ab(r)){t.next=8;break}throw new Error("".concat(r,"模型不存在"));case 8:if(!lb(a)){t.next=11;break}throw new Error("".concat(r,"模型不可见"));case 11:if(s=a.getConcatenatedBox3(),u=s.getPoints().map((function(t){return new c.Point3d(t)})),l=(A=GS).getCamera(),f=u.map((function(t){return new or.Vector3(t.x,t.y,t.z).applyMatrix4(l.matrixWorldInverse)})),h=new c.BBox3d,f.forEach((function(t){h.addPoint(t)})),p=i.state.perspectiveCameraFov,d=i.state.cameraAttributes,g=d.lookAt,y=d.position,v=d.frustumSize,m=d.near,I=d.far,E=A.getSize(),C=E.width/E.height,b=h.width,B=h.height,w=h.depth,P=new c.Vector3d(g),S=w/2,_=n/100,!(l instanceof or.PerspectiveCamera)){t.next=39;break}return Q=l.zoom,O=p/2,D=B/2/_*Q/Math.tan(O*(Math.PI/180)),x=180*Math.atan(Math.tan(O*Math.PI/180)*C)/Math.PI,M=b/2/_*Q/Math.tan(x*(Math.PI/180)),R=Math.max(M,D),T=Object(Ql.a)(R+S,m+S,I-S),j=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(T)),t.next=37,fb({position:new _e.default(j.x,j.y,j.z)});case 37:t.next=47;break;case 39:return L=B/_/v,k=b/_/(v*C),N=Math.max(L,k),F=(m+I)/2,G=Object(Ql.a)(F,m+S,I-S),U=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(G)),t.next=47,fb({frustumSize:N*v,position:new _e.default(U.x,U.y,U.z)});case 47:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&p_(e.prototype,r),n&&p_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(pu.AXR);function w_(t){return(w_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function P_(t){return function(t){if(Array.isArray(t))return x_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||D_(t)||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_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function __(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?S_(Object(r),!0).forEach((function(e){Q_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Q_(t,e,r){return(e=T_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O_(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||D_(t,e)||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 D_(t,e){if(t){if("string"==typeof t)return x_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x_(t,e):void 0}}function x_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function M_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T_(n.key),n)}}function T_(t){var e=function(t,e){if("object"!=w_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w_(e)?e:String(e)}function j_(){return(j_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=L_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function L_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=G_(t)););return t}function k_(t,e){return(k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N_(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=G_(t);if(e){var o=G_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return F_(this,r)}}function F_(t,e){if(e&&("object"===w_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function G_(t){return(G_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var U_={rawSelected:[],selectedData:[],selectedDataV2:[]},z_=function(t,e){var r=t.entityId+"%%"+t.entityType.toString(),n=e.entityId+"%%"+e.entityType.toString();return r>n?1:r===n?0:-1},Y_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k_(t,e)}(i,t);var e,r,n,o=N_(i);function i(){var t;return M_(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create(U_).mutable(),t.onModelsChange=function(){var e=t.selected.map((function(e){return t.stateManager.core.pad.findModel(e.entityId)})).filter((function(t){return!!t})),r=t.state.state.selectedData;e.length===r.length&&Object(Or.unzip)([e,r]).every((function(t){var e=O_(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return __(__({},t),{},{selectedData:e})})),t.emit(i.EVENT_SELECT_CHANGED))},t.onModelChangeV2=function(){setTimeout((function(){t.onModelsChange()}),0);var e=t.stateManager.core,r=e.pad,n=e.fittingDesign,o=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=n.getArcSquareGrooveModels(),h=t.rawSelected.map((function(t){switch(t.entityType){case DA:return r.findModelEx(t.entityId,Bp);case OA:return r.findParamModelAssembly(t.entityId);case II:return o.find((function(e){return e.id===t.entityId}));case EI:return a.find((function(e){return e.id===t.entityId}));case PI:return s.find((function(e){return e.id===t.entityId}));case SI:return[].concat(P_(u),P_(f)).find((function(e){return e.id===t.entityId}));case _I:return c.find((function(e){return e.id===t.entityId}));case QI:return A.find((function(e){return e.id===t.entityId}));case OI:return l.find((function(e){return e.id===t.entityId}));default:return}})).filter((function(t){return!!t})),p=t.state.state.selectedDataV2;p.length===h.length&&Object(Or.unzip)([p,h]).every((function(t){var e=O_(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return __(__({},t),{},{selectedDataV2:h})})),t.emit(i.EVENT_SELECT_CHANGED_V2))},t._onSelectionChange=function(){t.onStateChange()},t}return e=i,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(t){this.selectionStateManager.select(t)}},{key:"unSelect",value:function(t){this.selectionStateManager.unSelect(t)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){j_(G_(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),j_(G_(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(t){j_(G_(i.prototype),"onEnable",this).call(this,t),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Wf.a,this._onSelectionChange),this.stateManager.core.pad.on(wp.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),_r.on(wr.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(t){this.stateManager.core.pad.off(wp.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),_r.off(wr.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return U_})),this.selectionStateManager.off(Wf.a,this._onSelectionChange),this.rawSelected=[],this.selected=[],j_(G_(i.prototype),"onDisable",this).call(this,t)}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value;if(t.sort(z_),this.rawSelected!==t){this.rawSelected=t;var e=this.resolveSelected(t)||[];this.selectedIsChanged(this.selected,e)&&(this.selected=e),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(t){return t.filter((function(t){return t.entityType===DA}))}},{key:"selectedIsChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),n=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),o=0,i=n.length;o<i;++o)if(r[o]!==n[o])return!0;return!1}}])&&R_(e.prototype,r),n&&R_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);Y_.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",Y_.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var H_={entry:VC,scene:B_,select:Y_,fittingDesign:jw,baseDesignInfo:rE,viewParamModel:$w,rulerLine:YP,detection:hP};function V_(){return dL().axr.axrs}var q_=Object(wA.getConnector)(),W_=q_.connect,K_=q_.setRootState;function J_(t,e,r){return W_((function(){return t(V_(),dL().getStateManager())}),e,r)}var X_=r(504),Z_=r.n(X_),$_=r(910),tQ=r.n($_);function eQ(t){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oQ(n.key),n)}}function oQ(t){var e=function(t,e){if("object"!=eQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eQ(e)?e:String(e)}function iQ(t,e){return(iQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=uQ(t);if(e){var o=uQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sQ(this,r)}}function sQ(t,e){if(e&&("object"===eQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uQ(t){return(uQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cQ,AQ=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iQ(t,e)}(i,t);var e,r,n,o=aQ(i);function i(){return rQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.tip,r=t.noImg,n=t.imgSrc,o=t.className;return yu.a.createElement("div",{className:Z_()(tQ.a.empty,o)},!r&&yu.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),e&&yu.a.createElement("p",null,e))}}])&&nQ(e.prototype,r),n&&nQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent);function lQ(t){return(lQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fQ=["prefixCls","className","disabled","onDragStartT","onDragMoveT","onDragEndT","onDragCancelT"];function hQ(){return(hQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function pQ(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function dQ(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return gQ(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gQ(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function gQ(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IQ(n.key),n)}}function mQ(t,e,r){return e&&vQ(t.prototype,e),r&&vQ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IQ(t){var e=function(t,e){if("object"!=lQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lQ(e)?e:String(e)}function EQ(t,e){return(EQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=BQ(t);if(e){var o=BQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bQ(this,r)}}function bQ(t,e){if(e&&("object"===lQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function BQ(t){return(BQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wQ="tui-draggable",PQ={prefixCls:wQ},SQ="".concat(wQ,"-ignore"),_Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&EQ(t,e)}(r,t);var e=CQ(r);function r(){var t;return yQ(this,r),(t=e.apply(this,arguments)).elementRef=gu.createRef(),t.listening=!1,t.waitingMove=!1,t.handleMouseDown=function(e){var r=e.nativeEvent.target;r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLElement&&r.classList.contains(SQ)||function(){var t,r=dQ(e.nativeEvent.composedPath());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n instanceof HTMLElement&&n.classList.contains(SQ))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}()||(t.handleCancel(),0===e.button&&t.startDrag(e))},t.handleMouseMove=function(e){var r=t.props,n=r.onDragMoveT,o=r.onDragStartT,i=new QQ(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});if(t.waitingMove){if(!i.moved)return;t.waitingMove=!1;var a=o&&o(e,i);a&&a.start||t.clearDragging()}else n&&n(e,i);e.preventDefault()},t.handleMouseUp=function(e){var r=t.props.onDragEndT;if(!t.waitingMove){var n=new QQ(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});r&&r(e,n)}t.clearDragging()},t}return mQ(r,[{key:"componentDidUpdate",value:function(t){!t.disabled&&this.props.disabled&&this.handleCancel()}},{key:"componentWillUnmount",value:function(){this.handleCancel()}},{key:"render",value:function(){var t,e,r,n=this.props,o=n.prefixCls,i=n.className,a=n.disabled,s=(n.onDragStartT,n.onDragMoveT,n.onDragEndT,n.onDragCancelT,pQ(n,fQ)),u=Z_()(o,i,(t={},e="".concat(o,"-disabled"),r=a,(e=IQ(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t));return gu.createElement("div",hQ({ref:this.elementRef,className:u,onMouseDown:a?void 0:this.handleMouseDown},s),this.props.children)}},{key:"startDrag",value:function(t){if((e=t.nativeEvent)!==cQ&&(cQ=e,1)){var e;if(this.startPageX=t.pageX,this.startPageY=t.pageY,this.elementRef.current){var r=this.elementRef.current.getBoundingClientRect();this.startPositionX=r.left,this.startPositionY=r.top}this.addDragListeners(),t.preventDefault()}}},{key:"addDragListeners",value:function(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.listening=!0,this.waitingMove=!0}},{key:"removeDragListeners",value:function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.listening=!1,this.waitingMove=!1}},{key:"handleCancel",value:function(){if(this.listening){var t=this.props.onDragCancelT;t&&t()}this.clearDragging()}},{key:"clearDragging",value:function(){this.removeDragListeners()}}]),r}(gu.Component);_Q.defaultProps=PQ;var QQ=function(){function t(e,r){yQ(this,t),this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.dx=this.pageX-r.startPageX,this.dy=this.pageY-r.startPageY,this.offsetX=r.startPageX-r.startPositionX,this.offsetY=r.startPageY-r.startPositionY}return mQ(t,[{key:"moved",get:function(){return Math.abs(this.dx)>=1||Math.abs(this.dy)>=1}}]),t}(),OQ=_Q,DQ=r(895);function xQ(t){return(xQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function MQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TQ(n.key),n)}}function TQ(t){var e=function(t,e){if("object"!=xQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xQ(e)?e:String(e)}function jQ(t,e){return(jQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NQ(t);if(e){var o=NQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kQ(this,r)}}function kQ(t,e){if(e&&("object"===xQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NQ(t){return(NQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var FQ=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jQ(t,e)}(i,t);var e,r,n,o=LQ(i);function i(){return MQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props;return yu.a.createElement(DQ.b,t)}}])&&RQ(e.prototype,r),n&&RQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(gu.PureComponent),GQ=r(911),UQ=r.n(GQ);function zQ(t){return(zQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function YQ(){return(YQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function HQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qQ(n.key),n)}}function qQ(t){var e=function(t,e){if("object"!=zQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zQ(e)?e:String(e)}function WQ(t,e){return(WQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=XQ(t);if(e){var o=XQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JQ(this,r)}}function JQ(t,e){if(e&&("object"===zQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function XQ(t){return(XQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}gu.PureComponent;var ZQ,$Q=r(516),tO=r.n($Q);function eO(t){return(eO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uO(n.key),n)}}function oO(t,e){return(oO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sO(t);if(e){var o=sO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aO(this,r)}}function aO(t,e){if(e&&("object"===eO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sO(t){return(sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uO(t){var e=function(t,e){if("object"!=eO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eO(e)?e:String(e)}function cO(){return yu.a.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"14px",height:"14px",fill:"#FFAB00","aria-hidden":"true"},yu.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}))}!function(t){t.Warning="warning"}(ZQ||(ZQ={}));var AO,lO,fO,hO=(AO={},lO=ZQ.Warning,fO=yu.a.createElement(cO,null),(lO=uO(lO))in AO?Object.defineProperty(AO,lO,{value:fO,enumerable:!0,configurable:!0,writable:!0}):AO[lO]=fO,AO),pO={x:0,y:0},dO=J_((function(t){return{detection:t.detection.state}}),(function(t){return{message:t.detection.message,description:t.detection.description,defaultPosition:t.detection.defaultPosition,show:t.detection.show}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oO(t,e)}(i,t);var e,r,n,o=iO(i);function i(){var t;return rO(this,i),(t=o.apply(this,arguments)).state={position:pO},t.elementRef=yu.a.createRef(),t.dragStartPosition=pO,t.prevTranslate=pO,t.getAbsolutePosition=function(t){var e=t.x,r=t.y,n=window;return{x:e*n.innerWidth,y:r*n.innerHeight}},t.handleResize=function(){var e=t.elementRef.current;if(e){var r=t.getAbsolutePosition(t.prevTranslate),n=r.x,o=r.y,i=t.props.defaultPosition,a=t.getAbsolutePosition(i),s=window.innerWidth-a.x-e.clientWidth,u=window.innerHeight-a.y-e.clientHeight;t.setState({position:{x:Math.min(n,s),y:Math.min(o,u)}})}},t.handleDragStart=function(){return t.dragStartPosition=t.state.position,{start:!0}},t.handleDragMove=function(e,r){var n=t.elementRef.current;if(n){var o=t.props.defaultPosition,i=t.getAbsolutePosition(o),a=window.innerWidth-i.x-n.clientWidth,s=window.innerHeight-i.y-n.clientHeight,u={x:Object(Ql.a)(t.dragStartPosition.x+r.dx,0-i.x,a),y:Object(Ql.a)(t.dragStartPosition.y+r.dy,0-i.y,s)};t.setState({position:u}),t.prevTranslate={x:u.x/window.innerWidth,y:u.y/window.innerHeight}}},t.handleDragEnd=function(){t.dragStartPosition=pO},t.handleDragCancel=function(){t.dragStartPosition=pO},t}return e=i,(r=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"render",value:function(){var t=this.props,e=t.message,r=t.description,n=t.defaultPosition,o=t.show,i=this.state.position,a="translate("+i.x+"px, "+i.y+"px)";return o?yu.a.createElement(OQ,{style:{transform:a,left:"".concat(100*n.x,"%"),top:"".concat(100*n.y,"%")},className:tO.a.noticeDraggable,onDragStartT:this.handleDragStart,onDragMoveT:this.handleDragMove,onDragEndT:this.handleDragEnd,onDragCancelT:this.handleDragCancel},yu.a.createElement("div",{className:tO.a.noticeContent,ref:this.elementRef},yu.a.createElement("span",{className:tO.a.noticeIcon},hO[ZQ.Warning]),yu.a.createElement("div",{className:tO.a.noticeMessage},e),yu.a.createElement("div",{className:tO.a.noticeDescription},r))):null}}])&&nO(e.prototype,r),n&&nO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent)),gO=r(912),yO=r.n(gO),vO=r(556);function mO(t){return(mO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function IO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bO(n.key),n)}}function CO(t,e,r){return e&&EO(t.prototype,e),r&&EO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bO(t){var e=function(t,e){if("object"!=mO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mO(e)?e:String(e)}function BO(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wO(t,e)}function wO(t,e){return(wO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function PO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_O(t);if(e){var o=_O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return SO(this,r)}}function SO(t,e){if(e&&("object"===mO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _O(t){return(_O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var QO=Symbol("layout"),OO=J_((function(t){return{status:t.entry.state}}),(function(t){return{status:t.status.main}}),function(t){BO(r,t);var e=PO(r);function r(){return IO(this,r),e.apply(this,arguments)}return CO(r,[{key:"render",value:function(){return this.state.views.map((function(t){return t.content}))}}]),r}(vO.a)),DO=function(t){BO(r,t);var e=PO(r);function r(){return IO(this,r),e.apply(this,arguments)}return CO(r,[{key:"render",value:function(){return yu.a.createElement(OO,{mountPointId:QO})}}]),r}(yu.a.PureComponent),xO=r(165);function MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TO(n.key),n)}}function TO(t){var e=function(t,e){if("object"!=UO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==UO(e)?e:String(e)}function jO(){return(jO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LO(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function LO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=GO(t)););return t}function kO(t,e){return(kO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function NO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=GO(t);if(e){var o=GO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FO(this,r)}}function FO(t,e){if(e&&("object"===UO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function GO(t){return(GO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function UO(t){return(UO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var zO=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":UO(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};function YO(t,e){return t===e||t&&e&&t.equals(e)}var HO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kO(t,e)}(i,t);var e,r,n,o=NO(i);function i(){var t;return MO(this,i),(t=o.apply(this,arguments)).basicMaterial=new or.default.LineBasicMaterial({transparent:!0}),t.dashedMaterial=new or.default.LineDashedMaterial({transparent:!0,gapSize:20,dashSize:20}),t}return e=i,(r=[{key:"buildMesh",value:function(){var t=new or.default.Line(void 0,void 0);return t.outlineMode=or.default.OutlineMode.Disabled,t}},{key:"componentDidMount",value:function(){jO(GO(i.prototype),"componentDidMount",this).call(this),this.update({})}},{key:"componentDidUpdate",value:function(t,e){jO(GO(i.prototype),"componentDidUpdate",this).call(this,t,e),this.update(t)}},{key:"update",value:function(t){var e=this.props,r=e.start,n=e.end,o=e.dashed,i=e.interactive,a=void 0===i||i,s=e.color,u=e.alwaysTop,c=void 0===u||u,A=e.visible,l=void 0===A||A,f=e.opacity;if(!YO(t.start,r)||!YO(t.end,n)){var h=[];h.push(r.x,r.y,r.z),h.push(n.x,n.y,n.z);var p=new or.default.BufferGeometry;p.addAttribute("position",new or.default.BufferAttribute(new Float32Array(h),3)),or.geomOperator.computeLineDistances(p),this.mesh.geometry=p}this.mesh.setMaterials(o?this.dashedMaterial:this.basicMaterial),this.mesh.expectOnlyMaterial().setValues({color:s,depthTest:!c,opacity:f}),this.mesh.visible=l,this.mesh.renderOrder=c?999:0,this.mesh.interactionLayers=new or.default.Layers,this.mesh.interactionLayers.set(a?0:1)}}])&&RO(e.prototype,r),n&&RO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(92).b),VO=HO=zO([xO.a],HO),qO=r(393);function WO(t){return(WO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function JO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?KO(Object(r),!0).forEach((function(e){XO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function XO(t,e,r){return(e=tD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tD(n.key),n)}}function tD(t){var e=function(t,e){if("object"!=WO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WO(e)?e:String(e)}function eD(t,e){return(eD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=oD(t);if(e){var o=oD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nD(this,r)}}function nD(t,e){if(e&&("object"===WO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function oD(t){return(oD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{cameraPosition:t.scene3D.cameraAttributes.position,cameraLookAt:t.scene3D.cameraAttributes.lookAt,frustumSize:t.scene3D.cameraAttributes.frustumSize}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eD(t,e)}(i,t);var e,r,n,o=rD(i);function i(){return ZO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.position,r=t.text,n=t.style;return yu.a.createElement(qO.b,null,(function(t){var o=t.sceneToCanvas(e),i={position:"absolute",top:0,left:0,transform:"translate(-50%, -50%) translate(".concat(o.x,"px, ").concat(o.y,"px)")};return yu.a.createElement("div",{style:JO(JO({},n),i)},r)}))}}])&&$O(e.prototype,r),n&&$O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));function aD(t){return(aD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sD(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||cD(t,e)||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 uD(t){return function(t){if(Array.isArray(t))return AD(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||cD(t)||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 cD(t,e){if(t){if("string"==typeof t)return AD(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?AD(t,e):void 0}}function AD(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hD(n.key),n)}}function hD(t){var e=function(t,e){if("object"!=aD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aD(e)?e:String(e)}function pD(t,e){return(pD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yD(t);if(e){var o=yD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gD(this,r)}}function gD(t,e){if(e&&("object"===aD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yD(t){return(yD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vD=J_((function(t){return{rulerLine:t.rulerLine.state}}),(function(t){return{dimensionRulers:new Map(uD(t.rulerLine.dimensionRulers.entries()).map((function(t){var e=sD(t,2);return[e[0],e[1].rulerConfig]}))),spacingDistanceRulers:new Map(uD(t.rulerLine.spacingDistanceRulers.entries()).map((function(t){var e=sD(t,2);return[e[0],e[1].rulerConfigs]})))}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pD(t,e)}(i,t);var e,r,n,o=dD(i);function i(){return lD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.dimensionRulers,r=t.spacingDistanceRulers;return yu.a.createElement(yu.a.Fragment,null,uD(e.entries()).map((function(t){var e=sD(t,2),r=e[0],n=e[1],o=n.mainLine,i=n.capLines,a=n.lineStyle,s=a.color,u=a.opacity,c=n.textStyle,A=n.text,l=n.textPosition;return yu.a.createElement(gu.Fragment,{key:r},[o].concat(uD(i)).map((function(t,e){return yu.a.createElement(VO,{opacity:u,color:s,key:e,start:t.start,end:t.end})})),yu.a.createElement(iD,{position:l,text:A,style:c}))})),uD(r.entries()).map((function(t){var e=sD(t,2),r=e[0];return e[1].map((function(t,e){var n=t.mainLine,o=t.capLines,i=t.lineStyle,a=i.color,s=i.opacity,u=t.textStyle,c=t.text,A=t.textPosition;return yu.a.createElement(gu.Fragment,{key:"".concat(r,"-").concat(e)},[n].concat(uD(o)).map((function(t,e){return yu.a.createElement(VO,{opacity:s,color:a,key:e,start:t.start,end:t.end})})),yu.a.createElement(iD,{position:A,text:c,style:u}))}))})))}}])&&fD(e.prototype,r),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent)),mD=r(213);function ID(t){return(ID="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ED(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bD(n.key),n)}}function CD(t,e,r){return e&&ED(t.prototype,e),r&&ED(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bD(t){var e=function(t,e){if("object"!=ID(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ID(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ID(e)?e:String(e)}function BD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wD(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&PD(t,e)}function PD(t,e){return(PD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=QD(t);if(e){var o=QD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _D(this,r)}}function _D(t,e){if(e&&("object"===ID(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function QD(t){return(QD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var OD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){var e=t.scene3D;return{cameraType:e.cameraType,cameraAttributes:e.cameraAttributes,initCameraAttributes:e.initCameraAttributes,perspectiveCameraMode:e.perspectiveCameraMode,perspectiveCameraFov:e.perspectiveCameraFov,groundGridConfig:e.groundGridConfig,enableCameraAnimation:e.enableCameraAnimation,renderMode:e.renderMode,cameraControlMode:e.cameraControlMode}}),function(t){wD(r,t);var e=SD(r);function r(){return BD(this,r),e.apply(this,arguments)}return CD(r)}(bc.ob.DeprecatedFullScene3D)),DD=function(t){wD(r,t);var e=SD(r);function r(){return BD(this,r),e.apply(this,arguments)}return CD(r,[{key:"render",value:function(){return this.state.views.map((function(t){t.key;return t.content}))}}]),r}(vO.a),xD=J_((function(){return{}}),(function(){return{}}),function(t){wD(r,t);var e=SD(r);function r(){var t;return BD(this,r),(t=e.apply(this,arguments)).onInit=function(t){var e=t.viewer.config;zS(t.viewer),e.autoInstance.enabled.set(!0),e.popMeshMerge.enabled.set(!0),e.background.active.set(or.BackgroundMode.SolidColorBackground),e.background.solid.color.set(new or.Color(pI.sceneBG)),e.ground.enabled.set(!1),e.effects.planarShadow.enabled.set(!1),e.effects.taa.enabled.set(!1),e.staticFrameCache.enabled.set(!1),e.isExtraCopyBeforeScreenEnabled.set(!1),e.effects.ao.enabled.set(!1),dL().viewer.onScene3DInit(t)},t.onGrabStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateGrabing(!0)},t.onGrabEnd=function(){t.props.rootState.scene3D.updateGrabing(!1)},t.onZoomStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateZooming(!0)},t.onZoomEnd=function(){t.props.rootState.scene3D.updateZooming(!1)},t.onCameraAnimationEnd=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1)},t}return CD(r,[{key:"render",value:function(){var t=this.props,e=t.rootState.scene3D,r=t.containerId,n=t.size;return yu.a.createElement(OD,{enableAO:!1,onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:e.updateScale,onCameraAttributesChange:e.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd,orthCameraDirectionChangeable:!0,cameraControlMode:mD.a.defaultMode},yu.a.createElement(DD,{mountPointId:jI.scene3D}))}}]),r}(yu.a.PureComponent));function MD(t){return(MD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function RD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jD(n.key),n)}}function jD(t){var e=function(t,e){if("object"!=MD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=MD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==MD(e)?e:String(e)}function LD(t,e){return(LD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=FD(t);if(e){var o=FD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ND(this,r)}}function ND(t,e){if(e&&("object"===MD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function FD(t){return(FD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{size:t.scene3D.size}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&LD(t,e)}(i,t);var e,r,n,o=kD(i);function i(){var t;return RD(this,i),(t=o.apply(this,arguments)).rootRef=yu.a.createRef(),t.updateLayout=Object(Or.throttle)((function(){var e=t.rootRef.current;if(e){var r=e.getBoundingClientRect();t.props.rootState.scene3D.updateSize(new bn.default(r.width,r.height))}}),200),t}return e=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 t=this.props,e=t.size,r=t.className;return yu.a.createElement("div",{ref:this.rootRef,id:hI.SCENE_ID,className:r},yu.a.createElement(xD,{containerId:hI.SCENE_ID,size:new c.Vector2d(e.x,e.y)}))}}])&&TD(e.prototype,r),n&&TD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));r(1380);function UD(t){return(UD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,HD(n.key),n)}}function HD(t){var e=function(t,e){if("object"!=UD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==UD(e)?e:String(e)}function VD(t,e){return(VD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=KD(t);if(e){var o=KD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return WD(this,r)}}function WD(t,e){if(e&&("object"===UD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function KD(t){return(KD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var JD=J_((function(){return{}}),(function(){return{}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&VD(t,e)}(i,t);var e,r,n,o=qD(i);function i(){return zD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return yu.a.createElement(yu.a.Fragment,null,yu.a.createElement(vI.a,{mountPointId:QO},yu.a.createElement(GD,{key:"s3",className:yO.a.scene3D}),yu.a.createElement(dO,null)),yu.a.createElement(vI.a,{mountPointId:jI.scene3D},yu.a.createElement(vD,null)))}}])&&YD(e.prototype,r),n&&YD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));function XD(t,e){if(t.length!==e.length)return[];for(var r=t.length,n=[],o=0;o<r-1;o++)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].x,e[o].y,e[o].z),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+1].x,t[o+1].y,t[o+1].z);return n}function ZD(t){return(ZD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tx(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$D(Object(r),!0).forEach((function(e){ex(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ex(t,e,r){var n;return n=function(t,e){if("object"!=ZD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ZD(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rx(t){var e=t.color,r=t.side,n=t.opacity,o=t.points,i=t.matrix,a=t.depth,s=new or.Shape,u=new or.MeshBasicMaterial(tx({color:e,side:r},PC(n)));s.setFromPoints(o.map((function(t){return new or.Vector2(t.x,t.y)})));var c=or.shapeBuilder.shape({shapes:s}),A=new or.Mesh(c,u);return A.position.set(0,0,a),A.applyMatrix(i),SC(A),A}function nx(t){var e=t.matrix,r=t.side,n=t.color,o=t.opacity,i=new or.MeshBasicMaterial(tx({side:r,color:n},PC(o))),a=new or.BufferGeometry,s=XD(t.topPoints,t.bottomPoints);a.addAttribute("position",new or.BufferAttribute(new Float32Array(s),3));var u=new or.Mesh(a,i);return u.applyMatrix(e),SC(u),u}function ox(t){var e=or.geomOperator.createEdge(t,25),r=new or.LineBasicMaterial({color:pI.outline,depthTest:!0,depthWrite:!0}),n=new or.LineSegments(e,r);return SC(n),n}function ix(t){return function(t){if(Array.isArray(t))return ux(t)}(t)||cx(t)||sx(t)||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 ax(t){return function(t){if(Array.isArray(t))return t}(t)||cx(t)||sx(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 sx(t,e){if(t){if("string"==typeof t)return ux(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ux(t,e):void 0}}function ux(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cx(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Ax(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lx(t,e,r){return(e=hx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fx(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hx(n.key),n)}}function hx(t){var e=function(t,e){if("object"!=vx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vx(e)?e:String(e)}function px(t,e){return(px=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yx(t);if(e){var o=yx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gx(this,r)}}function gx(t,e){if(e&&("object"===vx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yx(t){return(yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function vx(t){return(vx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var mx,Ix=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":vx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ex=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":vx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Cx=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&px(t,e)}(i,t);var e,r,n,o=dx(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=SI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.shapeArrPointsInGroove,a=t.grooveStart,s=t.grooveEnd,u=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ax(Object(r),!0).forEach((function(e){lx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ax(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:or.Side.DoubleSide,color:r},PC(n))),c=i.map((function(e){var r=new or.Shape,n=ax(e),i=n[0],a=n.slice(1);r.moveTo(i.x,i.y),a.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(i.x,i.y);var s=or.shapeBuilder.extrude(r,{bevelEnabled:!1,depth:o}),c=new or.Mesh(s,u),A=pC(t.grooveFacePointToGlobalMatrix());return c.applyMatrix(A),SC(c),c})),A=c.map((function(t){var e=ox(t.geometry);return t.add(e),e}));e.wireFrames=A,e.updateWireFrameVisibility();var l=new or.Group;return l.add(c),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&l.add([a,s].map((function(e,r){var n=new or.Mesh(Bx,0===r?wx:Px);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),l},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&fx(e.prototype,r),n&&fx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function bx(t){return dP([].concat(ix(t.getTopRenderPoints()),ix(t.getBottomRenderPoints())))}Cx=Ix([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.squareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:bx(this.$model)}}))]),Ex("design:paramtypes",["function"==typeof(mx=void 0!==bs&&bs)?mx:Object])],Cx);var Bx=new or.shapeBuilder.SphereBufferGeometry(3),wx=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),Px=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Sx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sx(Object(r),!0).forEach((function(e){Qx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sx(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qx(t,e,r){return(e=Dx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ox(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dx(n.key),n)}}function Dx(t){var e=function(t,e){if("object"!=jx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jx(e)?e:String(e)}function xx(t,e){return(xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tx(t);if(e){var o=Tx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rx(this,r)}}function Rx(t,e){if(e&&("object"===jx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tx(t){return(Tx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jx(t){return(jx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Lx,kx,Nx=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Fx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gx=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xx(t,e)}(i,t);var e,r,n,o=Mx(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).$model=t,r.entityMap=e,r.entityType=II,r.wireFrames=[],r.renderCubeMesh=function(){var t=r.$model,e=t.position,n=t.size,o=t.rotate,i=t.visible,a=t.viewColor,s=t.opacity,u=or.shapeBuilder.box({width:n.x,height:n.y,depth:n.z}),c=new or.MeshBasicMaterial(_x({color:a,visible:i},PC(s))),A=new or.Mesh(u,c);A.position.set(e.x,e.y,e.z),A.rotation.set(o.x,o.y,o.z),A.visible=i,SC(A);var l=[A].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return r.wireFrames=l,r.updateWireFrameVisibility(),A},r.renderCylinderMesh=function(){var t=r.$model,e=t.position,n=t.visible,o=t.rotate,i=t.height,a=t.viewColor,s=t.opacity,u=t.fittingData.diameter/2,c=or.shapeBuilder.cylinder({radiusTop:u,radiusBottom:u,height:i}),A=new or.MeshBasicMaterial(_x({color:a,visible:n},PC(s))),l=new or.Mesh(c,A);l.position.set(e.x,e.y,e.z),l.rotation.set(o.x,o.y,o.z),SC(l);var f=[l].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return r.wireFrames=f,r.updateWireFrameVisibility(),l},r.entityId=t.id,r}return e=i,(r=[{key:"createRenderMesh",value:function(){var t=this.$model.type;return t===J.GROOVE?this.renderCubeMesh():t===J.HOLE?this.renderCylinderMesh():void 0}},{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Ox(e.prototype,r),n&&Ox(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function Ux(t){return function(t){if(Array.isArray(t))return zx(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return zx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zx(t,e)}(t)||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 zx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hx(t,e,r){return(e=qx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vx(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qx(n.key),n)}}function qx(t){var e=function(t,e){if("object"!=Zx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Zx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Zx(e)?e:String(e)}function Wx(t,e){return(Wx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Kx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xx(t);if(e){var o=Xx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jx(this,r)}}function Jx(t,e){if(e&&("object"===Zx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xx(t){return(Xx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zx(t){return(Zx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Gx=Nx([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this,e=this.$model.type;return{create:function(){var e=t.createRenderMesh();return t.entityMap.set(e,{entityId:t.$model.id,entityType:II}),e},update:function(e){var r=t.$model,n=r.position,o=r.visible;e.position.set(n.x,n.y,n.z),e.visible=o,e.material&&(e.material.visible=o),t.updateWireFrameVisibility()},get interactionPriority(){return e===J.HOLE?V_().scene.state.state.interactionPriority.hole:V_().scene.state.state.interactionPriority.groove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),Fx("design:paramtypes",["function"==typeof(Lx=void 0!==Cn&&Cn)?Lx:Object,"function"==typeof(kx="undefined"!=typeof Map&&Map)?kx:Object])],Gx);var $x,tM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Zx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},eM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Zx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},rM=bc.ib.Highlighters.generateWireGeometryForHighlighterGeometry,nM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wx(t,e)}(i,t);var e,r,n,o=Kx(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=BI,e.entityId=t.id,e}return e=i,(r=[{key:"createOutlineMesh",value:function(){var t=this.$model.hintOutline,e=t.color,r=t.opacity,n=this.$model.visible,o=function(t){var e=new or.BufferGeometry,r=t.getVertices(),n=[];t.getIndices().forEach((function(t){n.push(r[t.x],r[t.y])})),e.setAttribute("position",bc.ib.createBufferAttribute(n)),e.computeBoundingBox();var o=e.getBoundingBox().getCenter(new or.Vector3);return e.setAttribute("position",bc.ib.createBufferAttribute(n.map((function(t){return function(t,e){var r=new or.Vector3(e.x,e.y,e.z).sub(t);return t.clone().add(r)}(o,t)})))),e}(this.getGeometry()),i=new or.LineBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yx(Object(r),!0).forEach((function(e){Hx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yx(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:e},PC(r))),a=new or.LineSegments(o,i);return or.geomOperator.computeLineDistances(o),a.renderOrder=999,a.outlineMode=or.OutlineMode.Disabled,a.castPlanarShadow=!1,a.castShadow=!1,a.visible=n,i.visible=n,a}},{key:"getGeometry",value:function(){var t,e=this.$model.linkModel;return t=e instanceof Qe.CoreParamModel?e.getConcatenatedBox3():e instanceof Cn||e instanceof Ia?e.boundingBox:dP([].concat(Ux(e.getTopRenderPoints()),Ux(e.getBottomRenderPoints()))),rM(t)}}])&&Vx(e.prototype,r),n&&Vx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),oM=nM=tM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createOutlineMesh()},update:function(e){var r=t.$model.visible;e.visible=r,e.getMaterials().forEach((function(t){t.visible=r}))}}}))]),eM("design:paramtypes",["function"==typeof($x=void 0!==un&&un)?$x:Object])],nM);function iM(t){return function(t){if(Array.isArray(t))return aM(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return aM(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aM(t,e)}(t)||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 aM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uM(n.key),n)}}function uM(t){var e=function(t,e){if("object"!=hM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hM(e)?e:String(e)}function cM(t,e){return(cM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fM(t);if(e){var o=fM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lM(this,r)}}function lM(t,e){if(e&&("object"===hM(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fM(t){return(fM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hM(t){return(hM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var pM,dM,gM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hM(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":hM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cM(t,e)}(i,t);var e,r,n,o=AM(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).$model=t,r.entityMap=e,r.entityType=EI,r.wireFrames=[],r.entityId=t.id,r}return e=i,(r=[{key:"createGrooveFittingRender",value:function(){var t=this.$model,e=new or.Group,r=t.pointToGlobalMatrix(),n=t.depth,o=t.viewColor,i=t.opacity,a=t.visible,s=void 0!==a&&a,u=t.path.getAllPolygonPoints(),A=new Pe.default;A.fromString(r.toArray().join(","));var l=pC(A),f=rx({matrix:l,depth:0,points:u,color:o,side:or.Side.FrontSide,opacity:i}),h=rx({matrix:l,depth:-n,points:u,color:o,side:or.Side.BackSide,opacity:i}),p=[].concat(iM(u),[u[0]]),d=nx({matrix:l,topPoints:p.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:p.map((function(t){return new c.Point3d(t.x,t.y,-n)})),color:o,side:or.Side.DoubleSide,opacity:i});[f,h,d,e].forEach((function(t){t.visible=s}));var g=[f,h,d],y=g.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return this.wireFrames=y,this.updateWireFrameVisibility(),e.add(g),e}},{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&sM(e.prototype,r),n&&sM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function mM(t){var e=new c.BBox3d;return[].concat(iM(t.getTopRenderPoints()),iM(t.getBottomRenderPoints())).forEach((function(t){e.addPoint(new c.Point3d(t))})),new Be.default(new _e.default({x:e.width,y:e.height,z:e.depth}),new _e.default(e.center),new _e.default({x:0,y:0,z:0}))}function IM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function EM(t,e,r){return(e=bM(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bM(n.key),n)}}function bM(t){var e=function(t,e){if("object"!=_M(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_M(e)?e:String(e)}function BM(t,e){return(BM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=SM(t);if(e){var o=SM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PM(this,r)}}function PM(t,e){if(e&&("object"===_M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function SM(t){return(SM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _M(t){return(_M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vM=gM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){var e=t.createGrooveFittingRender();return t.entityMap.set(e,{entityId:t.$model.id,entityType:EI}),e},update:function(e){var r=t.$model.visible;e.traverse((function(t){t.visible=r,t instanceof or.Mesh&&t.getMaterials().forEach((function(t){t.visible=r}))})),e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.hardwareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:mM(this.$model)}}))]),yM("design:paramtypes",["function"==typeof(pM=void 0!==mo&&mo)?pM:Object,"function"==typeof(dM="undefined"!=typeof Map&&Map)?dM:Object])],vM);var QM,OM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_M(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},DM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_M(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},xM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&BM(t,e)}(i,t);var e,r,n,o=wM(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=PI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.height,n=t.color,o=t.opacity,i=t.position,a=t.rotate,s=t.radius,u=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?IM(Object(r),!0).forEach((function(e){EM(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IM(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:n},PC(o))),c=or.shapeBuilder.cylinder({radiusTop:s,radiusBottom:s,height:r}),A=new or.Mesh(c,u);A.position.set(i.x,i.y,i.z),A.rotation.set(a.x,a.y,a.z),SC(A);var l=[A].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=l,e.updateWireFrameVisibility(),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&CM(e.prototype,r),n&&CM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function MM(t){var e=new or.BufferGeometry;if(e.index=new or.BufferAttribute(new Uint16Array(t.indices),1),e.addAttribute("position",new or.BufferAttribute(new Float32Array(t.vertices),3)),e.addAttribute("uv",new or.BufferAttribute(new Float32Array(t.textures),2)),t.normals){var r=new Float32Array(t.normals);e.addAttribute("normal",new or.BufferAttribute(r,3))}else or.geomOperator.computeNormalsByPosition(e);return e}function RM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TM(n.key),n)}}function TM(t){var e=function(t,e){if("object"!=FM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=FM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==FM(e)?e:String(e)}function jM(t,e){return(jM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NM(t);if(e){var o=NM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kM(this,r)}}function kM(t,e){if(e&&("object"===FM(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NM(t){return(NM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function FM(t){return(FM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}xM=OM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,e.material&&(e.material.visible=r),t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.holeV2}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),DM("design:paramtypes",["function"==typeof(QM=void 0!==Ia&&Ia)?QM:Object])],xM);var GM,UM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FM(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},zM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":FM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},YM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jM(t,e)}(i,t);var e,r,n,o=LM(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=CI,e.entityId=t.id,e}return e=i,r&&RM(e.prototype,r),n&&RM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a),HM=YM=UM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.geometryModel,n=e.viewColor,o=e.originPoints,i=new or.Group,a=MM(r),s=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:or.Side.DoubleSide}),u=new or.Mesh(a,s);u.renderOrder=998,i.add(u),SC(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(t){var e=new or.Mesh(VM,qM);return e.position.set(t.x,t.y,t.z),e.renderOrder=999,e})));return i}(t)},update:function(){}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.bbox}}))]),zM("design:paramtypes",["function"==typeof(GM=void 0!==jo&&jo)?GM:Object])],YM),VM=new or.shapeBuilder.SphereBufferGeometry(3),qM=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function WM(t){return function(t){if(Array.isArray(t))return KM(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return KM(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KM(t,e)}(t)||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 KM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function JM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,XM(n.key),n)}}function XM(t){var e=function(t,e){if("object"!=rR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rR(e)?e:String(e)}function ZM(t,e){return(ZM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $M(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=eR(t);if(e){var o=eR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tR(this,r)}}function tR(t,e){if(e&&("object"===rR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function eR(t){return(eR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rR(t){return(rR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var nR,oR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},iR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":rR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},aR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZM(t,e)}(i,t);var e,r,n,o=$M(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=OI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.connectivePath.map((function(t){return t.getAllPolygonPoints()})).flat(),u=new Pe.default;u.fromString(n.toArray().join(","));var A=pC(u),l=rx({matrix:A,depth:0,points:s,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:-o,points:s,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(WM(s),[s[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&JM(e.prototype,r),n&&JM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function sR(t){return dP([].concat(WM(t.getTopRenderPoints()),WM(t.getBottomRenderPoints())))}function uR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cR(n.key),n)}}function cR(t){var e=function(t,e){if("object"!=pR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pR(e)?e:String(e)}function AR(t,e){return(AR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hR(t);if(e){var o=hR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fR(this,r)}}function fR(t,e){if(e&&("object"===pR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hR(t){return(hR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pR(t){return(pR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}aR=oR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.pathGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:sR(this.$model)}}))]),iR("design:paramtypes",["function"==typeof(nR=void 0!==Oa&&Oa)?nR:Object])],aR);var dR,gR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&AR(t,e)}(i,t);var e,r,n,o=lR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=DI,e.entityId=t.id,e}return e=i,r&&uR(e.prototype,r),n&&uR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a);function mR(t){var e=t.linkModel,r=t.faceId,n=e.getConcatenatedMatrix(),o=function(t){var e,r=null===(e=t.getParam("thickness"))||void 0===e?void 0:e.getData().value;return r?+r:0}(e),i=r===se.TOP?o/2:-o/2;return{position:new _e.default(0,0,i).applyMatrix4(n),rotation:(new or.Euler).setFromRotationMatrix(pC(n))}}function IR(t){var e=t.outer,r=t.inners,n=ER(e),o=r.map(ER);return n.holes=o,n}function ER(t){var e=t[0],r=new or.Shape;return r.moveTo(e.x,e.y),t.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(e.x,e.y),r}function CR(t){return function(t){if(Array.isArray(t))return bR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bR(t,e)}(t)||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 bR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function BR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wR(n.key),n)}}function wR(t){var e=function(t,e){if("object"!=OR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OR(e)?e:String(e)}function PR(t,e){return(PR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=QR(t);if(e){var o=QR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _R(this,r)}}function _R(t,e){if(e&&("object"===OR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function QR(t){return(QR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OR(t){return(OR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vR=gR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.color,r=t.opacity,n=t.faces,o=t.visible,i=t.faceId===se.TOP?or.Side.FrontSide:or.Side.BackSide,a=new or.MeshBasicMaterial({transparent:!0,opacity:r,color:e,side:i}),s=n.map(IR),u=or.shapeBuilder.shape({shapes:s}),c=new or.Mesh(u,a),A=mR(t),l=A.position,f=A.rotation;return c.position.set(l.x,l.y,l.z),c.rotation.set(f.x,f.y,f.z),c.visible=o,a.visible=o,SC(c),c}(t.$model)},update:function(e){var r=t.$model,n=r.visible,o=r.color,i=r.opacity;e.visible=n,e.expectOnlyMaterial().setValues({opacity:i,color:o,visible:n});var a=mR(t.$model),s=a.position,u=a.rotation;e.position.set(s.x,s.y,s.z),e.rotation.set(u.x,u.y,u.z)}}}))]),yR("design:paramtypes",["function"==typeof(dR=void 0!==Vo&&Vo)?dR:Object])],vR);var DR,xR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":OR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},MR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},RR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&PR(t,e)}(i,t);var e,r,n,o=SR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=bI,e.entityId=t.id,e}return e=i,r&&BR(e.prototype,r),n&&BR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a),TR=RR=xR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.plankFaces,n=e.linkModel,o=e.hintOutline,i=n.getConcatenatedMatrix(),a=new or.Group;r&&r.forEach((function(t){var e=MM(tu(t,i)),r=new or.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:t.color,opacity:t.opacity,transparent:!0,side:or.Side.DoubleSide}),n=new or.Mesh(e,r);n.renderOrder=998,SC(n),a.add(n)}));if(o){var s=n.getSize(),u=n.getWireFrames();if(!u){var c=iw(0,s),A=iw(5,s);u=[].concat(CR(Object(Or.zip)(c,[].concat(CR(c.slice(1)),[c[0]]))),CR(Object(Or.zip)(A,[].concat(CR(A.slice(1)),[A[0]]))),CR(Object(Or.zip)(c,A))).flat().map((function(t){return[t.x,t.y,t.z]})).flat()}var l=Object(Or.chunk)(u,3).map((function(t){return new _e.default(t[0],t[1],t[2]).applyMatrix4(i)})).map((function(t){return[t.x,t.y,t.z]})).flat(),f=new Sl({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});a.add(f)}return a}(t)},update:function(){}}}))]),MR("design:paramtypes",["function"==typeof(DR=void 0!==ti&&ti)?DR:Object])],RR);function jR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function LR(t,e,r){return(e=NR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NR(n.key),n)}}function NR(t){var e=function(t,e){if("object"!=YR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YR(e)?e:String(e)}function FR(t,e){return(FR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zR(t);if(e){var o=zR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UR(this,r)}}function UR(t,e){if(e&&("object"===YR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zR(t){return(zR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YR(t){return(YR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var HR,VR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":YR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},qR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":YR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},WR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FR(t,e)}(i,t);var e,r,n,o=GR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=wI,e.entityId=t.id,e}return e=i,(r=[{key:"createMesh",value:function(){var t=this.$model,e=t.viewColor,r=t.opacity,n=t.visible;if(t.linkModel){var o=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jR(Object(r),!0).forEach((function(e){LR(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jR(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},PC(r))),i=new or.Mesh(new or.BufferGeometry,o);return o.setValues({side:or.Side.DoubleSide,color:e}),i.useOriginMaterialInTransparentMode=!0,i.outlineMode=or.OutlineMode.Disabled,i.castShadow=!1,i.castPlanarShadow=!1,i.visible=n,o.visible=n,this.updateMesh(i),i}}},{key:"updateMesh",value:function(t){var e=this.$model,r=e.points,n=e.linkModel,o=e.height,i=r.map((function(t){return new c.Point3d(t.x,t.y,o/2)})),a=r.map((function(t){return new c.Point3d(t.x,t.y,-o/2)}));if(t.geometry instanceof or.BufferGeometry){var s=XD(i,a);t.geometry.addAttribute("position",new or.BufferAttribute(new Float32Array(s),3)),t.geometry.destroy()}var u=n.getConcatenatedMatrix(),A=new _e.default(0,0,0).applyMatrix4(u);return t.position.set(A.x,A.y,A.z),t.rotation.setFromRotationMatrix(pC(u)),t}}])&&kR(e.prototype,r),n&&kR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),KR=WR=VR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createMesh()},update:function(e){var r=t.$model,n=r.visible,o=r.viewColor,i=r.opacity;e.visible=n,e.getMaterials().forEach((function(t){t.setValues({opacity:i,color:o,visible:n})})),t.updateMesh(e)}}}))]),qR("design:paramtypes",["function"==typeof(HR=void 0!==Ai&&Ai)?HR:Object])],WR);function JR(t){return function(t){if(Array.isArray(t))return XR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return XR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XR(t,e)}(t)||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 XR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ZR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$R(n.key),n)}}function $R(t){var e=function(t,e){if("object"!=oT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oT(e)?e:String(e)}function tT(t,e){return(tT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function eT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nT(t);if(e){var o=nT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rT(this,r)}}function rT(t,e){if(e&&("object"===oT(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nT(t){return(nT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oT(t){return(oT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var iT,aT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":oT(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},sT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":oT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},uT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tT(t,e)}(i,t);var e,r,n,o=eT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=_I,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.data,u=t.path.getAllPolygonPoints(),A=pC(n),l=rx({matrix:A,depth:o,points:u,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:0,points:u,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(JR(u),[u[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,o)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&r.add([s.start,s.end].map((function(e,r){var n=new or.Mesh(AT,0===r?lT:fT);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&ZR(e.prototype,r),n&&ZR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function cT(t){return dP([].concat(JR(t.getTopRenderPoints()),JR(t.getBottomRenderPoints())))}uT=aT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.roundCornerGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:cT(this.$model)}}))]),sT("design:paramtypes",["function"==typeof(iT=void 0!==Ga&&Ga)?iT:Object])],uT);var AT=new or.shapeBuilder.SphereBufferGeometry(3),lT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),fT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function hT(t){return function(t){if(Array.isArray(t))return pT(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return pT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pT(t,e)}(t)||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 pT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gT(n.key),n)}}function gT(t){var e=function(t,e){if("object"!=ET(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ET(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ET(e)?e:String(e)}function yT(t,e){return(yT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=IT(t);if(e){var o=IT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mT(this,r)}}function mT(t,e){if(e&&("object"===ET(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function IT(t){return(IT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ET(t){return(ET="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var CT,bT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ET(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},BT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ET(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},wT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yT(t,e)}(i,t);var e,r,n,o=vT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=QI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.path.getAllPolygonPoints(),u=new Pe.default;u.fromString(n.toArray().join(","));var A=pC(u),l=rx({matrix:A,depth:0,points:s,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:-o,points:s,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(hT(s),[s[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&dT(e.prototype,r),n&&dT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function PT(t){return dP([].concat(hT(t.getTopRenderPoints()),hT(t.getBottomRenderPoints())))}function ST(t){return function(t){if(Array.isArray(t))return OT(t)}(t)||DT(t)||QT(t)||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 _T(t){return function(t){if(Array.isArray(t))return t}(t)||DT(t)||QT(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 QT(t,e){if(t){if("string"==typeof t)return OT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?OT(t,e):void 0}}function OT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function DT(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function xT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function MT(t,e,r){return(e=TT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TT(n.key),n)}}function TT(t){var e=function(t,e){if("object"!=FT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=FT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==FT(e)?e:String(e)}function jT(t,e){return(jT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NT(t);if(e){var o=NT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kT(this,r)}}function kT(t,e){if(e&&("object"===FT(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NT(t){return(NT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function FT(t){return(FT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}wT=bT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.specialShapedGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:PT(this.$model)}}))]),BT("design:paramtypes",["function"==typeof(CT=void 0!==Za&&Za)?CT:Object])],wT);var GT,UT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FT(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},zT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":FT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},YT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jT(t,e)}(i,t);var e,r,n,o=LT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=SI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.data,a=t.shapeArrPointsInGroove,s=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xT(Object(r),!0).forEach((function(e){MT(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:or.Side.DoubleSide,color:r},PC(n))),u=a.map((function(e){var r=new or.Shape,n=_T(e),i=n[0],a=n.slice(1);r.moveTo(i.x,i.y),a.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(i.x,i.y);var u=or.shapeBuilder.extrude(r,{bevelEnabled:!1,depth:o}),c=new or.Mesh(u,s),A=pC(t.grooveFacePointToGlobalMatrix());return c.applyMatrix(A),SC(c),c})),c=u.map((function(t){var e=ox(t.geometry);return t.add(e),e}));e.wireFrames=c,e.updateWireFrameVisibility();var A=new or.Group;return A.add(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&A.add([i.start,i.end].map((function(e,r){var n=new or.Mesh(VT,0===r?qT:WT);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&RT(e.prototype,r),n&&RT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function HT(t){return dP([].concat(ST(t.getTopRenderPoints()),ST(t.getBottomRenderPoints())))}YT=UT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.squareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:HT(this.$model)}}))]),zT("design:paramtypes",["function"==typeof(GT=void 0!==ls&&ls)?GT:Object])],YT);var VT=new or.shapeBuilder.SphereBufferGeometry(3),qT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),WT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function KT(t){return(KT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function JT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ZT(n.key),n)}}function XT(t,e,r){return e&&JT(t.prototype,e),r&&JT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ZT(t){var e=function(t,e){if("object"!=KT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KT(e)?e:String(e)}var $T=XT((function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.getDesignDoc=e,this.objectEntityMap=new Map,this.createFittingEntities=bc.ob.flatEntitiesCreator((function(t){return new Gx(t,r.objectEntityMap)})),this.createIntersectEntities=bc.ob.flatEntitiesCreator((function(t){return new HM(t)})),this.createGrooveFittingEntities=bc.ob.flatEntitiesCreator((function(t){return new vM(t,r.objectEntityMap)})),this.createPlankFaceHintEntities=bc.ob.flatEntitiesCreator((function(t){return new TR(t)})),this.careateFittingHintEntities=bc.ob.flatEntitiesCreator((function(t){return new oM(t)})),this.careatePlankOutlineHintEntities=bc.ob.flatEntitiesCreator((function(t){return new KR(t)})),this.createHoleEntities=bc.ob.flatEntitiesCreator((function(t){return new xM(t)})),this.createSquareGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new YT(t)})),this.createArcSquareGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new Cx(t)})),this.createRoundCornerGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new uT(t)})),this.createSpecialShapedGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new wT(t)})),this.createPathGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new aR(t)})),this.createPlankAreaFaceHintEntities=bc.ob.flatEntitiesCreator((function(t){return new vR(t)})),this.getFittingEntities=function(){var t=r.getDesignDoc();return t?r.createFittingEntities(t.getFittings()):[]},this.getGrooveFittingEntities=function(){var t=r.getDesignDoc();return t?r.createGrooveFittingEntities(t.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var t=r.getDesignDoc();return t?r.createIntersectEntities(t.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankFaceHintEntities(t.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var t=r.getDesignDoc();return t?r.careateFittingHintEntities(t.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var t=r.getDesignDoc();return t?r.careatePlankOutlineHintEntities(t.getPlankOutlineHintModels()):[]},this.getHoleEntities=function(){var t=r.getDesignDoc();return t?r.createHoleEntities(t.getHoleModels()):[]},this.getSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSquareGrooveEntities(t.getSquareGrooveModels()):[]},this.getArcSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createArcSquareGrooveEntities(t.getArcSquareGrooveModels()):[]},this.getRoundCornerGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createRoundCornerGrooveEntities(t.getRoundCornerGrooveModels()):[]},this.getSpecialShapedGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSpecialShapedGrooveEntities(t.getSpecialShapedGrooveModels()):[]},this.getPathGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createPathGrooveEntities(t.getPathGrooveModels()):[]},this.getPlankAreaFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankAreaFaceHintEntities(t.getPlankAreaFaceHints()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities,this.getHoleEntities,this.getSquareGrooveEntities,this.getArcSquareGrooveEntities,this.getRoundCornerGrooveEntities,this.getSpecialShapedGrooveEntities,this.getPathGrooveEntities,this.getPlankAreaFaceHintEntities]}));function tj(t){return(tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ej(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return rj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rj(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function rj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oj(n.key),n)}}function oj(t){var e=function(t,e){if("object"!=tj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tj(e)?e:String(e)}var ij=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){e.pressMap.forEach((function(t,r){e.pressMap.set(r,!1)}))},this.onKeyDown=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)||e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!0)},this.onKeyUp=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)&&(e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!1))},this.active()}var e,r,n;return e=t,(r=[{key:"addKeyboardKeyListener",value:function(t){var e=this,r=Object(Or.castArray)(t);if(r.some((function(t){return!e.isValidKeyboardKey(t)})))throw new Error("keyboard-key is invalid");var n,o=ej(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(t){o.e(t)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(t){var e,r=ej(Object(Or.castArray)(t));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(t){var e=this;return Object(Or.castArray)(t).every((function(t){return e.pressMap.get(t)}))}},{key:"getKeyBoardKey",value:function(t){return t.key.toLowerCase()}},{key:"isPrevent",value:function(t){if(this.disabled)return!0;var e=t.target;if(!e)return!1;if("INPUT"===e.tagName){var r=e.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===e.tagName||"TEXTAREA"===e.tagName}},{key:"isValidKeyboardKey",value:function(t){return be.includes(t)}}])&&nj(e.prototype,r),n&&nj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),aj=new Map([[Ss.ParamModelCategory.FRAME,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.FRAME,Ss.ParamModelCategory.SLIDING_DOOR_BOARD,Ss.ParamModelCategory.PARAM_FURNITURE_PART,Ss.ParamModelCategory.SANITARY_COMPONENT,Ss.ParamModelCategory.DOOR_LEAF,Ss.ParamModelCategory.DECORATIVE_MOLDING_C,Ss.ParamModelCategory.DECORATIVE_MOLDING_W,Ss.ParamModelCategory.HANDS_FREE,Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Ss.ParamModelCategory.SHOWER_ROOM,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.FRAME,Ss.ParamModelCategory.PARAM_FURNITURE_PART,Ss.ParamModelCategory.SANITARY_COMPONENT,Ss.ParamModelCategory.DOOR_LEAF,Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.SLIDING_DOOR_BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.RAIL,Ss.ParamModelCategory.DOOR_LEAF]],[Ss.ParamModelCategory.SLIDING_DOOR_C,[Ss.ParamModelCategory.RAIL,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Ss.ParamModelCategory.SPACE_GROUP,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.SPECIAL_BOARD,Ss.ParamModelCategory.SPACE_GROUP]],[Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,[Ss.ParamModelCategory.SLIDING_DOOR_CORE,Ss.ParamModelCategory.DOOR_WAIST_LINE]],[Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Ss.ParamModelCategory.SWING_DOOR]],[Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.SWING_DOOR,[Ss.ParamModelCategory.DOOR_CORE,Ss.ParamModelCategory.DOOR_WAIST_LINE,Ss.ParamModelCategory.DECORATIVE_MOLDING,Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.DRAWER,[Ss.ParamModelCategory.DRAWER_PANEL,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.PARAM_FURNITURE,[Ss.ParamModelCategory.FURNITURE_LEG]],[Ss.ParamModelCategory.KADA,[Ss.ParamModelCategory.BYOBU,Ss.ParamModelCategory.BYOBU_FRAME,Ss.ParamModelCategory.BYOBU_PANEL]]]);function sj(t){return(sj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uj(t){return function(t){if(Array.isArray(t))return cj(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return cj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cj(t,e)}(t)||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 cj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Aj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lj(n.key),n)}}function lj(t){var e=function(t,e){if("object"!=sj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sj(e)?e:String(e)}var fj=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ue.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new ij,this.memoGetHintModelLite=fS()((function(t){return e.isFittingLikeModel(t)?eB(t):e.getParamModelLite(t)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var e,r,n;return e=t,(r=[{key:"isAccessory",value:function(t){var e;if(this.isAccessoryCache.has(t.id))return this.isAccessoryCache.get(t.id);var r=null===(e=null==t?void 0:t.getParent)||void 0===e?void 0:e.call(t),n=(aj.get(r?r.getCategory().getRoot():void 0)||[]).some((function(e){return t.getCategory().belongsTo(e)}));return this.isAccessoryCache.set(t.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(t,e){for(var r,n,o=this,i=[],a=e;a&&a!==t;)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(t){return o.isAccessory(t)}))||e}},{key:"getParamModelLite",value:function(t){var e=(t.isRoot()?t:t.getRoot()).getAssembly();return e?uS(t,{origin:G.SENSE},void 0,uS(e,{origin:G.SENSE})):uS(t,{origin:G.SENSE})}},{key:"topModelModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o,i,a,s=t.isRoot()?t:t.getRoot(),u=s.getAssembly(),c=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=!1;if(c&&(i=bL(c))&&!this.isFittingLikeModel(i)&&(c.entityType===DA?a=(a=i.isRoot()?i:i.getRoot()).getAssembly()||a:(A=!0,a=i),o=a===s||a===u),o){for(var l=!1,f=!1,h=i instanceof Qe.CoreParamModel?i.getParent():void 0,p=t;p;){if(p===i){l=!0;break}if(p===h){f=!0;break}p=(null===(r=p.getParent)||void 0===r?void 0:r.call(p))||(null===(n=p.getAssembly)||void 0===n?void 0:n.call(p))}if(e===ce.CLICK)return l?i:f?this.getAccessoryAtFirstLevel(h,t):a instanceof Qe.CoreParamModelAssembly?(i.isRoot()?i:i.getRoot())===s?this.getAccessoryAtFirstLevel(s,t):s:this.getAccessoryAtFirstLevel(s,t);if(e===ce.DB_CLICK)return l?A?s:this.getAccessoryAtFirstLevel(i,t):this.getAccessoryAtFirstLevel(s,t)}else{if(e===ce.CLICK)return u||s;if(e===ce.DB_CLICK)return u?s:this.getAccessoryAtFirstLevel(s,t)}}},{key:"accessoryModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o=t.isRoot()?t:t.getRoot(),i=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,a=i&&bL(i),s=!1;if(a&&!this.isFittingLikeModel(a)&&(s=(a.isRoot()?a:a.getRoot())===o),s){for(var u=!1,c=!1,A=null==a?void 0:a.getParent(),l=t;l;){if(l===a){u=!0;break}if(l===A){c=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(e===ce.CLICK)return u?a:this.getAccessoryAtFirstLevel(c?A:o,t);if(e===ce.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(a,t);var f=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(f,t)}}else{if(e===ce.CLICK)return this.getAccessoryAtFirstLevel(o,t);if(e===ce.DB_CLICK){var h=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(h,t)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(t){var e,r;if(this.isFittingLikeModel(t))return t;var n,o,i=t.isRoot()?t:t.getRoot(),a=i.getAssembly(),s=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,u=!1;if(s&&(n=bL(s))&&!this.isFittingLikeModel(n)&&(u=(o=s.entityType===DA?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n)===i||o===a),n&&u){for(var c=!1,A=!1,l=n instanceof Qe.CoreParamModel?n.getParent():void 0,f=t;f;){if(f===n){c=!0;break}if(f===l){A=!0;break}f=(null===(e=f.getParent)||void 0===e?void 0:e.call(f))||(null===(r=f.getAssembly)||void 0===r?void 0:r.call(f))}return c?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Qe.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,t):A?this.getAccessoryAtFirstLevel(l,t):this.designMode===ue.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,t)}return this.designMode===ue.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,t)}},{key:"setCurSelectEntity",value:function(t){this.curSelectEntity=t}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(t){this.curHintEntity=t}},{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(t,e){this.designMode=t,t===ue.CUSTOM?(this.customModeFindSelectModel=null==e?void 0:e.findSelectModel,this.customModeFindHintModel=null==e?void 0:e.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(Or.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(t){var e=BL[t.type];return{entityId:t.id,entityType:e}}},{key:"customModeSelectModel",value:function(t,e){var r,n;n=this.isFittingLikeModel(t)?eB(t):this.getParamModelLite(t);var o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,e);return Object(Or.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(t){var e,r=this,n=this.memoGetHintModelLite(t),o=null===(e=this.customModeFindHintModel)||void 0===e?void 0:e.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Or.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(t){return t instanceof Ia||t instanceof ls||t instanceof bs||t instanceof Ga||t instanceof Za||t instanceof Oa||t instanceof mo||t instanceof Cn||t instanceof gr&&Boolean(t.isAppendHardware)}},{key:"getSelectEntity",value:function(t,e){var r;if(this.isMultiSelect&&this.designMode!==ue.CUSTOM){switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t}if(!r)return;var n=CL(r),o=Object(Or.castArray)(this.curSelectEntity).filter((function(t){return t}));this.prevModeSelectEntity.length&&o.push.apply(o,uj(this.prevModeSelectEntity));var i=o[0]&&bL(o[0]);if(i&&this.isFittingLikeModel(i)!==this.isFittingLikeModel(r))return n;var a=o.filter((function(t){return t.entityId!==n.entityId}));return a.length!==o.length?a:[].concat(uj(a),[n])}switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t;break;case ue.CUSTOM:return this.customModeSelectModel(t,e)}return CL(r||t)}},{key:"getHintEntity",value:function(t){var e;switch(this.designMode){case ue.TOP_MODEL:case ue.ACCESSORY:e=this.topModelModeAndAccessoryModeHint(t);break;case ue.PRODUCT:e=t;break;case ue.CUSTOM:return this.customModeHintModel(t)}var r=this.curSelectEntity&&Object(Or.castArray)(this.curSelectEntity)||[];if(!([].concat(uj(r),uj(this.prevModeSelectEntity)).findIndex((function(t){return t.entityId===e.id}))>-1))return CL(e)}},{key:"registerMultiSelectShortcut",value:function(t){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=t,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&Aj(e.prototype,r),n&&Aj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function hj(t){return(hj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gj(n.key),n)}}function gj(t){var e=function(t,e){if("object"!=hj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hj(e)?e:String(e)}function yj(t,e){return(yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ij(t);if(e){var o=Ij(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mj(this,r)}}function mj(t,e){if(e&&("object"===hj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ij(t){return(Ij=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ej=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yj(t,e)}(i,t);var e,r,n,o=vj(i);function i(){return pj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"pickRayTarget",value:function(t){return t&&bL(t)}},{key:"selection",get:function(){return dL().getStateManager().kaf.selection}},{key:"hint",get:function(){return dL().getStateManager().kaf.hint}},{key:"designModeCtx",get:function(){return dL().designModeContext}}])&&dj(e.prototype,r),n&&dj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(593).a.Feature);function Cj(t){return(Cj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wj(n.key),n)}}function wj(t){var e=function(t,e){if("object"!=Cj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cj(e)?e:String(e)}function Pj(t,e){return(Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Qj(t);if(e){var o=Qj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _j(this,r)}}function _j(t,e){if(e&&("object"===Cj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qj(t){return(Qj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oj=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pj(t,e)}(i,t);var e,r,n,o=Sj(i);function i(){var t;return bj(this,i),(t=o.apply(this,arguments)).isMouseDown=!1,t}return e=i,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(t){if(!this.isMouseDown){var e=this.context.pick(t.sceneId,t.event),r=this.pickRayTarget(null==e?void 0:e.entity);if(_r.eventNames().includes(wr.PLANK_FACE_HOVER)&&r instanceof Qe.CoreParamModel){var n=e.entity,o=n.point,i={modelId:n.entityId,id:vC(r,o)};_r.emit(wr.PLANK_FACE_HOVER,i)}if(r){var a=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ue.CUSTOM,this.hint.hint(a)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Bj(e.prototype,r),n&&Bj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ej);function Dj(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return xj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xj(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function xj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Mj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rj(n.key),n)}}function Rj(t){var e=function(t,e){if("object"!=Nj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Nj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Nj(e)?e:String(e)}function Tj(t,e){return(Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kj(t);if(e){var o=kj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lj(this,r)}}function Lj(t,e){if(e&&("object"===Nj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kj(t){return(kj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Nj(t){return(Nj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Fj=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nj(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Gj=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Nj(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Uj=bc.ib.Highlighters.WireGeometry,zj=bc.ib.Highlighters.generateWireGeometryForHighlighterGeometry,Yj=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tj(t,e)}(i,t);var e,r,n,o=jj(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).models=t,r.createFittingModelBox=e,r}return e=i,(r=[{key:"getGeometry",value:function(){var t,e=new Uj,r=Dj(this.models);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=void 0;o=n instanceof Qe.CoreParamModel||n instanceof Qe.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var i=zj(o);e.append(i)}}catch(t){r.e(t)}finally{r.f()}return e}}])&&Mj(e.prototype,r),n&&Mj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),Hj=Yj=Fj([Object(_A.b)([new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Gj("design:paramtypes",[Array,Function])],Yj);function Vj(t){return(Vj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wj(n.key),n)}}function Wj(t){var e=function(t,e){if("object"!=Vj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vj(e)?e:String(e)}function Kj(t,e){return(Kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zj(t);if(e){var o=Zj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xj(this,r)}}function Xj(t,e){if(e&&("object"===Vj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zj(t){return(Zj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kj(t,e)}(i,t);var e,r,n,o=Jj(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this))._init(),t}return e=i,(r=[{key:"_init",value:function(){var t=this,e={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(e){var r=e.map((function(t){return bL(t)}));return new Hj(r.filter((function(t){return t})),t.createFittingModelBox)}};this.selection.addMultiSelectionConfig(e)}},{key:"createFittingModelBox",value:function(t){var e;if(t instanceof Cn)e=t.boundingBox;else if(t instanceof mo)e=mM(t);else if(t instanceof Ia)e=t.boundingBox;else if(t instanceof ls)e=HT(t);else if(t instanceof Ga)e=cT(t);else if(t instanceof Za)e=PT(t);else if(t instanceof Oa)e=sR(t);else{if(!(t instanceof bs))throw new Error("不支持的多选类型");e=bx(t)}return e}},{key:"onClick",value:function(t){this.triggerClick(t,ce.CLICK)}},{key:"onDblClick",value:function(t){this.designModeCtx.isMultiSelect||this.triggerClick(t,ce.DB_CLICK)}},{key:"triggerClick",value:function(t,e){var r=this.context.pick(t.sceneId,t.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(_r.eventNames().includes(wr.PLANK_FACE_CLICK)&&n instanceof Qe.CoreParamModel){var o=r.entity,i=o.point,a={modelId:o.entityId,id:vC(n,i)};_r.emit(wr.PLANK_FACE_CLICK,a)}if(n){var s=this.designModeCtx.getSelectEntity(n,e);this.designModeCtx.getDesignMode()===ue.CUSTOM?s&&this.selection.select(s):(this.selection.select(s),this.designModeCtx.setCurSelectEntity(s))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&qj(e.prototype,r),n&&qj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ej);function tL(t){return(tL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eL(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rL(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?eL(Object(r),!0).forEach((function(e){nL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eL(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nL(t,e,r){return(e=iL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oL(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iL(n.key),n)}}function iL(t){var e=function(t,e){if("object"!=tL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tL(e)?e:String(e)}function aL(){return(aL="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=sL(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function sL(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lL(t)););return t}function uL(t,e){return(uL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cL(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lL(t);if(e){var o=lL(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return AL(this,r)}}function AL(t,e){if(e&&("object"===tL(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lL(t){return(lL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fL,hL=new pu.SingletonRef,pL=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uL(t,e)}(i,t);var e,r,n,o=cL(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:JD,axrs:H_,singleton:hL},t)).stateManager=e,r.viewer=new lh,r.designModeContext=new fj,r}return e=i,(r=[{key:"init",value:function(){aL(lL(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var t=this.stateManager;t.initState(),K_(t);var e=this.getDependentPlugin(du.a),r=this.getDependentPlugin(cI);t.kaf=e.stateManager,t.core=r.stateManager}},{key:"initNet",value:function(){aL(lL(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Rd),this.client=new Vp(this.net)}},{key:"initApp",value:function(){var t=this,e=this.stateManager,r=e.core,n=r.design,o=r.pad,i=this.getDependentPlugin(du.a);this.viewer.config(i,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return t.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(t,e){for(var r=e.point,n=o.findModelOrAssemblyModelById(t.entityId);n&&!TI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:DA,point:r}:rL(rL({},t),{},{point:r})},paramModelSymbol:DA,filterParamModel:function(e){return!t.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(e.getCategory().categoryId)}}),i.registerEntityDocument(new $T((function(){return e.core.fittingDesign}))),e.kaf.toolbox.addIdleToolFeature((function(){return new $j})),e.kaf.toolbox.addIdleToolFeature((function(){return new Oj})),i.setLayout(DO)}}])&&oL(e.prototype,r),n&&oL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.PluginApplication),dL=hL.instance;function gL(t){return(gL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yL(t,e,r){var n;return n=function(t,e){if("object"!=gL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vL(t){return function(t){if(Array.isArray(t))return mL(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return mL(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mL(t,e)}(t)||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 mL(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function IL(t,e){var r=new Map;return function(){var n,o=e.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=t.apply(void 0,arguments),Object(Or.isObject)(n)&&Object(Or.isFunction)(n.then)&&Object(Or.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function EL(t){return t instanceof gr?DA:t instanceof Pr?OA:t instanceof Cn?II:t instanceof mo?EI:t instanceof Ia?PI:t instanceof ls||t instanceof bs?SI:t instanceof Ga?_I:t instanceof Za?QI:t instanceof Oa?OI:void 0}function CL(t){return{entityId:t.id,entityType:EL(t)}}function bL(t){var e=t.entityId,r=t.entityType,n=dL().getStateManager().core,o=n.fittingDesign,i=n.pad;switch(r){case DA:return i.findModelOrAssemblyModelById(e);case OA:return i.findParamModelAssembly(e);case EI:return o.getGrooveFittings().find((function(t){return t.id===e}));case II:return o.getFittings().find((function(t){return t.id===e}));case PI:return o.getHoleModels().find((function(t){return t.id===e}));case SI:return[].concat(vL(o.getSquareGrooveModels()),vL(o.getArcSquareGrooveModels())).find((function(t){return t.id===e}));case _I:return o.getRoundCornerGrooveModels().find((function(t){return t.id===e}));case QI:return o.getSpecialShapedGrooveModels().find((function(t){return t.id===e}));case OI:return o.getPathGrooveModels().find((function(t){return t.id===e}));default:return}}var BL=(yL(yL(yL(yL(yL(yL(yL(yL(yL(yL(fL={},Ie.PARAM_MODEL,DA),Ie.PARAM_MODEL_ASSEMBLY,OA),Ie.HOLE,II),Ie.GROOVE,II),Ie.HARDWARE_GROOVE,EI),Ie.HARDWARE,DA),Ie.HOLE_V2,PI),Ie.SQUARE_GROOVE,SI),Ie.ROUND_CORNER_GROOVE,_I),Ie.SPECIAL_SHAPED_GROOVE,QI),yL(fL,Ie.PATH_GROOVE,OI));function wL(t){return(wL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function PL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */PL=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==wL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function SL(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function _L(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){SL(i,n,o,a,s,"next",t)}function s(t){SL(i,n,o,a,s,"throw",t)}a(void 0)}))}}var QL=new Map;function OL(t){return["designid","levelid","modelid","toolType"].map((function(e){return t[e]||""})).join(":")}var DL=IL(function(){var t=_L(PL().mark((function t(e){var r,n,o;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=_d(),n=OL(e),!QL.has(n)){t.next=4;break}return t.abrupt("return",QL.get(n));case 4:return t.next=6,r.get("/cos/api/fitting-design",{params:e});case 6:return o=t.sent,QL.set(n,o.data.d),t.abrupt("return",o.data.d);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),OL);function xL(t,e){var r=yI(em);"function"==typeof r.fittingDesignHasChanged&&r.fittingDesignHasChanged({modelId:t,isLock:e}).catch((function(){}))}var ML,RL,TL=function(){var t=_L(PL().mark((function t(e,r){var n,o;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_d(),o=OL(r),t.prev=2,t.next=5,n.post("/cos/api/fitting-design",e,{params:r});case 5:QL.set(o,e),xL(r.modelid,!0),t.next=14;break;case 9:if(t.prev=9,t.t0=t.catch(2),null===(i=t.t0)||!Object(Or.isObject)(i)||"0"===i.c||!i.m){t.next=13;break}throw new Error("错误码:".concat(t.t0.c,";错误信息:").concat(t.t0.m));case 13:throw t.t0;case 14:case"end":return t.stop()}var i}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}(),jL=function(){var t=_L(PL().mark((function t(e){var r,n;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),n=OL(e),t.prev=2,t.next=5,r.delete("/cos/api/fitting-design",{params:e});case 5:QL.has(n)&&QL.delete(n),xL(e.modelid,!1),t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(2),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();function LL(t){return(LL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */kL=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==LL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(LL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function NL(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){NL(i,n,o,a,s,"next",t)}function s(t){NL(i,n,o,a,s,"throw",t)}a(void 0)}))}}!function(t){t.UNKNOWN="UNKNOWN",t.PENDING="PENDING",t.RUNNING="RUNNING",t.SAVING="SAVING",t.SUCCESS="SUCCESS",t.FAIL="FAIL",t.CANCEL="CANCEL",t.TIMEOUT="TIMEOUT"}(ML||(ML={})),function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW"}(RL||(RL={}));var GL=function(){var t=FL(kL().mark((function t(e){var r,n;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Or.castArray)(e),n=yI(bm),t.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),UL=IL(function(){var t=FL(kL().mark((function t(e,r){var n;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=yI(LI.MiniAppParamModelJsonDataService),t.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:e,templateId:r}));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),zL=IL(function(){var t=FL(kL().mark((function t(e,r,n,o){var i;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=yI(LI.MiniAppParamModelJsonDataService),t.abrupt("return",i.getModelJsonDataByModelId({modelIds:e,templateId:r,ignoreResetPosition:n,timeout:o},{timeout:-1}));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),YL=function(){var t=FL(kL().mark((function t(e){var r;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=yI(hm),t.abrupt("return",r.findUnProductiveModels(e));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),HL=function(){return yI(nm).modelAdd},VL=function(){return yI(nm).modelUpdate},qL=function(){return yI(nm).modelDelete},WL=function(t){return yI(nm).toggleMonitor(t)},KL=function(){return yI(fm).afterDetect},JL=function(t){return yI(fm).setDetectionProduct(t)},XL=function(t){return yI(fm).toggleDetection(t)};function ZL(t){return(ZL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tk(t,e,r){var n;return n=function(t,e){if("object"!=ZL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ZL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ek(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ek=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ZL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ZL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function rk(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function nk(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){rk(i,n,o,a,s,"next",t)}function s(t){rk(i,n,o,a,s,"throw",t)}a(void 0)}))}}var ok=fS()(function(){var t=nk(ek().mark((function t(e){var r,n;return ek().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),t.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:e,cache:!0}});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$L(Object(r),!0).forEach((function(e){tk(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({promise:!0},mI)),ik=fS()(function(){var t=nk(ek().mark((function t(e){var r,n,o;return ek().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_d(),t.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:e});case 3:return o=t.sent,t.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Or.mapValues)(o.data.d.modelCenterMap,(function(t){return JSON.parse(t)})):{});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());function ak(t){return(ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uk(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sk(Object(r),!0).forEach((function(e){ck(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sk(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ck(t,e,r){return(e=hk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ak(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return lk(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lk(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function lk(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function fk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hk(n.key),n)}}function hk(t){var e=function(t,e){if("object"!=ak(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ak(e)?e:String(e)}function pk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dk(t,e){return(dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=mk(t);if(e){var o=mk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yk(this,r)}}function yk(t,e){if(e&&("object"===ak(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vk(t)}function vk(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mk(t){return(mk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ik=new Set(["ModelViewerSelectionV2Service.startWatchSelectedChangedEvent","ModelViewerSelectionV2Service.onSelectedChanged","ModelViewerSelectionV2Service._genEntityFromElement","ModelViewerSelectionV2Service._genElement"]);function Ek(t){return function(e){return function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dk(t,e)}(s,r);var n,o,i,a=gk(s);function s(){var r;pk(this,s);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r=a.call.apply(a,[this].concat(o));var u,c=e.name,A=Object.getOwnPropertyNames(e.prototype).filter((function(t){var e="".concat(c,".").concat(t);return"function"==typeof r[t]&&"constructor"!==t&&!Ik.has(e)})),l=Ak(A);try{var f=function(){var e=u.value,n=r[e];Object.defineProperty(vk(r),e,{configurable:!0,enumerable:!0,writable:!0,value:_t(n,{beforeCalled:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return{apiName:e,args:r,start:Date.now()}},afterCalled:function(r,n,o,i){var a="".concat(c,".").concat(e),s="";if(r){var u=r instanceof Error?r.message:r&&r.toString?r.toString():"unknown";s="\n customSdk:called ".concat(a," api fail:\n arguments is ").concat(JSON.stringify(o),",\n errMsg is ").concat(u,"\n ")}var A=t||{},l=A.level,f=void 0===l?"L2":l,h=A.owner,p={level:f,owner:void 0===h?"baijiu":h,downstream:"customOwnerField=owner"},d=uk({status:!r,apiType:"CUSTOM_SPLIT_API",apiName:a,duration:Date.now()-n.start,success:!r,version:window.__customSdkVersion,errMsg:s},p);window.__dev_recorder&&window.__dev_recorder(uk(uk({},d),{},{args:o,ret:i})),_r.emit(wr.API_CALLED,d)}})})};for(l.s();!(u=l.n()).done;)f()}catch(t){l.e(t)}finally{l.f()}return r}return n=s,o&&fk(n.prototype,o),i&&fk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n}(e)}}function Ck(t){return(Ck="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wk(n.key),n)}}function Bk(t,e,r){return e&&bk(t.prototype,e),r&&bk(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function wk(t){var e=function(t,e){if("object"!=Ck(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ck(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ck(e)?e:String(e)}var Pk=Bk((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function Sk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Sk=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Fk(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Fk(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function _k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Qk(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_k(Object(r),!0).forEach((function(e){Ok(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ok(t,e,r){return(e=Tk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dk(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function xk(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Dk(i,n,o,a,s,"next",t)}function s(t){Dk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Mk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tk(n.key),n)}}function Tk(t){var e=function(t,e){if("object"!=Fk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fk(e)?e:String(e)}function jk(t,e){return(jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Lk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Nk(t);if(e){var o=Nk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kk(this,r)}}function kk(t,e){if(e&&("object"===Fk(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Nk(t){return(Nk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fk(t){return(Fk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Gk=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fk(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Uk=function(){return V_().fittingDesign.fittingDesignSense},zk=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jk(t,e)}(c,t);var e,r,n,o,i,a,s,u=Lk(c);function c(){return Mk(this,c),u.apply(this,arguments)}return e=c,(r=[{key:"toggleAutoSave",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Uk().$actionEnableAutoSave.dispatch(t)}},{key:"isAutoSave",value:function(){return Uk().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(s=xk(Sk().mark((function t(e){var r;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&(V_().viewParamModel.state.state.currModelId!==e||Uk().state.state.design.id!==e)){t.next=3;break}return t.abrupt("return",this.getConnectedFittingDesign());case 3:return t.next=5,cb(e);case 5:return r=t.sent,t.abrupt("return",DL(Qk(Qk({},r),{},{modelid:e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Uk().getConnectedFittingDesign(t,e)}},{key:"validateFittingDesign",value:function(t,e){var r=V_().entry.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(!r)return{validated:!1};var n=V_().fittingDesign.senseSetting.getSenseSettings();return{validated:function(t){if(!t.isClosedPath())return!1;for(var e=t.points,r=t.lines,n=e.length,o=0;o<n;o++){var i={type:Js.POINT,val:e[o]},a={type:Js.LINE,val:r[o]};if(!cu(i.val))return!1;if(!Au(a.val))return!1;if(!fu(i,a))return!1;for(var s=o+1;s<n;s++){var u={type:Js.POINT,val:e[s]},c={type:Js.LINE,val:r[s]};if(!fu(i,u))return!1;if(!fu(i,c))return!1;if(!fu(a,u))return!1;if(!fu(a,c))return!1}}return!0}(hu(t,r,Object(Or.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(a=xk(Sk().mark((function t(e){var r,n=arguments;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},t.abrupt("return",Uk().appendFittingDataToFittingDesign(e,r));case 2:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"saveDesign",value:(i=xk(Sk().mark((function t(e){var r,n,o,i=arguments;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=uC(n),Uk().$actionSaveFittingDesign.started.dispatch({defer:o,design:e}),t.abrupt("return",o.promise);case 5:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=xk(Sk().mark((function t(e){var r,n,o,i,a;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,a=uC(o),Uk().$actionClearFittingDesign.started.dispatch({defer:a,modelId:i}),t.abrupt("return",a.promise);case 4:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&Rk(e.prototype,r),n&&Rk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Pk);function Yk(t){return(Yk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qk(n.key),n)}}function qk(t){var e=function(t,e){if("object"!=Yk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Yk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yk(e)?e:String(e)}function Wk(t,e){return(Wk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Kk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xk(t);if(e){var o=Xk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jk(this,r)}}function Jk(t,e){if(e&&("object"===Yk(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xk(t){return(Xk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}zk=Gk([Ek()],zk);var Zk=(new Os.default).setFromCenterAndSize(new _e.default(0,0,0),new _e.default(200,200,100)),$k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wk(t,e)}(i,t);var e,r,n,o=Kk(i);function i(){return Hk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var t=this.state,e=t.initCameraAttributes,r=e.position,n=e.lookAt,o=t.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 Zk}}])&&Vk(e.prototype,r),n&&Vk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ob.i);function tN(t){return(tN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rN(n.key),n)}}function rN(t){var e=function(t,e){if("object"!=tN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tN(e)?e:String(e)}function nN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oN(t,e){return(oN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sN(t);if(e){var o=sN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aN(this,r)}}function aN(t,e){if(e&&("object"===tN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sN(t){return(sN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oN(t,e)}(i,t);var e,r,n,o=iN(i);function i(){return nN(this,i),o.apply(this,arguments)}return e=i,r&&eN(e.prototype,r),n&&eN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(bc.Jb.combine({scene3D:$k})),cN=window.document.createElement("script");cN.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(cN);function AN(t){return(AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hN(n.key),n)}}function hN(t){var e=function(t,e){if("object"!=AN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AN(e)?e:String(e)}function pN(t,e){return(pN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yN(t);if(e){var o=yN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gN(this,r)}}function gN(t,e){if(e&&("object"===AN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yN(t){return(yN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pN(t,e)}(i,t);var e,r,n,o=dN(i);function i(){var t;return lN(this,i),(t=o.apply(this,arguments)).rootState=new uN,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new pL(this,this.rootState);t.init(),t.run()}}])&&fN(e.prototype,r),n&&fN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}($m.a);function mN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EN(n.key),n)}}function EN(t){var e=function(t,e){if("object"!=PN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==PN(e)?e:String(e)}function CN(t,e){return(CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=wN(t);if(e){var o=wN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BN(this,r)}}function BN(t,e){if(e&&("object"===PN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wN(t){return(wN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function PN(t){return(PN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vN.dependencies=[du.a,cI];var SN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_N=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CN(t,e)}(i,t);var e,r,n,o=bN(i);function i(){return mN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleModelViewIntersected",value:function(t){V_().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(t)}},{key:"toggleModelViewedIntersected",value:function(t){V_().fittingDesign.intersected.toggleShowIntersectGroupData(t)}}])&&IN(e.prototype,r),n&&IN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function QN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */QN=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==NN(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(NN(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ON(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function DN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ON(i,n,o,a,s,"next",t)}function s(t){ON(i,n,o,a,s,"throw",t)}a(void 0)}))}}function xN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,RN(n.key),n)}}function RN(t){var e=function(t,e){if("object"!=NN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=NN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==NN(e)?e:String(e)}function TN(t,e){return(TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kN(t);if(e){var o=kN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return LN(this,r)}}function LN(t,e){if(e&&("object"===NN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kN(t){return(kN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function NN(t){return(NN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}_N=SN([Ek()],_N);var FN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":NN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},GN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&TN(t,e)}(u,t);var e,r,n,o,i,a,s=jN(u);function u(){return xN(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"getAllCustomModels",value:(a=DN(QN().mark((function t(){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.getAllCustomModels());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"getCustomModelById",value:(i=DN(QN().mark((function t(e){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.getCustomModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=DN(QN().mark((function t(e){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&MN(e.prototype,r),n&&MN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Pk);function UN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,YN(n.key),n)}}function YN(t){var e=function(t,e){if("object"!=KN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KN(e)?e:String(e)}function HN(t,e){return(HN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function VN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=WN(t);if(e){var o=WN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qN(this,r)}}function qN(t,e){if(e&&("object"===KN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function WN(t){return(WN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function KN(t){return(KN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}GN=FN([Ek({level:"L0"})],GN);var JN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":KN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},XN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&HN(t,e)}(i,t);var e,r,n,o=VN(i);function i(){return UN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setFittingHint",value:function(t){V_().fittingDesign.fittingHint.setFittingHint(t)}},{key:"clearFittingHint",value:function(t){V_().fittingDesign.fittingHint.clearFittingHint(t)}},{key:"setFittingHardwareHint",value:function(t){V_().fittingDesign.fittingHint.setFittingHardwareHint(t)}},{key:"clearFittingHardwareHint",value:function(t){V_().fittingDesign.fittingHint.clearFittingHardwareHint(t)}}])&&zN(e.prototype,r),n&&zN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function ZN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ZN=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==uF(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(uF(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function $N(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function tF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$N(i,n,o,a,s,"next",t)}function s(t){$N(i,n,o,a,s,"throw",t)}a(void 0)}))}}function eF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nF(n.key),n)}}function nF(t){var e=function(t,e){if("object"!=uF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=uF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==uF(e)?e:String(e)}function oF(t,e){return(oF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sF(t);if(e){var o=sF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aF(this,r)}}function aF(t,e){if(e&&("object"===uF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sF(t){return(sF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uF(t){return(uF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}XN=JN([Ek()],XN);var cF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},AF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oF(t,e)}(s,t);var e,r,n,o,i,a=iF(s);function s(){return eF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getAllFittingModels",value:(i=tF(ZN().mark((function t(e){return ZN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().fittingDesign.fittingModel.getAllFittingModels(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=tF(ZN().mark((function t(e){return ZN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().fittingDesign.fittingModel.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&rF(e.prototype,r),n&&rF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);AF=cF([Ek()],AF);var lF=r(127);function fF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pF(n.key),n)}}function pF(t){var e=function(t,e){if("object"!=mF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mF(e)?e:String(e)}function dF(t,e){return(dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=vF(t);if(e){var o=vF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yF(this,r)}}function yF(t,e){if(e&&("object"===mF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vF(t){return(vF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mF(t){return(mF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var IF,EF,CF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":mF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(t){t.View3D="view3d",t.Roamer="roamer"}(IF||(IF={})),function(t){t.UP="UP",t.DOWN="DOWN",t.LEFT="LEFT",t.RIGHT="RIGHT",t.FRONT="FRONT",t.BACK="BACK"}(EF||(EF={}));var bF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dF(t,e)}(i,t);var e,r,n,o=gF(i);function i(){return fF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleCameraMode",value:function(t){var e;switch(t){case IF.View3D:e=mD.c.View3D;break;case IF.Roamer:e=mD.c.Roamer}dL().getStateManager().scene3D.updatePerspectiveCameraMode(e)}},{key:"moveCamera",value:function(t){var e,r=dL().getStateManager().scene3D;switch(t){case EF.UP:case EF.FRONT:e=lF.a.UP;break;case EF.DOWN:case EF.BACK:e=lF.a.DOWN;break;case EF.LEFT:e=lF.a.LEFT;break;case EF.RIGHT:e=lF.a.RIGHT}if(e){if(t===EF.UP||t===EF.DOWN)return void r.onQEPress(e);r.onWASDPress(e)}}},{key:"focusFace",value:function(t){return V_().scene.focusFace(t)}},{key:"updateCameraType",value:function(t){return V_().scene.updateCameraType(t)}},{key:"lookAt",value:function(t){return V_().scene.lookAt(t)}},{key:"unstable__adaptViewer",value:function(t){return V_().scene.adaptViewer(t)}},{key:"toggleCameraTranslateMode",value:function(t){var e=t===de.Default?mD.a.defaultMode:mD.a.classicalMode;dL().getStateManager().scene3D.setCameraControlMode(e)}}])&&hF(e.prototype,r),n&&hF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function BF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,PF(n.key),n)}}function PF(t){var e=function(t,e){if("object"!=DF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DF(e)?e:String(e)}function SF(t,e){return(SF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _F(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=OF(t);if(e){var o=OF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return QF(this,r)}}function QF(t,e){if(e&&("object"===DF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OF(t){return(OF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function DF(t){return(DF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}bF=CF([Ek({level:"L0"})],bF);var xF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":DF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},MF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SF(t,e)}(i,t);var e,r,n,o=_F(i);function i(){return BF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDefaultHint",value:function(t){V_().fittingDesign.plankFaceHint.setDefaultHintConfig(t)}},{key:"setModelHint",value:function(t){V_().fittingDesign.plankFaceHint.setModelHint(t)}},{key:"clearModelHint",value:function(t){V_().fittingDesign.plankFaceHint.clearModelHint(t)}}])&&wF(e.prototype,r),n&&wF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function RF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RF=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==YF(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(YF(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function TF(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function jF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TF(i,n,o,a,s,"next",t)}function s(t){TF(i,n,o,a,s,"throw",t)}a(void 0)}))}}function LF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NF(n.key),n)}}function NF(t){var e=function(t,e){if("object"!=YF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YF(e)?e:String(e)}function FF(t,e){return(FF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zF(t);if(e){var o=zF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UF(this,r)}}function UF(t,e){if(e&&("object"===YF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zF(t){return(zF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YF(t){return(YF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}MF=xF([Ek()],MF);var HF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":YF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},VF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FF(t,e)}(s,t);var e,r,n,o,i,a=GF(s);function s(){return LF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getParamData",value:(i=jF(RF().mark((function t(e){return RF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.getParamModelJsonData(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamIntersected",value:(o=jF(RF().mark((function t(e){var r;return RF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,V_().fittingDesign.intersected.getParamModelIntersectedData(e);case 2:return r=t.sent,t.abrupt("return",(n=r,{intersectedGroups:Object(Or.map)(n.intersectedGroups,(function(t){return lC(lC({},t),{},{intersecteds:Object(Or.map)(t.intersecteds,(function(t){return Object(Or.omit)(t,["shell"])}))})}))}));case 4:case"end":return t.stop()}var n}),t)}))),function(t){return o.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.ignoreCategory||(t.ignoreCategory=he),V_().viewParamModel.getTopModelList(t)}},{key:"getParamModelPhotoById",value:function(t){return V_().viewParamModel.getParamModelPhotoData(t)}}])&&kF(e.prototype,r),n&&kF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);function qF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function WF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,KF(n.key),n)}}function KF(t){var e=function(t,e){if("object"!=tG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tG(e)?e:String(e)}function JF(t,e){return(JF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function XF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$F(t);if(e){var o=$F(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ZF(this,r)}}function ZF(t,e){if(e&&("object"===tG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $F(t){return($F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tG(t){return(tG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}VF=HF([Ek({level:"L0"})],VF);var eG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},rG=function(){return V_().select},nG=function(){return dL().designModeContext},oG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JF(t,e)}(i,t);var e,r,n,o=XF(i);function i(){var t;return qF(this,i),(t=o.apply(this,arguments)).hasWatchSelectionChange=!1,t.plankFaceClickEvent={on:function(t){_r.on(wr.PLANK_FACE_CLICK,t)},once:function(t){_r.once(wr.PLANK_FACE_CLICK,t)},off:function(t){_r.off(wr.PLANK_FACE_CLICK,t)}},t.plankFaceHoverEvent={on:function(t){_r.on(wr.PLANK_FACE_HOVER,t)},once:function(t){_r.once(wr.PLANK_FACE_HOVER,t)},off:function(t){_r.off(wr.PLANK_FACE_HOVER,t)}},t.onSelectedChanged=function(){_r.emit(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t.getSelected())},t}return e=i,(r=[{key:"getSelected",value:function(){return rG().state.state.selectedDataV2.map(this._genElement).filter((function(t){return!!t}))}},{key:"select",value:function(t){var e=Object(Or.castArray)(t).map(this._genEntityFromElement);rG().select(e),nG().setCurSelectEntity(e)}},{key:"unSelect",value:function(t){if(t){var e=Object(Or.castArray)(t).map(this._genEntityFromElement);rG().unSelect(e);var r=nG().getCurSelectEntity();r&&(Array.isArray(r)?nG().setCurSelectEntity(Object(Or.difference)(r,e)):e.includes(r)&&nG().setCurSelectEntity(void 0))}else rG().select(),nG().setCurSelectEntity(void 0)}},{key:"on",value:function(t){this.startWatchSelectedChangedEvent(),_r.on(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"off",value:function(t){_r.off(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"once",value:function(t){this.startWatchSelectedChangedEvent(),_r.once(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,rG().on(Y_.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(t){var e={entityId:t.id,entityType:BL[t.type]};return"__intersected_model"===t.type&&(e.entityType=CI),e}},{key:"_genElement",value:function(t){var e,r=t.id;if(t instanceof gr?t.isAppendHardware?(e=Ie.HARDWARE,r=t.hardwareData.id):e=Ie.PARAM_MODEL:t instanceof Pr?e=Ie.PARAM_MODEL_ASSEMBLY:t instanceof mo?e=Ie.HARDWARE_GROOVE:t instanceof Cn?e=t.type===J.HOLE?Ie.HOLE:Ie.GROOVE:t instanceof Ia?e=Ie.HOLE_V2:t instanceof ls||t instanceof bs?e=Ie.SQUARE_GROOVE:t instanceof Ga?e=Ie.ROUND_CORNER_GROOVE:t instanceof Za?e=Ie.SPECIAL_SHAPED_GROOVE:t instanceof Oa&&(e=Ie.PATH_GROOVE),e)return{id:r,type:e}}},{key:"__onDestroy",value:function(){rG().off(Y_.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&WF(e.prototype,r),n&&WF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function iG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */iG=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==dG(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(dG(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function aG(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function sG(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){aG(i,n,o,a,s,"next",t)}function s(t){aG(i,n,o,a,s,"throw",t)}a(void 0)}))}}function uG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,AG(n.key),n)}}function AG(t){var e=function(t,e){if("object"!=dG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dG(e)?e:String(e)}function lG(t,e){return(lG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pG(t);if(e){var o=pG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hG(this,r)}}function hG(t,e){if(e&&("object"===dG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pG(t){return(pG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dG(t){return(dG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}oG=eG([Ek({level:"L0"})],oG);var gG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lG(t,e)}(u,t);var e,r,n,o,i,a,s=fG(u);function u(){return uG(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"viewSelected",value:(a=sG(iG().mark((function t(){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.viewSelectedParamModel());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"viewModelById",value:(i=sG(iG().mark((function t(e){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.viewParamModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var t=dL().getStateManager().scene3D;t.updateEnableCameraAnimation(!0),t.reset()}},{key:"toggleModelBorder",value:function(t){V_().scene.$actionToggleRenderBorder.dispatch(t)}},{key:"toggleModelTransparent",value:function(t){V_().scene.$actionToggleRenderTranslucent.dispatch(t)}},{key:"toggleModelFullTransparent",value:function(t){V_().scene.$actionToggleRenderMode.dispatch({mode:t?gI.FULLY_TRANSPARENT:gI.SHADING})}},{key:"toggleWhiteMode",value:function(t){V_().scene.$actionToggleWhiteMode.dispatch(t)}},{key:"setting",value:function(t){V_().fittingDesign.senseSetting.$actionSenseSetting.dispatch(t)}},{key:"refreshModel",value:(o=sG(iG().mark((function t(){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.refreshCustomModelData());case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"setInteractionPriority",value:function(t){if(Object.values(t).some((function(t){return"number"!=typeof t})))throw new Error("Interaction priority must be a number.");V_().scene.$actionSetInteractionPriority.dispatch(t)}},{key:"getInteractionPriority",value:function(){return Object(Or.cloneDeep)(V_().scene.state.state.interactionPriority)}}])&&cG(e.prototype,r),n&&cG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Pk);function vG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IG(n.key),n)}}function IG(t){var e=function(t,e){if("object"!=wG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wG(e)?e:String(e)}function EG(t,e){return(EG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=BG(t);if(e){var o=BG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bG(this,r)}}function bG(t,e){if(e&&("object"===wG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function BG(t){return(BG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function wG(t){return(wG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}yG=gG([Ek({level:"L0"})],yG);var PG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},SG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&EG(t,e)}(i,t);var e,r,n,o=CG(i);function i(){return vG(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"parseModelPlankPath",value:function(t){return e=t.modelID,r=t.data,n=[],o=r.path?Vn(ye.OUTER,r.path):void 0,i=r.holes.map((function(t){return Vn(ye.INNER,t)})),a=new Map,o&&(n.push(o),a.set(o,i)),n.push.apply(n,AE(i)),new dE(e,n,a);var e,r,n,o,i,a}},{key:"syncModelPlankPath",value:function(t){EE(t)}}])&&mG(e.prototype,r),n&&mG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function _G(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_G=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==LG(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(LG(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function QG(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function OG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xG(n.key),n)}}function xG(t){var e=function(t,e){if("object"!=LG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LG(e)?e:String(e)}function MG(t,e){return(MG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jG(t);if(e){var o=jG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TG(this,r)}}function TG(t,e){if(e&&("object"===LG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jG(t){return(jG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LG(t){return(LG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}SG=PG([Ek({level:"L0"})],SG);var kG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":LG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},NG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&MG(t,e)}(s,t);var e,r,n,o,i,a=RG(s);function s(){return OG(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"stable",value:(o=_G().mark((function t(e){return _G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.validateModelStable(e.modelId));case 1:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){QG(i,r,n,a,s,"next",t)}function s(t){QG(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&DG(e.prototype,r),n&&DG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);function FG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UG(n.key),n)}}function UG(t){var e=function(t,e){if("object"!=qG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qG(e)?e:String(e)}function zG(t,e){return(zG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function YG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=VG(t);if(e){var o=VG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return HG(this,r)}}function HG(t,e){if(e&&("object"===qG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function VG(t){return(VG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qG(t){return(qG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}NG=kG([Ek()],NG);var WG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":qG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},KG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zG(t,e)}(i,t);var e,r,n,o=YG(i);function i(){var t;return FG(this,i),(t=o.apply(this,arguments)).drawDimensionLine=function(t,e){return V_().rulerLine.addDimensionRuler(t,e)},t}return e=i,(r=[{key:"removeDimensionLine",value:function(t){return V_().rulerLine.removeDimensionRuler(t)}},{key:"clearDimensionLine",value:function(){return V_().rulerLine.removeDimensionRuler()}},{key:"drawSpacingDistanceLine",value:function(t,e){return V_().rulerLine.addSpacingDistanceRuler(t,e)}},{key:"removeSpacingDistanceLine",value:function(t){return V_().rulerLine.removeSpacingDistanceRuler(t)}},{key:"clearSpacingDistanceLine",value:function(){return V_().rulerLine.removeSpacingDistanceRuler()}}])&&GG(e.prototype,r),n&&GG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function JG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ZG(n.key),n)}}function ZG(t){var e=function(t,e){if("object"!=nU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nU(e)?e:String(e)}function $G(t,e){return($G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rU(t);if(e){var o=rU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eU(this,r)}}function eU(t,e){if(e&&("object"===nU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rU(t){return(rU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function nU(t){return(nU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}KG=WG([Ek()],KG);var oU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":nU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},iU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$G(t,e)}(i,t);var e,r,n,o=tU(i);function i(){return JG(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDesignMode",value:function(t){var e=t.mode,r=t.customModeCb;dL().designModeContext.setDesignMode(e,r)}},{key:"registerMultiSelectShortcut",value:function(t){dL().designModeContext.registerMultiSelectShortcut(t)}}])&&XG(e.prototype,r),n&&XG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function aU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uU(n.key),n)}}function uU(t){var e=function(t,e){if("object"!=hU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hU(e)?e:String(e)}function cU(t,e){return(cU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fU(t);if(e){var o=fU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lU(this,r)}}function lU(t,e){if(e&&("object"===hU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fU(t){return(fU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hU(t){return(hU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}iU=oU([Ek({level:"L0"})],iU);var pU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},dU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cU(t,e)}(i,t);var e,r,n,o=AU(i);function i(){return aU(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setGetJsonConfig",value:function(t){if(!t||"object"!==hU(t))throw new Error("option 必须是一个对象");!function(t,e){BC[t]=CC(CC({},BC[t]),e)}("getJsonConfig",t)}}])&&sU(e.prototype,r),n&&sU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function gU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */gU=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==PU(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(PU(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function yU(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yU(i,n,o,a,s,"next",t)}function s(t){yU(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EU(n.key),n)}}function EU(t){var e=function(t,e){if("object"!=PU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==PU(e)?e:String(e)}function CU(t,e){return(CU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=wU(t);if(e){var o=wU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BU(this,r)}}function BU(t,e){if(e&&("object"===PU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wU(t){return(wU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function PU(t){return(PU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}dU=pU([Ek()],dU);var SU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_U=function(){return V_().fittingDesign.fittingViewer},QU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CU(t,e)}(l,t);var e,r,n,o,i,a,s,u,c,A=bU(l);function l(){return mU(this,l),A.apply(this,arguments)}return e=l,(r=[{key:"addFitting",value:(c=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().addFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"clearFitting",value:(u=vU(gU().mark((function t(){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_U().clearFitting();case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getFitting",value:(s=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().getFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"addHardware",value:(a=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().addHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"clearHardware",value:(i=vU(gU().mark((function t(){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_U().clearHardware();case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getHardware",value:(o=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().getHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&IU(e.prototype,r),n&&IU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(Pk);function OU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xU(n.key),n)}}function xU(t){var e=function(t,e){if("object"!=LU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LU(e)?e:String(e)}function MU(t,e){return(MU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jU(t);if(e){var o=jU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TU(this,r)}}function TU(t,e){if(e&&("object"===LU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jU(t){return(jU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LU(t){return(LU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}QU=SU([Ek({level:"L0"})],QU);var kU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":LU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},NU=function(){return V_().detection},FU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&MU(t,e)}(i,t);var e,r,n,o=RU(i);function i(){var t;return OU(this,i),(t=o.apply(this,arguments)).onAfterDetect=function(t){_r.on(wr.DETECT_RESULT_CHANGE,t)},t.offAfterDetect=function(t){_r.off(wr.DETECT_RESULT_CHANGE,t)},t}return e=i,(r=[{key:"enableDetection",value:function(){NU().enableDetectionOnce()}},{key:"setDetectionUI",value:function(t){NU().setDetectionUIOnce(t)}}])&&DU(e.prototype,r),n&&DU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);FU=kU([Ek()],FU);var GU=r(317),UU=r.n(GU),zU=new pu.I18NManager,YU="custom_order_split",HU={"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 VU(t){return(VU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qU=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==VU(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(VU(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function WU(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function KU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){WU(i,n,o,a,s,"next",t)}function s(t){WU(i,n,o,a,s,"throw",t)}a(void 0)}))}}var JU=Object(Or.once)((function(){return!!Object(pg.parseServQueryParams)()}));function XU(){return ZU.apply(this,arguments)}function ZU(){return(ZU=KU(qU().mark((function t(){var e,r,n=arguments;return qU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=pg.servkit.createTerminal({id:e.clientId||"custom-order-split",type:pg.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:pg.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.parent,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $U(t){return($U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ez(n.key),n)}}function ez(t){var e=function(t,e){if("object"!=$U(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$U(e)?e:String(e)}var rz=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._startTime=0,this._endTime=0,this._duration=0,this._started=!1,this.paused=!1}var e,r,n;return e=t,(r=[{key:"start",value:function(){if(!this._started){var t=Date.now();this._startTime=t,this._endTime=t,this._started=!0}}},{key:"startTime",get:function(){return this._startTime}},{key:"endTime",get:function(){return this._endTime}},{key:"duration",get:function(){return this._duration}},{key:"started",get:function(){return this._started}},{key:"pause",value:function(){if(this._started){this._endTime=Date.now();var t=this._endTime-this._startTime;this._duration+=t,this._startTime=Date.now(),this.paused=!0}}},{key:"resume",value:function(){this.paused&&(this._startTime=Date.now(),this.paused=!1)}},{key:"end",value:function(){if(this._started){this._endTime=Date.now();var t=this.paused?0:this._endTime-this._startTime,e=this._duration+t;return this._startTime=this._endTime=0,this._started=!1,this._duration=0,this.paused=!1,e/1e3}return 0}},{key:"endAndLog",value:function(t){this.started&&t(this.end())}}])&&tz(e.prototype,r),n&&tz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());function nz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nz=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==pz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(pz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function oz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function iz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function az(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uz(n.key),n)}}function sz(t,e,r){return e&&az(t.prototype,e),r&&az(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uz(t){var e=function(t,e){if("object"!=pz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pz(e)?e:String(e)}function cz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Az(t,e)}function Az(t,e){return(Az=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hz(t);if(e){var o=hz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fz(this,r)}}function fz(t,e){if(e&&("object"===pz(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hz(t){return(hz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pz(t){return(pz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dz,gz,yz=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pz(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vz=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pz(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mz=function(t){cz(r,t);var e=lz(r);function r(){return iz(this,r),e.apply(this,arguments)}return sz(r,[{key:"postMessageToHost",value:function(t,e){return Object(pg.API_UNSUPPORT)()}}]),r}(pg.ServService);yz([pg.anno.decl.event(),vz("design:type","function"==typeof(dz=void 0!==pg.ServEventer&&pg.ServEventer)?dz:Object)],mz.prototype,"watcher",void 0),yz([pg.anno.decl.api(),vz("design:type",Function),vz("design:paramtypes",[Object,String]),vz("design:returntype","function"==typeof(gz=void 0!==pg.ServAPIRetn&&pg.ServAPIRetn)?gz:Object)],mz.prototype,"postMessageToHost",null);var Iz=function(t){cz(o,t);var e,r,n=lz(o);function o(){return iz(this,o),n.apply(this,arguments)}return sz(o,[{key:"postMessageToHost",value:(e=nz().mark((function t(e,r){return nz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.parent.postMessage(e,null!=r?r:"*");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){oz(i,n,o,a,s,"next",t)}function s(t){oz(i,n,o,a,s,"throw",t)}a(void 0)}))},function(t,e){return r.apply(this,arguments)})}]),o}(mz=yz([pg.anno.decl({id:"com.custom.miniapp.model.viewer.booter.message.service",version:"1.0.0"})],mz));function Ez(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ez=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==xz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(xz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Cz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function bz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pz(n.key),n)}}function wz(t,e,r){return e&&Bz(t.prototype,e),r&&Bz(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pz(t){var e=function(t,e){if("object"!=xz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xz(e)?e:String(e)}function Sz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_z(t,e)}function _z(t,e){return(_z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dz(t);if(e){var o=Dz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oz(this,r)}}function Oz(t,e){if(e&&("object"===xz(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Dz(t){return(Dz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xz(t){return(xz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Iz=yz([pg.anno.impl()],Iz);var Mz,Rz=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xz(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Tz=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":xz(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},jz=function(t){Sz(r,t);var e=Qz(r);function r(){return bz(this,r),e.apply(this,arguments)}return wz(r,[{key:"heart",value:function(){return Object(pg.API_UNSUPPORT)()}}]),r}(pg.ServService);Rz([pg.anno.decl.api(),Tz("design:type",Function),Tz("design:paramtypes",[]),Tz("design:returntype","function"==typeof(Mz=void 0!==pg.ServAPIRetn&&pg.ServAPIRetn)?Mz:Object)],jz.prototype,"heart",null);var Lz=function(t){Sz(o,t);var e,r,n=Qz(o);function o(){return bz(this,o),n.apply(this,arguments)}return wz(o,[{key:"heart",value:(e=Ez().mark((function t(){return Ez().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){Cz(i,n,o,a,s,"next",t)}function s(t){Cz(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})}]),o}(jz=Rz([pg.anno.decl({id:"com.custom.miniapp.model.viewer.booter.session.service",version:"1.0.0"})],jz));function kz(t){return(kz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nz=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==kz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Fz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Gz(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fz(i,n,o,a,s,"next",t)}function s(t){Fz(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Uz(t){return zz.apply(this,arguments)}function zz(){return(zz=Gz(Nz().mark((function t(e){var r,n,o;return Nz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.onlineChecker,n=e.interval,o=e.onBreak,t.next=3,sC(n);case 3:return t.next=5,r();case 5:t.sent?Uz(e):o&&"function"==typeof o&&o();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Vz(n.key),n)}}function Hz(t,e,r){return e&&Yz(t.prototype,e),r&&Yz(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vz(t){var e=function(t,e){if("object"!=$z(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$z(e)?e:String(e)}function qz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kz(t,e)}function Kz(t,e){return(Kz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zz(t);if(e){var o=Zz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xz(this,r)}}function Xz(t,e){if(e&&("object"===$z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zz(t){return(Zz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $z(t){return($z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Lz=Rz([pg.anno.impl()],Lz);var tY,eY=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":$z(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},rY=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":$z(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},nY=function(t){Wz(r,t);var e=Jz(r);function r(){return qz(this,r),e.apply(this,arguments)}return Hz(r)}(pg.ServService);eY([pg.anno.decl.event(),rY("design:type","function"==typeof(tY=void 0!==pg.ServEventer&&pg.ServEventer)?tY:Object)],nY.prototype,"offlineWatcher",void 0);var oY=function(t){Wz(r,t);var e=Jz(r);function r(){return qz(this,r),e.apply(this,arguments)}return Hz(r)}(nY=eY([pg.anno.decl({id:"com.custom.miniapp.model.viewer.independent.state.service",version:"1.0.0"})],nY));oY=eY([pg.anno.impl()],oY);var iY=[{decl:nY,impl:oY}];function aY(t){return(aY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==aY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(aY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function uY(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function cY(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uY(i,n,o,a,s,"next",t)}function s(t){uY(i,n,o,a,s,"throw",t)}a(void 0)}))}}var AY="custom-order-split-transfer";function lY(t){return fY.apply(this,arguments)}function fY(){return(fY=cY(sY().mark((function t(e){var r,n,o=arguments;return sY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=pg.servkit.createTerminal({id:r.clientId||AY,type:pg.EServTerminal.MASTER,server:{serviceRefer:/.*/,service:{services:[]}},session:{channel:{type:pg.EServChannel.WINDOW,config:{master:{createWindow:function(t){return{target:e,origin:"*"}},destroyWindow:function(){e.close()}}}}}}),t.next=4,n.openSession({timeout:r.timeout||3e4});case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hY(){return pY.apply(this,arguments)}function pY(){return(pY=cY(sY().mark((function t(){var e,r,n=arguments;return sY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=pg.servkit.createTerminal({id:e.clientId||AY,type:pg.EServTerminal.SLAVE,server:{serviceRefer:/.*/,service:{services:iY}},session:{channel:{type:pg.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.opener,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var dY=r(836),gY=r(150);function yY(t){return(yY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */vY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==yY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(yY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function mY(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return IY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IY(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IY(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function EY(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}window.React=yu.a;var CY=document.getElementById("root");function bY(){return Promise.resolve([dY.a,vN]).then(function(){var t,e=(t=vY().mark((function t(e){var r,n,o,i;return vY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=mY(e,2),n=r[0],o=r[1],i=new n,t.next=4,i.registerPlugin(o).start({fpsDetectorEnabled:!0});case 4:return t.next=6,BY(i.getAppNodeId());case 6:document.body.removeChild(CY);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){EY(i,n,o,a,s,"next",t)}function s(t){EY(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()).catch((function(t){Object(gY.unmountComponentAtNode)(CY),Object(gY.render)(yu.a.createElement(AQ,null),CY),console.error("micros/pad",t)}))}function BY(t){var e=uC(5e3);return function r(){requestAnimationFrame((function(){document.querySelector("#".concat(t))?e.resolve():r()}))}(),e.promise}function wY(t){return(wY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function PY(t,e,r){return(e=DY(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */SY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==wY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function _Y(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function QY(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_Y(i,n,o,a,s,"next",t)}function s(t){_Y(i,n,o,a,s,"throw",t)}a(void 0)}))}}function OY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,DY(n.key),n)}}function DY(t){var e=function(t,e){if("object"!=wY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wY(e)?e:String(e)}var xY=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.serviceMap=new Map,this.getHost=function(){return t.isIndependentMiniApp()?{booter:window.opener,postMessage:function(t,r){return e.sappSDK.client.getService(mz).postMessageToHost(t,r)},onMessageReceive:function(t){return e.sappSDK.client.getService(mz).watcher.on(t)}}:{postMessage:function(t,e){return window.parent.postMessage(t,null!=e?e:"*")},onMessageReceive:function(t){return window.addEventListener("message",t)}}},this.handleFocus=function(){rz.start()},this.handleBlur=Object(Or.throttle)(QY(SY().mark((function r(){var n,o,i,a,s;return SY().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,n=e.getCustomMiniAppService(sm),o=e.getCustomMiniAppService(pm),i=e.getCustomMiniAppService(dm),r.next=6,null==o?void 0:o.getFOPOrderId();case 6:return a=r.sent,r.next=9,null==i?void 0:i.getRootAccountId();case 9:s=r.sent,rz.endAndLog((function(e){null==n||n.log({behavior:"miniAppFOPOrderModeTime",type:"splitOrder",fopOrderId:a,rootAccountId:s,time:e,isIndependentMiniApp:t.isIndependentMiniApp()})})),r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),console.error("LOG TIME ERR",r.t0);case 16:case"end":return r.stop()}}),r,null,[[0,13]])}))),200),this.initLange(ae.ZH_CN,{zh_CN:HU}),function(t){uI=t}(this)}var e,r,n,o,i;return e=t,r=[{key:"startOnApiCalledEvent",value:function(){var t=this.getCustomMiniAppService(sm);_r.on(wr.API_CALLED,(function(e){t&&(t.logAnalyseApiCalledInfo(e),e.status||t.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:e.errMsg,stack:""}))}))}},{key:"isInCustomMiniAppMode",value:function(){return JU()}},{key:"createDebugUtils",value:function(){var t=this.serviceMap,e={enableDebug:function(){window.__customsdk__.services=t}};window.__customsdk__=e}},{key:"start",value:(i=QY(SY().mark((function e(r){var n,o=this;return SY().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!t.isIndependentMiniApp()){e.next=11;break}return e.next=4,hY(r);case 4:return this.sappSDK=e.sent,e.next=7,sC(30);case 7:Uz({onlineChecker:function(){var t=QY(SY().mark((function t(){return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.race([o.sappSDK.client.getService(jz).heart().then((function(){return!0})),sC(2e3).then((function(){return Promise.resolve(!1)}))]);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),interval:5e3,onBreak:function(){return window.close()}}),window.addEventListener("beforeunload",(function(){o.sappSDK.server.getService(nY).offlineWatcher.emit()})),e.next=23;break;case 11:if(!this.isInCustomMiniAppMode()){e.next=18;break}if(pg.sappSDK.isStarted){e.next=15;break}return e.next=15,pg.sappSDK.setConfig({useTerminalId:null==r?void 0:r.clientId,onClose:function(){var t=QY(SY().mark((function t(e){return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.stop();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}).start();case 15:this.sappSDK=pg.sappSDK,e.next=23;break;case 18:return e.next=20,sC(30);case 20:return e.next=22,XU(r);case 22:this.sappSDK=e.sent;case 23:return this.startOnApiCalledEvent(),e.next=26,bY();case 26:(n=this.getCustomMiniAppService($v))?(_d().setMiniAppHttpProxyClientService(n),FI(_d())):FI(Sd()),(xI=new NI.AttachedService).config.setRequestClient(RI),MI=new NI.ParamModelDataService({paramModelConstructor:gr,requestClient:RI}),new NI.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Pr,requestClient:RI}),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),window.addEventListener("beforeunload",this.handleBlur);case 32:case"end":return e.stop()}}),e,this)}))),function(t){return i.apply(this,arguments)})},{key:"initLange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae.ZH_CN,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Or.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),UU.a.init({lang:t,debug:!1,initImmediate:!0,translatorType:GU.ENUM.TranslatorType.I18next,packages:[YU],resource:PY({},YU,e)}),zU.init({namespace:YU,resources:YU})}},{key:"stop",value:(o=QY(SY().mark((function t(){var e;return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.getCustomMiniAppService(em))){t.next=4;break}return t.next=4,e.lockModelBySplit();case 4:this.serviceMap.forEach((function(t){Object(Or.isFunction)(t.__onDestroy)&&t.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(t){if(Pk.isPrototypeOf(t)){var e=this.serviceMap,r=e.get(t);return r||(r=new t,e.set(t,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof pg.SappSDK?e.getService(t):e.client.getService(t)}},{key:"getCustomMiniAppServiceUnSafe",value:function(t){return this.getCustomMiniAppService(t)}}],n=[{key:"isIndependentMiniApp",value:function(){return!!window.opener}}],r&&OY(e.prototype,r),n&&OY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),MY=[{decl:jz,impl:Lz},{decl:mz,impl:Iz}];function RY(t){return(RY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function TY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kY(n.key),n)}}function LY(t,e,r){return e&&jY(t.prototype,e),r&&jY(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kY(t){var e=function(t,e){if("object"!=RY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=RY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==RY(e)?e:String(e)}function NY(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FY(t,e)}function FY(t,e){return(FY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GY(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zY(t);if(e){var o=zY(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UY(this,r)}}function UY(t,e){if(e&&("object"===RY(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zY(t){return(zY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YY(t){return function(t){if(Array.isArray(t))return HY(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return HY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HY(t,e)}(t)||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 HY(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var VY=[LI.MiniAppDesignBaseInfoService,LI.MiniAppParamModelJsonDataService,sm,rm,$v,em,bm,fm,nm,hm,pm,dm];function qY(){for(var t=new Map,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){var r=e.meta(),n=(null==r?void 0:r.id)||"";t.has(n)||t.set(n,e)})),YY(t.values())}var WY=function(t){return function(e){NY(n,e);var r=GY(n);function n(){return TY(this,n),r.apply(this,arguments)}return LY(n,[{key:"meta",value:function(){return t}}],[{key:"meta",value:function(){return t}}]),n}(pg.ServService)};function KY(t,e,r){return t.map((function(t){var n=t.meta()||{},o=n.apis,i=n.evts,a=function(t){NY(r,t);var e=GY(r);function r(){return TY(this,r),e.apply(this,arguments)}return LY(r)}(t);return null==o||o.forEach((function(r){var n=r.name;a.prototype[n]=e(t)[n]})),null==i||i.forEach((function(n){var o=n.name;e(t)[o].on((function(e){r(t)[o].emit(e)}))})),{decl:t,impl:a}}))}function JY(t){return(JY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function XY(t){return function(t){if(Array.isArray(t))return ZY(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ZY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZY(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $Y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */$Y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==JY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(JY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function tH(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function eH(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tH(i,n,o,a,s,"next",t)}function s(t){tH(i,n,o,a,s,"throw",t)}a(void 0)}))}}function rH(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nH(n.key),n)}}function nH(t){var e=function(t,e){if("object"!=JY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=JY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==JY(e)?e:String(e)}var oH=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.proxyTerminals=new Set,this.initializeServer=function(){var t=eH($Y().mark((function t(e){var n;return $Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!JU()){t.next=7;break}if(pg.sappSDK.isStarted){t.next=4;break}return t.next=4,pg.sappSDK.setConfig({useTerminalId:null==e?void 0:e.clientId}).start();case 4:r.sappSDK=pg.sappSDK,t.next=12;break;case 7:return t.next=9,sC(30);case 9:return t.next=11,XU(e);case 11:r.sappSDK=t.sent;case 12:return t.next=14,r.getCustomMiniAppService(tm).getAllAvailableService();case 14:return n=t.sent,window.addEventListener("message",(function(t){t.source===window.parent&&r.proxyTerminals.forEach((function(e){e.server.getService(mz).watcher.emit({data:t.data,origin:t.origin})}))})),t.abrupt("return",n);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.serverDefer=this.initializeServer(e)}var e,r,n,o;return e=t,(r=[{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof pg.SappSDK?e.getService(t):e.client.getService(t)}},{key:"bootstrap",value:(o=eH($Y().mark((function t(e){var r,n,o,i,a,s,u,c,A=this;return $Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.proxyTerminals.size>0)){t.next=2;break}throw new Error("当前仅支持打开一个独立小程序");case 2:return t.next=4,this.serverDefer;case 4:if(r=t.sent,n=e.url,o=window.open(n)){t.next=9;break}throw new Error("打开小程序失败!请检查url或者主动解除弹窗限制");case 9:return i=function(){a.closeSession(),A.proxyTerminals.delete(a)},t.next=12,lY(o);case 12:return a=t.sent,s=r.map(WY),u=qY.apply(void 0,XY(s).concat(XY(VY))),c=KY(u,(function(t){return A.getCustomMiniAppService(t)}),(function(t){return a.server.getService(t)})),a.server.addServices([].concat(XY(c),XY(MY))),a.client.getService(nY).offlineWatcher.on(i),this.proxyTerminals.add(a),t.abrupt("return",o);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&rH(e.prototype,r),n&&rH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},function(t,e,r){"use strict";r.r(e),r.d(e,"changeLanguage",(function(){return X})),r.d(e,"cloneInstance",(function(){return Z})),r.d(e,"createInstance",(function(){return $})),r.d(e,"dir",(function(){return tt})),r.d(e,"exists",(function(){return et})),r.d(e,"getFixedT",(function(){return rt})),r.d(e,"init",(function(){return nt})),r.d(e,"loadLanguages",(function(){return ot})),r.d(e,"loadNamespaces",(function(){return it})),r.d(e,"loadResources",(function(){return at})),r.d(e,"off",(function(){return st})),r.d(e,"on",(function(){return ut})),r.d(e,"setDefaultNamespace",(function(){return ct})),r.d(e,"t",(function(){return At})),r.d(e,"use",(function(){return lt}));var n=r(287),o=r.n(n),i=r(197),a=r.n(i),s=r(208),u=r.n(s),c=r(209),A=r.n(c),l=r(372),f=r.n(l),h=r(398),p=r.n(h),d=r(399),g=r.n(d),y=r(223),v=r.n(y),m=r(906),I=r.n(m),E={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){var r;console&&console[t]&&(r=console)[t].apply(r,I()(e))}},C=new(function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.init(e,r)}return A()(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||E,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,r,n){return n&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,a()({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),b=function(){function t(){u()(this,t),this.observers={}}return A()(t,[{key:"on",value:function(t,e){var r=this;return t.split(" ").forEach((function(t){r.observers[t]=r.observers[t]||[],r.observers[t].push(e)})),this}},{key:"off",value:function(t,e){var r=this;this.observers[t]&&this.observers[t].forEach((function(){if(e){var n=r.observers[t].indexOf(e);n>-1&&r.observers[t].splice(n,1)}else delete r.observers[t]}))}},{key:"emit",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach((function(t){t.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(e){e.apply(e,[t].concat(r))}))}}}]),t}();function B(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return r.resolve=t,r.reject=e,r}function w(t){return null==t?"":""+t}function P(t,e,r){t.forEach((function(t){e[t]&&(r[t]=e[t])}))}function S(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function _(t,e,r){var n=S(t,e,Object);n.obj[n.k]=r}function Q(t,e){var r=S(t,e),n=r.obj,o=r.k;if(n)return n[o]}function O(t,e,r){for(var n in e)n in t?"string"==typeof t[n]||t[n]instanceof String||"string"==typeof e[n]||e[n]instanceof String?r&&(t[n]=e[n]):O(t[n],e[n],r):t[n]=e[n];return t}function D(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return x[t]})):t}var R=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),r.data=t||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return g()(e,t),A()(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[t,e];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(i=t.split(".")),Q(this.data,i)}},{key:"addResource",value:function(t,e,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=[t,e];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(n=e,e=(a=t.split("."))[1]),this.addNamespaces(e),_(this.data,a,n),o.silent||this.emit("added",t,e,r,n)}},{key:"addResources",value:function(t,e,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(t,e,o,r[o],{silent:!0});n.silent||this.emit("added",t,e,r)}},{key:"addResourceBundle",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(n=r,r=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var u=Q(this.data,s)||{};n?O(u,r,o):u=a()({},u,r),_(this.data,s,u),i.silent||this.emit("added",t,e,r)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a()({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(b),T={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,r,n,o){var i=this;return t.forEach((function(t){i.processors[t]&&(e=i.processors[t].process(e,r,n,o))})),e}},j=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),P(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],t,v()(v()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=C.create("translator"),r}return g()(e,t),A()(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,e);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(t,e){var r=e.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,o=e.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var i=t.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(n)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function(t,e){var r=this;if("object"!==o()(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),s=i.key,u=i.namespaces,c=u[u.length-1],A=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(A&&"cimode"===A.toLowerCase()){if(l){var f=e.nsSeparator||this.options.nsSeparator;return c+f+s}return s}var h=this.resolve(t,e),p=h&&h.res,d=h&&h.usedKey||s,g=h&&h.exactUsedKey||s,y=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(I&&p&&E&&v.indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,p,e):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(n){var C="[object Array]"===y,b=C?[]:{},B=C?g:d;for(var w in p)if(Object.prototype.hasOwnProperty.call(p,w)){var P="".concat(B).concat(n).concat(w);b[w]=this.translate(P,a()({},e,{joinArrays:!1,ns:u})),b[w]===P&&(b[w]=p[w])}p=b}}else if(I&&"string"==typeof m&&"[object Array]"===y)(p=p.join(m))&&(p=this.extendTranslation(p,t,e));else{var S=!1,_=!1;if(!this.isValidLookup(p)&&void 0!==e.defaultValue){if(S=!0,void 0!==e.count){var Q=this.pluralResolver.getSuffix(A,e.count);p=e["defaultValue".concat(Q)]}p||(p=e.defaultValue)}this.isValidLookup(p)||(_=!0,p=s);var O=e.defaultValue&&e.defaultValue!==p&&this.options.updateMissing;if(_||S||O){this.logger.log(O?"updateKey":"missingKey",A,c,s,O?e.defaultValue:p);var D=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var M=0;M<x.length;M++)D.push(x[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(e.lng||this.language):D.push(e.lng||this.language);var R=function(t,n){r.options.missingKeyHandler?r.options.missingKeyHandler(t,c,n,O?e.defaultValue:p,O,e):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,c,n,O?e.defaultValue:p,O,e),r.emit("missingKey",t,c,n,p)};if(this.options.saveMissing){var T=void 0!==e.count&&"string"!=typeof e.count;this.options.saveMissingPlurals&&T?D.forEach((function(t){r.pluralResolver.getPluralFormsOfKey(t,s).forEach((function(e){return R([t],e)}))})):R(D,s)}}p=this.extendTranslation(p,t,e,h),_&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(c,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(t,e,r,n){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,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)),t=this.interpolator.interpolate(t,i,r.lng||this.language,r),!1!==r.nest&&(t=this.interpolator.nest(t,(function(){return o.translate.apply(o,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var s=r.postProcess||this.options.postProcess,u="string"==typeof s?[s]:s;return null!=t&&u&&u.length&&!1!==r.applyPostProcessor&&(t=T.handle(u,t,e,r,this)),t}},{key:"resolve",value:function(t){var e,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),c=u.key;r=c;var A=u.namespaces;a.options.fallbackNS&&(A=A.concat(a.options.fallbackNS));var l=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);A.forEach((function(t){a.isValidLookup(e)||(i=t,h.forEach((function(r){if(!a.isValidLookup(e)){o=r;var i,u,A=c,h=[A];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(h,c,r,t,s);else l&&(i=a.pluralResolver.getSuffix(r,s.count)),l&&f&&h.push(A+i),f&&h.push(A+="".concat(a.options.contextSeparator).concat(s.context)),l&&h.push(A+=i);for(;u=h.pop();)a.isValidLookup(e)||(n=u,e=a.getResource(r,t,u,s))}})))}))}})),{res:e,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,r,n):this.resourceStore.getResource(t,e,r,n)}}]),e}(b);function L(t){return t.charAt(0).toUpperCase()+t.slice(1)}var k=function(){function t(e){u()(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=C.create("languageUtils")}return A()(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(t){return t.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),e.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()),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),e.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,e){var r=this,n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(r.isWhitelisted(t)?o.push(t):r.logger.warn("rejecting non-whitelisted language code: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),n.forEach((function(t){o.indexOf(t)<0&&i(r.formatLanguageCode(t))})),o}}]),t}(),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}],F={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1===t?0:2===t?1:(t<0||t>10)&&t%10==0?2:3)}};function G(){var t={};return N.forEach((function(e){e.lngs.forEach((function(r){t[r]={numbers:e.nr,plurals:F[e.fc]}}))})),t}var U=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.languageUtils=e,this.options=r,this.logger=C.create("pluralResolver"),this.rules=G()}return A()(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var r=this,n=[],o=this.getRule(t);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(t,o);n.push("".concat(e).concat(i))})),n):n}},{key:"getSuffix",value:function(t,e){var r=this,n=this.getRule(t);if(n){var o=n.noAbs?n.plurals(e):n.plurals(Math.abs(e)),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(t)),""}}]),t}(),z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),this.logger=C.create("interpolator"),this.init(e,!0)}return A()(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;e&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:M,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?D(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?D(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?D(r.nestingPrefix):r.nestingPrefixEscaped||D("$t("),this.nestingSuffix=r.nestingSuffix?D(r.nestingSuffix):r.nestingSuffixEscaped||D(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,e,r,n){var o,i,a,s=this;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(s.formatSeparator)<0)return Q(e,t);var n=t.split(s.formatSeparator),o=n.shift().trim(),i=n.join(s.formatSeparator).trim();return s.format(Q(e,o),i,r)};this.resetRegExp();var A=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;(o=this.regexpUnescape.exec(t))&&(i=c(o[1].trim()),t=t.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;o=this.regexp.exec(t);){if(void 0===(i=c(o[1].trim())))if("function"==typeof A){var l=A(t,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=w(i));if(i=this.escapeValue?u(this.escape(i)):u(i),t=t.replace(o[0],i),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t}},{key:"nest",value:function(t,e){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a()({},o);function s(t,e){if(t.indexOf(",")<0)return t;var r=t.split(",");t=r.shift();var n=r.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),e&&(i=a()({},e,i))}catch(e){this.logger.error("failed parsing options string in nesting for key ".concat(t),e)}return t}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);){if((n=e(s.call(this,r[1].trim(),i),i))&&r[0]===t&&"string"!=typeof n)return n;"string"!=typeof n&&(n=w(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),n=""),t=t.replace(r[0],n),this.regexp.lastIndex=0}return t}}]),t}(),Y=r(766),H=r.n(Y);var V=function(t){function e(t,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u()(this,e),o=f()(this,p()(e).call(this)),b.call(v()(v()(o))),o.backend=t,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=C.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return g()(e,t),A()(e,[{key:"queueLoad",value:function(t,e,r,n){var o=this,i=[],a=[],s=[],u=[];return t.forEach((function(t){var n=!0;e.forEach((function(e){var s="".concat(t,"|").concat(e);!r.reload&&o.store.hasResourceBundle(t,e)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(e)<0&&u.push(e)))})),n||s.push(t)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,r){var n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];e&&this.emit("failedLoading",i,a,e),r&&this.store.addResourceBundle(i,a,r),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(r){var n,o,u,c,A,l;n=r.loaded,o=a,c=S(n,[i],Object),A=c.obj,l=c.k,A[l]=A[l]||[],u&&(A[l]=A[l].concat(o)),u||A[l].push(o),function(t,e){for(var r=t.indexOf(e);-1!==r;)t.splice(r,1),r=t.indexOf(e)}(r.pending,t),e&&r.errors.push(e),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){s[t]||(s[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(e){s[t].indexOf(e)<0&&s[t].push(e)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,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 t.length?this.backend[r](t,e,(function(s,u){s&&u&&o<5?setTimeout((function(){n.read.call(n,t,e,r,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(t,e){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 t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(t){r.loadOne(t)}))}},{key:"load",value:function(t,e,r){this.prepareLoading(t,e,{},r)}},{key:"reload",value:function(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}},{key:"loadOne",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];this.read(i,a,"read",null,null,(function(n,o){n&&e.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),n),!n&&o&&e.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),o),e.loaded(t,n,o)}))}},{key:"saveMissing",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,r,n,null,a()({},i,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],e,r,n)}}]),e}(b);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===o()(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===o()(t[2])||"object"===o()(t[3])){var r=t[3]||t[2];Object.keys(r).forEach((function(t){e[t]=r[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function W(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function K(){}var J=new(function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(u()(this,e),t=f()(this,p()(e).call(this)),b.call(v()(v()(t))),t.options=W(r),t.services={},t.logger=C,t.modules={external:[]},n&&!t.isInitialized&&!r.isClone){if(!t.options.initImmediate)return t.init(r,n),f()(t,v()(v()(t)));setTimeout((function(){t.init(r,n)}),0)}return t}return g()(e,t),A()(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(r=e,e={}),this.options=a()({},q(),this.options,W(e)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?C.init(n(this.modules.logger),this.options):C.init(null,this.options);var o=new k(this.options);this.store=new R(this.options.resources,this.options);var i=this.services;i.logger=C,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new z(this.options),i.backendConnector=new V(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].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 j(this.services,this.options),this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}var s=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var u=B(),c=function(){t.changeLanguage(t.options.lng,(function(e,n){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(n),r(e,n)}))};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return e();var r=[],n=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(t){r.indexOf(t)<0&&r.push(t)}))};if(this.language)n(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach((function(t){return n(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return n(t)})),this.services.backendConnector.load(r,this.options.ns,e)}else e(null)}},{key:"reloadResources",value:function(t,e,r){var n=B();return t||(t=this.languages),e||(e=this.options.ns),r||(r=K),this.services.backendConnector.reload(t,e,(function(t){n.resolve(),r(t)})),n}},{key:"use",value:function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&T.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var r=this,n=B();this.emit("languageChanging",t);var o=function(t){t&&(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.translator.language||r.translator.changeLanguage(t),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(t)),r.loadResources((function(o){!function(t,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),e&&e(t,(function(){return r.t.apply(r,arguments)}))}(o,t)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(t,e){var r=this,n=function t(e,n){var i=a()({},n);if("object"!==o()(n)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,n].concat(u))}return i.lng=i.lng||t.lng,i.lngs=i.lngs||t.lngs,i.ns=i.ns||t.ns,r.t(e,i)};return"string"==typeof t?n.lng=t:n.lngs=t,n.ns=e,n}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"loadNamespaces",value:function(t,e){var r=this,n=B();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){r.options.ns.indexOf(t)<0&&r.options.ns.push(t)})),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var r=B();"string"==typeof t&&(t=[t]);var n=this.options.preload||[],o=t.filter((function(t){return n.indexOf(t)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)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(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new e(t,r)}},{key:"cloneInstance",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=a()({},this.options,r,{isClone:!0}),i=new e(o),s=["store","services","language"];return s.forEach((function(e){i[e]=t[e]})),i.translator=new j(i.services,i.options),i.translator.on("*",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];i.emit.apply(i,[t].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),e}(b)),X=(e.default=J,J.changeLanguage.bind(J)),Z=J.cloneInstance.bind(J),$=J.createInstance.bind(J),tt=J.dir.bind(J),et=J.exists.bind(J),rt=J.getFixedT.bind(J),nt=J.init.bind(J),ot=J.loadLanguages.bind(J),it=J.loadNamespaces.bind(J),at=J.loadResources.bind(J),st=J.off.bind(J),ut=J.on.bind(J),ct=J.setDefaultNamespace.bind(J),At=J.t.bind(J),lt=J.use.bind(J)},function(t,e,r){"use strict";r.r(e);var n=new(function(){function t(){var t=this;this.profiling={frames:[],interactions:[]},this.profilingStarted=!1,this.indexRecordMap=new Map,this.interactionMapToPayload=new Map,this.startProfiling=function(){t.profilingStarted=!0,t.profiling={frames:[],interactions:[]},t.indexRecordMap.clear(),t.interactionMapToPayload.clear()},this.stopProfiling=function(){t.profilingStarted=!1},this.getProfiling=function(){return t.profiling},this.getPayloadFromInteraction=function(e){return t.interactionMapToPayload.get(e)},this.getIndexRecordByName=function(e){var r=t.indexRecordMap.get(e);return r&&0!==r.length?r:null},this.onFrame=function(e){t.profilingStarted&&t.profiling.frames.push(e)}}return Object.defineProperty(t.prototype,"isProfiling",{get:function(){return this.profilingStarted},enumerable:!0,configurable:!0}),t.prototype.onInteraction=function(t,e){var r=this.indexRecordMap.get(t.name);if(r&&0!==r.length){var n=r[r.length-1],o=this.profiling.frames.length-1;n.endIndex=o,this.profiling.interactions.push(t),this.interactionMapToPayload.set(t,e)}},t.prototype.onInteractionStart=function(t){var e=t.name,r=this.indexRecordMap.get(e)||[];r.push({startIndex:this.profiling.frames.length,endIndex:0}),this.indexRecordMap.set(e,r)},t}()),o=r(106),i=r(87),a=function(){function t(){this.onFrame=n.onFrame}return t.prototype.onInteraction=function(t,e){var r=t.name;r===o.a.IDLE||e.__INTERNAL__merged||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.a)(r),n.isProfiling&&n.onInteraction(t,e))},t.prototype.onInteractionStart=function(t){var e=t.name;e===o.a.IDLE||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.g)(e),n.isProfiling&&n.onInteractionStart(t))},t}();e.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(0),o=r(154),i=r(764),a=function(){function t(){}return t.prototype.__INTERNAL__beforeInit=function(){var t;this._session=this.createSession(),null===(t=this.beforeInit)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterInit=function(){var t;try{null===(t=this.afterInit)||void 0===t||t.call(this)}finally{this._session.__INTERNAL__afterInit()}},t.prototype.__INTERNAL__beforeDispose=function(){var t;null===(t=this.beforeDispose)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterDispose=function(){var t;try{null===(t=this.afterDispose)||void 0===t||t.call(this)}finally{this._session.__INTERNAL_dispose()}},t.prototype.createSession=function(){return new i.a},Object(n.c)([Object(o.b)({getter:function(){return this._session}})],t.prototype,"session",void 0),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a}));var n=r(257),o=r(12),i=o.createContext({get rootState(){throw new Error}}),a=Object(n.getConnector)(i).connect},function(t,e,r){"use strict";var n=r(11),o=function(){function t(e){var r=this;this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0,this.onMerged=e.onMerged,this.stutterFrameDurationBoundary=void 0!==e.stutterFrameDurationBoundary?e.stutterFrameDurationBoundary:t.DefaultStutterFrameDurationBoundary;var o=void 0!==e.maxMergeTimeDuration?e.maxMergeTimeDuration:t.DefaultMaxMergeTimeDuration;this.asyncFlush=Object(n.throttle)((function(){return r.flush()}),o,{leading:!1})}return t.prototype.onFrame=function(t){var e=t.duration;t.activeFrame&&this.addFrameDuration(e)},t.prototype.add=function(t){this.addFrameDuration(t)},t.prototype.addFrameDuration=function(t){this.frameDurationSum+=t,this.frameCount++,t>this.stutterFrameDurationBoundary&&this.stutterFrameCount++,this.asyncFlush()},t.prototype.flushImmediately=function(){this.asyncFlush.flush()},t.prototype.flush=function(){if(this.frameCount>0)try{this.onMerged({sum:this.frameDurationSum,count:this.frameCount,stutterCount:this.stutterFrameCount})}finally{this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0}},t.DefaultMaxMergeTimeDuration=1e3*(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING?30:180),t.DefaultStutterFrameDurationBoundary=100,t}();e.a=o},,,,,,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(257),o=r(509);function i(t){return Object(n.combine)(t,o.a)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),o=r(147),i=r(12),a=r(698),s=r(513),u=function(){function t(){this.toolsMap=new Map}return t.prototype.registerTool=function(t){this.toolsMap.set(t.toolKey,t),this.activeToolKey===t.toolKey&&t.onEnter()},t.prototype.unregisterTool=function(t){this.toolsMap.delete(t.toolKey),this.activeToolKey===t.toolKey&&t.onLeave()},t.prototype.toggleActiveToolKey=function(t){var e=this;if(this.activeToolKey!==t){var r=this.activeToolKey&&this.toolsMap.get(this.activeToolKey),n=t&&this.toolsMap.get(t);Object(s.b)([function(){return r&&r.onLeave()},function(){return n&&n.onEnter()},function(){return e.activeToolKey=t}]),Object(o.b)({behavior:o.a.switchTool,toolKey:t,prevToolKey:this.activeToolKey})}},t}(),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.systemInternal=new u,e.contextValue={system:e.systemInternal},e}return Object(n.d)(e,t),e.prototype.componentDidMount=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.componentDidUpdate=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.render=function(){return i.createElement(a.a.Provider,{value:this.contextValue},this.props.children)},e}(i.Component)},function(t,e,r){"use strict";var n=r(0),o=r(196),i=r(446),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.d)(e,t),e.prototype.setGlobalUnit=function(t){switch(t){case i.a.mm:this.setGlobalLengthUnit(o.c.mm),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.m:this.setGlobalLengthUnit(o.c.m),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.ft:this.setGlobalLengthUnit(o.c.ft),this.setGlobalAreaUnit(o.a.sqFt);break;default:if(String(t).match(/^1\d{2}$/))this.setGlobalLengthUnit(Number(String(t)[1])),this.setGlobalAreaUnit(Number(String(t)[2]));else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}},e}(o.f);e.a=a},function(t,e,r){"use strict";var n=r(11),o=r(701),i=function(){function t(t){this.props=t}return t.prototype.create=function(t){var e=this;return this.meshBuilder=new o.a((function(){return e.props}),this.props.__unstable__onMeshCreated||n.noop,t),this.meshBuilder.createMesh()},t.prototype.update=function(t){this.meshBuilder.updateMesh(t)},t.prototype.dispose=function(t){this.meshBuilder.disposeMesh()},t.prototype.__unstable__getSerializable=function(){return this.meshBuilder.serializable},t}();e.a=i},function(t,e,r){"use strict";var n,o,i=r(0),a=r(105),s=r(512),u=r(11),c=r(12),A=r(370),l=r(202),f=r(265),h=r(154),p=r(93);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){if(t.context===A.a){var e=a.default.getParent(t);Object(p.b)(t,"mount-view","[mountView] 未使用 mountView 挂载视图,进而导致渲染顺序不正确. 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor))+". ",e,Object(s.a)("002"))}var r=t.props.mountPointId,n=Object(u.first)(Object(f.c)(l.a.__INTERNAL__getKey(r)));if(n){var o=function(t){for(var e=t,r=a.default.getParent(e);r;)e=r,r=a.default.getParent(e);return e},c=o(t);if(c===o(n)){var h=c;if(String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(t,h)))>=String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(n,h)))){e=a.default.getParent(t);Object(p.b)(t,l.a.__INTERNAL__getKey(r),'[ViewMounter] ViewMounter 渲染顺序出现在相应的 MountPoint ("'+r.toString()+'") 之后,渲染顺序不正确:',t,". 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor)),e,".",Object(s.a)("001"))}}}}}function y(t){return t.exclusive?void 0:t.sourceKey}var v=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.viewKey=String(e.viewKey++),r}return Object(i.d)(e,t),e.prototype.componentDidMount=function(){var t=this.props;Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,this.context,y(t))},e.prototype.componentWillUpdate=function(t,e,r){this.props.mountPointId!==t.mountPointId?(Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey),Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,r,y(t))):Object(f.g)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.renderOrder,r,y(t))},e.prototype.componentWillUnmount=function(){Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey)},e.prototype.render=function(){return null},e.prototype.getChildren=function(t){var e=this;if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var r=t.children;return"function"==typeof r?function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r.apply(void 0,Object(i.i)(t));return I(e,o),o}:(I(this,r),r)}return t.children},e.viewKey=0,e.contextType=A.b,e}(c.Component);if(e.a=v,Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var m=function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,Object(i.i)([this],r)),t.apply(this,r)}};v.prototype.componentDidMount=m(null!==(n=v.prototype.componentDidMount)&&void 0!==n?n:u.noop,(function(t){g(t)})),v.prototype.componentDidUpdate=m(null!==(o=v.prototype.componentDidUpdate)&&void 0!==o?o:u.noop,(function(t){g(t)}))}function I(t,e){Array.isArray(e)?e.forEach((function(e){E(t,e)})):E(t,e)}function E(t,e){if(function(t){return"object"===d(t)&&null!==t}(e)&&null===e.key){var r=function(t){var e=null==t?void 0:t.type;return"string"==typeof e?e:e&&(e.__reactstandin__key||a.default.getDisplayName(e))},n=e._owner,o=t._reactInternalFiber.return;Object(p.b)(n||o,"viewMounter::contentKey",'[ViewMounter] Each child of ViewMounter must have a key, check "'+r(e)+'" in the render function of "'+r(n)+'" for mount point "'+Object(h.a)(l.a.__INTERNAL__getKey(t.props.mountPointId))+'". Details:',{viewMounterContentNode:e,viewmounterInstance:t,viewMounterParent:o,nodeOwner:n,getOwnerList:function(){var e=function(t){for(var e=[];t;)e.push(t),t=t._debugOwner;return e.map((function(t){return{name:r(t),node:t}}))};return{viewMounterOwnerList:e(t._reactInternalFiber._debugOwner),viewMounterContentOwnerList:e(n)}}},Object(s.a)("003"))}}},function(t,e,r){"use strict";r.d(e,"b",(function(){return h})),r.d(e,"a",(function(){return g}));var n=r(0),o=r(72),i=r(84),a=r(106),s=r(92),u=r(87);var c=r(559),A=r(692),l=r(325),f=r(694),h=function(){function t(){p.push(this)}return t.prototype.__INTERNAL__fpsMerged=function(t){this.onMergedFps&&this.onMergedFps(t)},t.prototype.__INTERNAL__getAppId=function(){return this.appId},t.prototype.__INTERNAL__emitEvent=function(t){this.onInteraction&&this.onInteraction(t)},t.prototype.__INTERNAL__initWithAppId=function(t){I(),this.appId=t},t.prototype.__INTERNAL__dispose=function(){var t=p.indexOf(this);p.splice(t,1)},t.prototype.config=function(t){this.onInteraction=t.onInteraction,this.onMergedFps=t.onMergedFps},Object(n.c)([f.a],t.prototype,"config",null),t}(),p=[],d=function(t,e){o.b.getInstance().emit(g,e),p.forEach((function(r){r.__INTERNAL__getAppId()===t&&r.__INTERNAL__emitEvent(e)}))},g=new i.a(a.a.INTERACTION),y=function(t){var e;return Object(n.b)(void 0,void 0,void 0,(function(){var r,o,i=t.appId,s=t.failed,A=Object(n.h)(t,["appId","failed"]);return Object(n.e)(this,(function(t){switch(t.label){case 0:return[4,Object(c.d)()];case 1:return t.sent(),r=(null===(e=navigator.connection)||void 0===e?void 0:e.rtt)||0,o=Object(u.c)(),d(i,{eventType:a.d.PAGE_READY,metricData:Object(n.a)(Object(n.a)(Object(n.a)({},"memory"in performance?{totalJSHeapSize:performance.memory.totalJSHeapSize,usedJSHeapSize:performance.memory.usedJSHeapSize}:{}),A),{pageFinshedTotal:Object(u.e)()}),perfData:Object(n.a)(Object(n.a)({},o),{rtt:r}),labels:{failed:s.toString()}}),[2]}}))}))},v=function(){function t(){}return t.prototype.onInstantInteraction=function(t,e){d(t.appId,{eventType:a.d.INSTANT_INTERACTION,metricData:e,labels:{interaction:t.name}})},t.prototype.onInteraction=function(t,e){t.merged&&!e.__INTERNAL__merged||(t.durationOnly||t.trackingMerged&&(e=Object(n.a)(Object(n.a)({},e),{eventType:a.d.INTERACTION,labels:Object(n.a)(Object(n.a)({},e.labels),{interaction:t.name})})),d(t.appId,e))},t}(),m=!1,I=function(){if(!m){if(c.a.on(a.a.PAGE_READY,y),l.a.addPlugin(new v),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING){var t=r(1215).default;l.a.addPlugin(new t)}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING){var e=r(1383).default;l.a.addPlugin(new e)}var n;l.a.init(),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(n=s.b.prototype.componentWillMount,s.b.prototype.componentWillMount=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(this,t);var r=Object(u.b)(this);r&&Object(u.f)(this.mesh,r)},Object(A.a)()),m=!0}}}])}));
|
|
209
|
+
***************************************************************************** */var ym,vm=function(t,e){return(vm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function mm(t,e){function r(){this.constructor=t}vm(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Im(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":gm(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function Em(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Cm(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Em(arguments[e]));return t}!function(t){t.CABINET="CABINET",t.WARDROBE="WARDROBE",t.DOOR_WINDOW="DW",t.CABINET_COPY="CABINET_COPY",t.WARDROBE_COPY="WARDROBE_COPY",t.DOOR_WINDOW_COPY="DW_COPY"}(ym||(ym={}));var bm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return mm(e,t),e.prototype.getParamModelDataByIds=function(t,e){return Object(pg.API_UNSUPPORT)()},e.prototype.getTopParamModels=function(t){return Object(pg.API_UNSUPPORT)()},Im([pg.anno.decl.api()],e.prototype,"getParamModelDataByIds",null),Im([pg.anno.decl.api()],e.prototype,"getTopParamModels",null),e=Im([pg.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:Vy.INNER})],e)}(pg.ServService);var Bm,wm,Pm,Sm=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PopBufferMtl=void 0,e.toPopBufferMtl=function(t){var e=t.parameters,r=new a;r.setObjName(t.objName),t.brandGoodId&&r.setBrandGoodId(t.brandGoodId);if(e)for(var o=0,i=e.length;o<i;o++){var s=e[o];switch(s.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(s.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(s.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(s.value));break;case"transparentType":r.setTransparentType(Number(s.value))}}return r};var r,n=(r=_e.default)&&r.__esModule?r:{default:r};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(a)?a:String(a)),n)}var i,a}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(t){return this.objName=t,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(t){return this.brandGoodId=t,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(t){return this.diffuseTexture=t,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(t){return this.diffuseColor=t,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(t){return this.refractColor=t,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(t){return this.transparentType=t,this}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.PopBufferMtl=a})),_m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return mm(e,t),e.prototype.toJSON=function(){return{paramPackages:Cm(this.paramPackages.values()),hardwares:Cm(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(t){var e=Em(t,2);e[0];var r=e[1],n=new qv.a;return Object(Or.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Cm(this.displayInfos.values()),wireFrames:Object(Or.fromPairs)(Cm(this.wireGeometrysMap.entries()).map((function(t){return[t[0],t[1].vertices]})))}},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.unSerialize=function(t){var e=this,r="string"==typeof t?JSON.parse(t):t,n=Object(Or.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(t){var e=new qv.a;if(Object(Or.extend)(e,t),e.meshModels=e.meshModels.map((function(t){var e=t.displayMaterial,r=new zv.a,n=new Eo.a;return Object(Or.extend)(n,t.geometry),r.texture=t.texture,r.displayMaterial=e?Sm.toPopBufferMtl(e):void 0,r.geometry=n,r})),e.furnitureModel){var r=new Gv.FurnitureModel;Object(Or.extend)(r,e.furnitureModel),r.size=new _e.default(r.size),r.position=new _e.default(r.position),r.rotate=new _e.default(r.rotate),r.scale=new _e.default(r.scale),e.furnitureModel=r}return e}))),r.wireFrames&&Object(Or.each)(r.wireFrames,(function(t,r){e.addWireGeometrysMap(r,t)})),this.addCustomResources(n)},e}(Hv.a);!function(t){t[t.willExit=0]="willExit"}(Bm||(Bm={})),function(t){t[t.exit=0]="exit"}(wm||(wm={})),function(t){t[t.personalLibrary=1]="personalLibrary",t[t.enterpriseLibrary=2]="enterpriseLibrary"}(Pm||(Pm={}));var Qm=r(219),Om=r(262),Dm=function(){function t(t){var e=this;this.keyValue={},this.keyEnum={},this.keyExist={},t.values().forEach((function(t){var r=t.name();e.keyEnum[r]=t,e.keyExist[r]=!1})),this.keyType=t}return t.prototype.clear=function(){var t=this;Object.keys(this.keyExist).forEach((function(e){t.keyExist[e]=!1})),this.keyValue={}},t.prototype.delete=function(t){var e=t.name(),r=this.keyExist[e];return r&&(this.keyExist[e]=!1,delete this.keyValue[e]),r},t.prototype.forEach=function(t,e){var r=this;Object.keys(this.keyValue).forEach((function(n){t.call(e,r.keyValue[n],r.keyEnum[n],r)}))},t.prototype.get=function(t){return this.keyValue[t.name()]},t.prototype.has=function(t){return this.keyExist[t.name()]},t.prototype.set=function(t,e){var r=t.name();return this.keyExist[r]=!0,this.keyValue[r]=e,this},t.prototype.keys=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyEnum[e]}))},t.prototype.values=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyValue[e]}))},t.prototype.entries=function(){var t=this,e=[];return Object.keys(this.keyValue).forEach((function(r){e.push([t.keyEnum[r],t.keyValue[r]])})),e},t.prototype.clone=function(){var e=new t(this.keyType);return this.forEach((function(t,r){return e.set(r,t)})),e},t}(),xm=r(369),Mm=r(699),Rm=function(t,e){this.points=t,this.transform=e,this.polygon=new xs.default(t.map((function(t){return new bn.default(e.worldToLocal(t))})))},Tm=function(t,e,r){this.point=t,this.normal=e,this.position=r},jm=r(210),Lm=r(101),km=r(304),Nm=function(t,e){this.point=t,this.offset=e},Fm=function(){function t(t,e,r,n){this.points=[t,e],this.isStart=r,this.isEnd=n,this.lineSegment=new Lm.default(t.point,e.point),this.lengthRange=new jm.default(t.position,e.position)}return t.prototype.intersect=function(t,e){var r=this.lineSegment,n=t.lineSegment,o=Lm.default.estimateLineAndLine(r,n,!1);if(o.status===km.a.JOINT){var i=!0;e?(this.isStart||void 0===o.parameterA||(i=o.parameterA>0),this.isEnd||void 0===o.parameterA||(i=i&&o.parameterA<1),t.isStart||void 0===o.parameterB||(i=i&&o.parameterB>0),t.isEnd||void 0===o.parameterB||(i=i&&o.parameterB<1)):i=o.areSegmentsIntersected(!1);var a=new bn.default;return a.x=this.lengthRange.interpolate(o.parameterA),a.y=t.lengthRange.interpolate(o.parameterB),i?new Nm(o.point,a):void 0}},t}(),Gm=r(538),Um=function(){function t(t){this.lengths=t,this.intersections=[]}return t.prototype.addIntersection=function(t){this.intersections.push(t)},t.prototype.getPoints=function(){return this.intersections.map((function(t){return t.point}))},t.prototype.getPointsInside=function(t){var e,r,n=[];try{for(var o=Object(Ts.k)(this.intersections),i=o.next();!i.done;i=o.next()){var a=i.value;a.offset.x>-t&&a.offset.x<this.lengths.x+t&&a.offset.y>-t&&a.offset.y<this.lengths.y+t&&n.push(a.point)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}();function zm(t,e){void 0===e&&(e=1);var r,n=[];return t.forEach((function(t){void 0!==r&&bn.default.isEqual(t,r,e)||(r=t,n.push(t))})),n[n.length-1]=t[t.length-1],n}var Ym=function(){function t(t){if(this.pointCount=0,t.length<2)throw new Error("Polyline must has more than one valid Point.");this.buildPolyline(zm(t))}return t.prototype.getPoint=function(t){if(0===t)return this.getStart().clone();if(1===t)return this.getEnd().clone();for(var e=t*this.length(),r=this.pointCount-1,n=0;n<this.pointCount;n++)if(this.getPositionAt(n)>=e){r=n;break}if(0===r)return this.getStart().clone();var o=this.getLengthRangeAt(r-1).getParameter(e);return this.getLineSegmentAt(r-1).interpolate(o)},t.prototype.getTangent=function(t){return this.getRightNormal(t).leftDirect()},t.prototype.getRightNormal=function(t){return this.getRightNormalByPosition(t*this.length())},t.prototype.getRightNormalByPosition=function(t){for(var e=1;e<this.pointCount;e++)if(!(this.getPositionAt(e)<=t)){var r=(t-this.getPositionAt(e-1))/(this.getPositionAt(e)-this.getPositionAt(e-1));return bn.default.lerp(this.getNormalAt(e-1),this.getNormalAt(e),r)}return this.getNormalAt(this.pointCount-1).clone()},t.prototype.getNearestPointParameter=function(t){if(this.pointCount<2)return 0;for(var e=Number.MAX_VALUE,r=0,n=0;n<this.pointCount-1;n++){var o=this.getLineSegmentAt(n),i=this.getLengthRangeAt(n),a=o.getNearestPointParameter(t,!0),s=o.interpolate(a),u=t.distanceSquared(s),c=i.interpolate(a);u<e&&(e=u,r=c)}return r/this.length()},t.prototype.getPoints=function(){return this.polylinePoints.map((function(t){return t.point}))},t.prototype.getPointParameters=function(){var t=this.length();return this.getPositions().map((function(e){return e/t}))},t.prototype.getSegmentPoints=function(t){if(!this.length())return this.getPoints();for(var e=jm.default.mul(t,this.length()),r=[this.getPoint(t.min)],n=0;n<this.pointCount&&!(this.getPositionAt(n)>e.max);n++)this.getPositionAt(n)>e.min&&r.push(this.getPointAt(n));return r.push(this.getPoint(t.max)),zm(r)},t.prototype.getPolylineIntersection=function(t,e){var r=new Um(new bn.default(this.length(),t.length()));if(!e&&!this.boundingBox.intersects(t.boundingBox,!0))return r;var n=this.polylineSegments,o=t.polylineSegments;return n.forEach((function(t){return o.forEach((function(n){var o=t.intersect(n,e);o&&r.addIntersection(o)}))})),r},t.prototype.extend=function(e,r){var n=this.getSegmentPoints((new jm.default).setFromPoints([e,r]));if(0!==n.length)return new t(e>r?n.reverse():n)},t.prototype.intersect=function(t,e){return void 0===e&&(e=1),this.boundingBox.intersects(t.boundingBox,!0,2*e)?this.getPolylineIntersection(t,!0).getPointsInside(e):[]},t.prototype.getStart=function(){return this.getPointAt(0)},t.prototype.getEnd=function(){return this.getPointAt(this.pointCount-1)},t.prototype.getEndpoints=function(){return[this.getStart(),this.getEnd()]},t.prototype.length=function(){return 0===this.pointCount?0:this.getPositionAt(this.pointCount-1)},t.prototype.toString=function(){return"Polyline2 {points: "+this.getPoints().map((function(t){return t.toParenString()})).join(",")+", length: "+this.length()},t.prototype.buildPolyline=function(t){this.pointCount=t.length,this.boundingBox=(new Us.default).includePoints(t),this.polylinePoints=[],this.polylineSegments=[];var e=this.pointCount;if(1===e)return this.polylinePoints.push(new Tm(t[0],new bn.default(0,0),0)),void console.warn("Polyline must has more than one valid Point.");for(var r=new bn.default,n=new bn.default,o=0,i=0;i<e;i++){var a=t[i],s=0!==i?t[i-1]:void 0,u=i<e-1?t[i+1]:void 0;s&&(o+=s.distance(a));var c=void 0;!s&&u?c=bn.default.sub(u,a).rightDirect().normalize():!u&&s?c=bn.default.sub(a,s).rightDirect().normalize():s&&u&&(c=bn.default.bisectorCounterClockwise(r.subVectors(s,a),n.subVectors(u,a))),this.polylinePoints.push(new Tm(a,c,o)),s&&this.polylineSegments.push(new Fm(this.polylinePoints[i-1],this.polylinePoints[i],1===i,i===e-1))}},t.prototype.getPositions=function(){return this.polylinePoints.map((function(t){return t.position}))},t.prototype.getPointAt=function(t){return this.polylinePoints[t].point},t.prototype.getNormalAt=function(t){return this.polylinePoints[t].normal},t.prototype.getPositionAt=function(t){return this.polylinePoints[t].position},t.prototype.getLineSegmentAt=function(t){return this.polylineSegments[t].lineSegment},t.prototype.getLengthRangeAt=function(t){return this.polylineSegments[t].lengthRange},t}(),Hm=r(697),Vm=r(703),qm=r(315),Wm=r(286),Km=function(t,e){this.start=t,this.end=e},Jm=function(){function t(t,e){this.points=t,this.lines=e}return t.fromPolyline=function(e,r){void 0===r&&(r=!0);for(var n=[],o=e.length,i=0;i<o;i++)n.push(new Km(i,(i+1)%o));return!1===r&&n.splice(o-1,1),new t(e,n)},t.fromShapeSize=function(e){var r=[new bn.default(0,0),new bn.default(e.x,0),new bn.default(e.x,e.y),new bn.default(0,e.y)];return t.fromPolyline(r,!0)},t}(),Xm=r(688),Zm=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Us.default,Os.default,xm.default,Be.default,Mm.a,we.default,Rm,jm.default,Lm.default,li.a,Gm.default,Pe.default,Ds.a,xs.default,Ms.a,Ym,Hm.a,Vm.a,Se.default,qm.a,Wm.default,Jm,Km,Rs.a,Xm.a,Fs,bn.default,_e.default,ArrayBuffer,or.Vector3,Om.default,Dm,Qh.ParamStore,Tm,Fm,zv.a,Eo.a,Gv.FurnitureModel,Map,or.SkyBackground]:[];Object(Qm.b)({isKnownImmutableInstance:function(t){return Zm.some((function(e){return t instanceof e}))}});Qm.a;var $m=r(345);function tI(t){return(tI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nI(n.key),n)}}function nI(t){var e=function(t,e){if("object"!=tI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tI(e)?e:String(e)}function oI(t,e){return(oI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iI(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sI(t);if(e){var o=sI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aI(this,r)}}function aI(t,e){if(e&&("object"===tI(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sI(t){return(sI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uI,cI=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oI(t,e)}(i,t);var e,r,n,o=iI(i);function i(){var t;return eI(this,i),(t=o.apply(this,arguments)).rootState=new kp,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new Hd(this,this.rootState);t.init(),t.run()}}])&&rI(e.prototype,r),n&&rI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}($m.a);cI.dependencies=[du.a];var AI,lI,fI,hI,pI,dI,gI,yI=function(t){if(!uI)throw new Error("please new Application before call method");return uI.getCustomMiniAppService(t)},vI=r(1399),mI={maxAge:6e5,max:20},II=Symbol("fitting-data"),EI=Symbol("groove-fitting-entity"),CI=Symbol("intersect-data"),bI=Symbol("param-model-hint-entity"),BI=Symbol("fitting-hint-entity"),wI=Symbol("plank-outline-hint-entity"),PI=Symbol("hole-entity"),SI=Symbol("square-groove-entity"),_I=Symbol("round-corner-groove-entity"),QI=Symbol("special-shaped-groove-entity"),OI=Symbol("path-groove-entity"),DI=Symbol("plank-area-face-hint-entity");!function(t){t.FAIL="fail",t.SUCCESS="success",t.LOADING="loading"}(AI||(AI={})),function(t){t[t.READY=0]="READY",t[t.LOADING=1]="LOADING",t[t.FAILED=2]="FAILED",t[t.INVALID=3]="INVALID",t[t.SUCCESS=4]="SUCCESS"}(lI||(lI={})),function(t){t[t.READY=0]="READY",t[t.RUNNING=1]="RUNNING",t[t.FAILED=2]="FAILED",t[t.SUCCESS=3]="SUCCESS"}(fI||(fI={})),function(t){t.SCENE_ID="cp"}(hI||(hI={})),function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(pI||(pI={})),function(t){t.selectBlank="sb",t.renderModeChange="r",t.doorVisibilityChange="d"}(dI||(dI={})),function(t){t.SHADING="0",t.OUTLINE_WITH_SHADING="1",t.TRANSLUCENT="2",t.OUTLINE_AND_TRANSLUCENT="3",t.FULLY_TRANSPARENT="4"}(gI||(gI={}));gI.SHADING,gI.OUTLINE_WITH_SHADING,gI.TRANSLUCENT,gI.OUTLINE_AND_TRANSLUCENT,gI.FULLY_TRANSPARENT;var xI,MI,RI,TI=[Qe.ParamModelType.PARAM_ENTITY,Qe.ParamModelType.PARAM_FURNITURE,Qe.ParamModelType.PARAM_PRIMITIVE],jI={scene3D:Symbol("scene3D")},LI=r(321),kI=r(251),NI=r(557);function FI(t){RI=t}function GI(t){return(GI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var UI=["paramModelData"];function zI(t){return function(t){if(Array.isArray(t))return YI(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return YI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YI(t,e)}(t)||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 YI(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function HI(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function VI(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */VI=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==GI(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(GI(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function qI(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function WI(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qI(i,n,o,a,s,"next",t)}function s(t){qI(i,n,o,a,s,"throw",t)}a(void 0)}))}}function KI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,XI(n.key),n)}}function XI(t){var e=function(t,e){if("object"!=GI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=GI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==GI(e)?e:String(e)}function ZI(t,e){return(ZI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=eE(t);if(e){var o=eE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tE(this,r)}}function tE(t,e){if(e&&("object"===GI(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function eE(t){return(eE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZI(t,e)}(i,t);var e,r,n,o=$I(i);function i(){var t;return KI(this,i),(t=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0},t.lastCurrentCustomDataArgs=[],t.getCurrentBaseDesignInfo=WI(VI().mark((function e(){var r,n;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.state.designInfo)){e.next=3;break}return e.abrupt("return",r);case 3:return n=yI(LI.MiniAppDesignBaseInfoService),e.next=6,n.getDesignBaseInfo();case 6:return r=e.sent,t.state.designInfo=r,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)}))),t.getCurrentCustomData=function(){var e=WI(VI().mark((function e(r){var n,o;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.currentCustomData,r){e.next=3;break}return e.abrupt("return",n);case 3:if(o=Object(Or.castArray)(r),!Object(Or.difference)(o,t.lastCurrentCustomDataArgs).length&&n){e.next=11;break}return e.next=8,GL(r);case 8:n=e.sent,e.next=12;break;case 11:return e.abrupt("return",n);case 12:return t.lastCurrentCustomDataArgs=o,t.state.currentCustomData=n,e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.loadFittingHardwareToSense=function(){var e=WI(VI().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return VI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.length>1&&void 0!==g[1]?g[1]:ge.V1,(o=Object(Or.uniq)(Object(Or.flatten)(Object(Or.map)(r.hardware,(function(t){return t.map((function(t){return t.brandGoodId}))}))))).length){e.next=4;break}return e.abrupt("return");case 4:return i=t.getStateManager().core,a=i.design,s=i.pad,e.next=8,Promise.allSettled(Object(Or.map)(o,function(){var t=WI(VI().mark((function t(e){var r;return VI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ok(e);case 2:return r=t.sent,t.abrupt("return",[e,r]);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 8:return u=e.sent,e.next=11,ik(o);case 11:c=e.sent,A=Object(Or.mapValues)(Object(Or.keyBy)(Object(Or.filter)(u,(function(t){return"fulfilled"===t.status})).map((function(t){return t.value})),(function(t){return t[0]})),(function(t){return t[1]})),l=a.getCustom(),f=[],h={},p=VI().mark((function t(){var e,o,i,a,u,l,p;return VI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.hardware[d],(o=s.findModelOrAssemblyModelById(d))?(i=o.getConcatenatedMatrix(),a=o.getSize(),u=(new Pe.default).makeTranslation(new _e.default(-a.x/2,a.y/2,-a.z/2)),l=n===ge.V2?i.clone():i.clone().multiply(u),p=Object(Or.map)(e,(function(t){var e=A[t.brandGoodId],r=c[t.brandGoodId]||{x:0,y:0,z:0};if(e){var i=e.paramModelData,a=HI(e,UI),s=t.rotate,u=(new gr).parse(i);Object(kI.attach)(u,Object(kI.toAttachedMap)(a)),u.setIsAppendHardware(!0),u.setLinkedIds(t.linkedIds),u.setHardwareData(t),u.setHardwareVersion(n),u.linkParamModelId=o.id;var f=l.clone().multiply((new Pe.default).compose(new _e.default(t.position),new we.default(s.x,s.y,s.z),new _e.default(t.scale)).multiply((new Pe.default).setPosition(new _e.default(r)))),p=Qs.a.decompose(f),d=p.rotation,g=p.position,y=p.scale,v=new _e.default(g);return u.setPosition({x:v.x,y:v.y,z:v.z}),u.setRotation({x:d.x,y:d.y,z:d.z}),u.setScale(y),u.assignUniqueId(),h[t.id]=u.id,u}})).filter((function(t){return!!t})),f.push.apply(f,zI(p))):Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!");case 3:case"end":return t.stop()}}),t)})),e.t0=VI().keys(r.hardware);case 18:if((e.t1=e.t0()).done){e.next=23;break}return d=e.t1.value,e.delegateYield(p(),"t2",21);case 21:e.next=18;break;case 23:if(!f.length){e.next=27;break}return e.next=26,xI.updateAttacheds(f);case 26:l.addParamModels.apply(l,f);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&JI(e.prototype,r),n&&JI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR),nE=r(132),oE=r(80);function iE(t){return(iE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function aE(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=lE(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function sE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sE(Object(r),!0).forEach((function(e){cE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cE(t,e,r){return(e=pE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AE(t){return function(t){if(Array.isArray(t))return fE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||lE(t)||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 lE(t,e){if(t){if("string"==typeof t)return fE(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fE(t,e):void 0}}function fE(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function hE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pE(n.key),n)}}function pE(t){var e=function(t,e){if("object"!=iE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=iE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==iE(e)?e:String(e)}var dE=function(){function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._isRealPath=!1,this._changeMap={},this.faceHint={},this.id=Object(Xr.default)(),this.modelID=e,this.paths=r,r.forEach((function(t){t.plankArea=o})),this.pathMap=n}var e,r,n;return e=t,(r=[{key:"getRealPaths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var r=e.force,n=void 0!==r&&r,o=e.resetCenter,i=void 0===o||o;if(!n&&i&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!n&&!i&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new t(this.modelID,[],new Map);var a=this.getFace2ds();if(this.paths.length>1){var s=[];c.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),c.FacesBoolean.FaceBooleanType.subtract,s),a=s}if(i&&a.length){var u,A={loops:(u=[]).concat.apply(u,AE(a.map((function(t){return t.loops}))))};Object(oE.b)(A);var l=A.box.center,f=c.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(t){t.loops.forEach((function(t){t.forEach((function(t){t.transform(f)}))}))}))}var h=[],p=[],d=new Map;a.forEach((function(t){var e=t.loops[0],r=t.loops.slice(1),n=yE(ye.OUTER,e),o=r.map((function(t){return yE(ye.INNER,t,!0)}));h.push(n),p.push.apply(p,AE(o)),d.set(n,o)}));var g=new t(this.modelID,[].concat(h,p),d);return i?this._realPathsResetCenterCache=g:this._realPathsCache=g,g._isRealPath=!0,g}},{key:"getCenterPoint",value:function(){var t,e,r=this.paths.filter((function(t){return t.type===ye.OUTER}));if(r.length)return(t=r.map(gE),e=new c.BBox2d,t.forEach((function(t){if(t.bcGroups){var r,n=aE(t.bcGroups);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.box=new c.BBox2d;var i,a=aE(o.boundedCurves);try{for(a.s();!(i=a.n()).done;){var s=i.value;o.box.merge(s.getBounding())}}catch(t){a.e(t)}finally{a.f()}e.merge(o.box)}}catch(t){n.e(t)}finally{n.f()}}else{var u,A=aE(t.loops);try{for(A.s();!(u=A.n()).done;){var l,f=aE(u.value);try{for(f.s();!(l=f.n()).done;){var h=l.value;e.merge(h.getBounding())}}catch(t){f.e(t)}finally{f.f()}}}catch(t){A.e(t)}finally{A.f()}}})),e).center}},{key:"getFace2ds",value:function(){return this.paths.map(gE)}},{key:"_trackUpdateField",value:function(t,e,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,o=t.field;e===r||n.some((function(e){return e.field===o&&e.context.id===t.context.id}))||n.push(t)}},{key:"changeMap",get:function(){return this._changeMap},set:function(t){this._changeMap=t}},{key:"getFaceHint",value:function(){return this.faceHint}},{key:"setFaceHint",value:function(t){this.faceHint[t.id]=t}},{key:"removeFaceHint",value:function(t){this.faceHint[t]=void 0}}])&&hE(e.prototype,r),n&&hE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gE(t){var e=[];if(t.lines.forEach((function(t){var r=t.start;r.getType()!==At.NONE&&e.push(r.getCurveLineAndPoints().curveLine),e.push(t.getRealLine())})),t.offset){var r=(0,c.LoopCCW.isPolygonCCW2D)(e.map((function(t){return t.startPoint})))?t.offset:-t.offset;return{loops:c.Path2dOffset.offsetPath2d(e,r).resultPaths}}return{loops:[e]}}function yE(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.map((function(t){return new Tn({type:At.NONE,position:t.startPoint})})),o=e.map((function(t){var e;return e=t instanceof c.LineSeg2d?{type:lt.SEGMENT}:t instanceof c.Arc2d?vE(t):mE(t),new Qn(e)})),i=c.LoopCCW.isPolygonCCW2D(n.map((function(t){return t.getPosition()})));r!==i&&(n=n.reverse(),o=(o=o.reverse().map((function(t){return"boolean"==typeof t.clockwise&&(t.clockwise=!t.clockwise),t}))).slice(1).concat(o[0]));var a=CE(n.map((function(t){return t.getPosition()})));return n=n.slice(a).concat(n.slice(0,a)),o=o.slice(a).concat(o.slice(0,a)),new Hn({type:t,points:n,lines:o,forceCCW:!1})}function vE(t){var e={};e.type=lt.CIRCLE_ARC,e.radius=t.radius,e.clockwise=!t.isCCW;var r=t.center,n=t.startPoint,o=t.endPoint,i=new c.LineSeg2d(n,o),a=i.length/2,s=new c.Vector2d(i.getPoint(a)),u=new c.Vector2d(r).subtracted(s).normalized();return e.clockwise?e.minorArc=u.isSameDirection(i.rightNormal):e.minorArc=u.isSameDirection(i.leftNormal),e}function mE(t){var e={};return e.type=lt.ELLIPSE_ARC,e.majorRadius=t.majorRadius,e.minorRadius=t.minorRadius,e.clockwise=!t.isCCW,e.ellipseCenter=t.ccs.origin,e}var IE=void 0;function EE(t){IE=t;var e=t.changeMap.update;if(e&&e.length>0){var r=t._isRealPath?t.getCenterPoint():null,n=r?c.Matrix3.makeTranslation(-r.x,-r.y):void 0;e.forEach((function(t){var e=t.field,r=t.context;"hint"===e&&((r=r).getHint()?$d(r,n):function(t,e){var r=Vd().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=n.findIndex((function(r){return r.linkModel.id===t&&r.id===e}));if(o>-1){var i=Wd(n);i.splice(o,1),r.setPlankOutlineHintModels(i)}}(r.path.plankArea.modelID,r.id))})),t.changeMap=uE(uE({},t.changeMap),{},{update:[]})}!function(t){var e=t.getFaceHint();e[se.TOP]?tg(e[se.TOP],t):eg(se.TOP,t.id);e[se.BOT]?tg(e[se.BOT],t):eg(se.BOT,t.id)}(t)}function CE(t){if(!t.length)return 0;var e=t[0].y,r=t[0].x;t.slice(1).forEach((function(t){e<t.y&&(e=t.y),r>t.x&&(r=t.x)}));var n,o,i=-r,a=-e;return t.forEach((function(e,r){var s=e.x,u=e.y,c=Math.pow(s+i,2)+Math.pow(u+a,2);void 0===n||c<n?(n=c,o=r):n===c&&t[o].x>e.x&&(o=r)})),o}function bE(t){return(bE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function BE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,PE(n.key),n)}}function PE(t){var e=function(t,e){if("object"!=bE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bE(e)?e:String(e)}function SE(t,e){return(SE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _E(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=OE(t);if(e){var o=OE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return QE(this,r)}}function QE(t,e){if(e&&("object"===bE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OE(t){return(OE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var DE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SE(t,e)}(i,t);var e,r,n,o=_E(i);function i(){var t;return BE(this,i),(t=o.apply(this,arguments)).paramModelConstructor=gr,t}return e=i,(r=[{key:"parseParamModelAssemblies",value:function(t){var e=this;return t.forEach((function(t){var r=(new Pr).parse(t,e,{isRootWorldMatrix:!0});e.addParamModelAssembly(r)})),this}}])&&wE(e.prototype,r),n&&wE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_m);function xE(t){return(xE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ME(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TE(n.key),n)}}function TE(t){var e=function(t,e){if("object"!=xE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xE(e)?e:String(e)}function jE(){return(jE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LE(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function LE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=GE(t)););return t}function kE(t,e){return(kE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function NE(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=GE(t);if(e){var o=GE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FE(this,r)}}function FE(t,e){if(e&&("object"===xE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function GE(t){return(GE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var UE=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kE(t,e)}(i,t);var e,r,n,o=NE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ME(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return DE}},{key:"generate",value:function(t){return t=jE(GE(i.prototype),"generate",this).call(this,t)}}])&&RE(e.prototype,r),n&&RE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qe.CoreParamModelAssemblyBackup);function zE(t){return(zE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function YE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,VE(n.key),n)}}function VE(t){var e=function(t,e){if("object"!=zE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zE(e)?e:String(e)}function qE(){return(qE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=WE(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function WE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ZE(t)););return t}function KE(t,e){return(KE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function JE(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ZE(t);if(e){var o=ZE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return XE(this,r)}}function XE(t,e){if(e&&("object"===zE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ZE(t){return(ZE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&KE(t,e)}(i,t);var e,r,n,o=JE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return YE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return DE}},{key:"generate",value:function(t){return t=qE(ZE(i.prototype),"generate",this).call(this,t)}}])&&HE(e.prototype,r),n&&HE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qe.CoreParamModelBackup),tC=r(332);function eC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new DE;e.parseParamModels(t.paramModels).parseParamModelGroups(t.paramModelGroups).parseParamModelAssemblies(t.paramModelCombinations);var r=e.getParamModelAssemblies(),n=e.getParamModels().filter((function(t){return!t.isAccessory()}));return Object(Or.uniqBy)(tC.ParamModelUtils.collectAccessories(n),"id").forEach((function(t){t.toLocalMatrix()})),{paramModels:n,paramModelAssemblies:r}}var rC=Math.sqrt(2),nC=Math.PI/6,oC=Math.PI/3+Math.PI;function iC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oC,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nC,n=t.getPosition(),o=t.getSize(),i=n.clone(),a=o.length()*rC,s=new _e.default(Math.cos(r)*Math.cos(e),Math.cos(r)*Math.sin(e),Math.sin(r)).mul(a).applyMatrix4(t.getMatrix());return{lookAt:i,position:s}}var aC,sC=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,t,e)}))};function uC(t){var e,r,n,o=function(t){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t.call.apply(t,[this].concat(r))}};return{promise:new Promise((function(i,a){e=o(i),r=o(a),"number"==typeof t&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(t,"ms")))}),t))})),resolve:e,reject:r}}function cC(t){return(cC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function AC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?AC(Object(r),!0).forEach((function(e){fC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fC(t,e,r){var n;return n=function(t,e){if("object"!=cC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==cC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hC(t){return t["@type"]===X.THROUGH_SHELL}function pC(t){var e=t.elements;return(new or.Matrix4).set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function dC(t,e){return _e.default.sub(t,e.clone().mul(_e.default.dot2(t,e)/_e.default.dot2(e,e)))}function gC(t){return(gC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yC(t,e,r){var n;return n=function(t,e){if("object"!=gC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vC(t,e){var r=t.getSize(),n=(new Pe.default).getInverse(t.getConcatenatedMatrix()),o=e.clone().applyMatrix4(pC(n)),i=o.x,a=o.y,s=o.z,u=yC(yC(yC(yC(yC(yC({},aC.TOP,Math.abs(s-r.z/2)),aC.LEFT,Math.abs(i+r.x/2)),aC.BACK,Math.abs(a+r.y/2)),aC.RIGHT,Math.abs(i-r.x/2)),aC.FRONT,Math.abs(a-r.y/2)),aC.BOT,Math.abs(s+r.z/2)),c=Object.entries(u).reduce((function(t,e){return e[1]<t[1]?e:t}));return c[1]<.01?+c[0]:aC.UNKNOWN}function mC(t){if(t instanceof Pr)return t;var e=t.getRoot(),r=e.getAssembly();return r||e}function IC(t){return(IC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function EC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function CC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?EC(Object(r),!0).forEach((function(e){bC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bC(t,e,r){var n;return n=function(t,e){if("object"!=IC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=IC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==IC(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.UNKNOWN=-1]="UNKNOWN",t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.BACK=2]="BACK",t[t.RIGHT=3]="RIGHT",t[t.FRONT=4]="FRONT",t[t.BOT=5]="BOT"}(aC||(aC={}));var BC={getJsonConfig:{defaultTemplateId:void 0,ignoreResetPosition:!1}};function wC(t){return BC[t]}function PC(t){return t<1?{transparent:!0,opacity:t,depthWrite:!1}:{transparent:!1,opacity:t,depthWrite:!0}}function SC(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e&&(t.outlineMode=or.OutlineMode.Disabled),r&&or.TypeAssert.isMesh(t)&&(t.useOriginMaterialInTransparentMode=!0),n&&(t.castPlanarShadow=!1,t.castShadow=!1)}var _C=[];function QC(t){return(QC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var OC,DC=["paramModelData"],xC=["paramModelData"];function MC(t){return function(t){if(Array.isArray(t))return RC(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return RC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RC(t,e)}(t)||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 RC(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function TC(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function jC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TC(i,n,o,a,s,"next",t)}function s(t){TC(i,n,o,a,s,"throw",t)}a(void 0)}))}}function LC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */LC=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==QC(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(QC(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kC(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function NC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,GC(n.key),n)}}function GC(t){var e=function(t,e){if("object"!=QC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=QC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QC(e)?e:String(e)}function UC(t,e){return(UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zC(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=HC(t);if(e){var o=HC(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return YC(this,r)}}function YC(t,e){if(e&&("object"===QC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function HC(t){return(HC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.design="design",t.series="series"}(OC||(OC={}));var VC=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&UC(t,e)}(i,t);var e,r,n,o=zC(i);function i(){var t;return NC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({main:lI.READY,design:lI.READY,series:lI.READY}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionLoad=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o,i,a;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e);case 2:return n=t.sent,o=n.paramModelData,i=kC(n,DC),a=(new gr).parse(o),Object(kI.attach)(a,Object(kI.toAttachedMap)(i)),t.next=9,xI.updateAttacheds([a]);case 9:return r.core.design.getCustom().addParamModels(a),r.core.fittingDesign.setFittings(_C),t.next=13,Object(nE.put)(this.$actionLoad.done.message({params:e,result:lI.SUCCESS}));case 13:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddModelToSense=t.unitCreator.async((function(e){e.started.latest((function(t,e){var r=this,n=t.custom,o=t.needAttach;return LC().mark((function t(){var i,a,s,u;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.getParamModels(),a=n.getParamModelAssemblies(),!o){t.next=5;break}return t.next=5,Promise.all(i.map(function(){var t=jC(LC().mark((function t(e){var r;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(kI.attach)(e,Object(kI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:if(e.core.design.setCustom(n),s=i.filter((function(t){return!t.getAssembly()})),!o){t.next=11;break}return u=[].concat(MC(s),MC(a)),t.next=11,xI.updateAttacheds(u);case 11:return t.next=13,Object(nE.put)(r.$actionAddModelToSense.done.message({params:{custom:n,needAttach:o},result:lI.SUCCESS}));case 13:case"end":return t.stop()}}),t)}))()})),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAutoRefreshModel=t.unitCreator.sync((function(t){})),t.$actionAddParamModelToSense=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.map((function(t){var e=t.paramModelData,r=kC(t,xC),n=(new gr).parse(e,new DE);return Object(kI.attach)(n,Object(kI.toAttachedMap)(r)),n})),t.next=3,xI.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,MC(o)),t.next=6,Object(nE.put)(this.$actionAddParamModelToSense.done.message({params:e,result:lI.SUCCESS}));case 6:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddParamModelAssemblyToSense=t.unitCreator.async((function(e){e.started.latest(LC().mark((function t(e,r){var n,o,i,a;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.design.getCustom(),o=new DE,i=e.map((function(t){return(new Pr).parse(t,o)})),a=o.getParamModels(),t.next=6,Promise.all(a.map(function(){var t=jC(LC().mark((function t(e){var r;return LC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,MI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(kI.attach)(e,Object(kI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:return t.next=8,xI.updateAttacheds(MC(i));case 8:return n.addParamModelAssemblies.apply(n,MC(i)),n.addParamModels.apply(n,MC(a)),t.next=12,Object(nE.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:e,result:lI.SUCCESS}));case 12:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&FC(e.prototype,r),n&&FC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function qC(t){return(qC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JC(n.key),n)}}function KC(t,e,r){return e&&WC(t.prototype,e),r&&WC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function JC(t){var e=function(t,e){if("object"!=qC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qC(e)?e:String(e)}function XC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZC(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$C(t,e)}function $C(t,e){return($C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rb(t);if(e){var o=rb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eb(this,r)}}function eb(t,e){if(e&&("object"===qC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rb(t){return(rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}pu.AXR;var nb=function(t){ZC(r,t);var e=tb(r);function r(){return XC(this,r),e.apply(this,arguments)}return KC(r)}(pu.AXRPartial),ob=(pu.AXRManager,r(155));function ib(t){return(ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ab(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ab=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ib(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ib(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function sb(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function ub(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sb(i,n,o,a,s,"next",t)}function s(t){sb(i,n,o,a,s,"throw",t)}a(void 0)}))}}var cb=function(){var t=ub(ab().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f;return ab().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_(),n=r.baseDesignInfo,t.next=3,n.getCurrentBaseDesignInfo();case 3:return o=t.sent,i=o.designId,a=o.levelid,s={modelid:null!=e?e:"",designid:i,levelid:a,toolType:0},u=n.getStateManager().core.design.getCustom(),e||((c=u.getParamModelAssemblies()).length?s.modelid=c[0].id:(A=u.getParamModels().filter((function(t){return!t.isAppendHardware}))).length&&(s.modelid=A[0].id)),t.next=11,n.getCurrentCustomData(null!=e?e:s.modelid);case 11:return l=t.sent,f=l.toolType,s.toolType=f,t.abrupt("return",s);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ab=function(t){var e=Vd().getStateManager().pad,r=V_().viewParamModel.state.state.currModelId,n=e.findModelOrAssemblyModelById(t);if(n){var o=n.getIdPath(),i=n.getRoot();if(i instanceof gr){var a=i.getAssembly();a&&o.unshift(a.id)}return o.includes(r)?n:void 0}},lb=function(t){var e,r;if(t instanceof Pr)return t.getInvisible();for(;t;){if(t.getInvisible())return!0;r=t,t=t.getParent()}return(null===(e=null==r?void 0:r.getAssembly())||void 0===e?void 0:e.getInvisible())||!1},fb=function(){var t=ub(ab().mark((function t(e){var r,n,o,i,a;return ab().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_(),n=r.scene,o=n.getStateManager(),i=o.scene3D,a=uC(5e3),i.once(ob.h.CameraUpdate.symbol,(function(){return a.resolve()})),i.updateCameraAttributes(e),t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function hb(t){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function db(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pb(Object(r),!0).forEach((function(e){gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gb(t,e,r){return(e=Cb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yb(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vb(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yb(i,n,o,a,s,"next",t)}function s(t){yb(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mb=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==hb(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(hb(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Ib(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cb(n.key),n)}}function Cb(t){var e=function(t,e){if("object"!=hb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hb(e)?e:String(e)}function bb(){return(bb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Bb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Bb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_b(t)););return t}function wb(t,e){return(wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_b(t);if(e){var o=_b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sb(this,r)}}function Sb(t,e){if(e&&("object"===hb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _b(t){return(_b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qb(t){return function(t){if(Array.isArray(t))return Ob(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ob(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(t,e)}(t)||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 Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Db={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function xb(t){return Object(Or.values)(t).some((function(t){return Object(Or.isEmpty)(t)}))}function Mb(t,e){var r=t.getParamModelAssemblies().find((function(t){return t.id===e}));if(r||(r=t.getParamModels().find((function(t){return t.id===e}))),!r)return[];for(var n=[],o=[r];o.length;){var i=o.shift();n.push(i.id),o.push.apply(o,Qb(i.getChildNodes()))}return n}function Rb(t){return Object(Or.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(e){return Object(Or.keys)(t[e]).sort()})).flat())}function Tb(t,e){var r=new Set(e);return t.filter((function(t){return!r.has(t)}))}var jb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wb(t,e)}(i,t);var e,r,n,o=Pb(i);function i(){var t;return Ib(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({autoSave:!0,designLoading:AI.FAIL,design:Object(Or.cloneDeep)(Db)}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(mb().mark((function t(e,r){var n,o,i,a,s,u,c,A;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.done.messageType(),i=this.$actionRestoreFittingDesign.messageType(),a=n.$actionAutoRefreshModel.messageType(),t.next=7,Object(nE.take)([o,i,a]);case 7:s=r.core,u=s.fittingDesign,c=s.design,u.setFittings([]),u.setGrooveFittings([]),c.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V1&&t.dispose()})),A=this.state.state.design,this.fittingAddDataToFittingDesignSense(A),this.getAxr(rE).loadFittingHardwareToSense({hardware:A.hardwares}),t.next=1;break;case 17:case"end":return t.stop()}}),t,this)})))})),t.$actionEnableAutoSave=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.autoSave=e}))})),t.initFittingDesign=function(){t.$actionRestoreFittingDesign.dispatch(Object(Or.cloneDeep)(Db))},t.getConnectedFittingDesign=function(){var e=vb(mb().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h=arguments;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],o=t.state.state.design,r){e.next=4;break}return e.abrupt("return",Object(Or.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){e.next=26;break}a=o.hardwares||{},e.t0=mb().keys(a);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(c=e.t1.value,!a.hasOwnProperty(c)){e.next=16;break}if(!(A=Object(Or.find)(a[c]||[],(function(t){return t.id===r})))){e.next=16;break}return u=c,s=A,e.abrupt("break",18);case 16:e.next=8;break;case 18:if(s&&u){e.next=20;break}throw new Error("当前五金不存在!");case 20:l=s.linkedIds,f=function(t){return l.includes(t.id)},i.holes[u]=Object(Or.filter)(o.holes[u],f),i.grooves[u]=Object(Or.filter)(o.grooves[u],f),e.next=27;break;case 26:Object(Or.keys)(i).forEach((function(t){o[t]&&o[t][r]&&(i[t][r]=Object(Or.cloneDeep)(o[t][r]))}));case 27:return e.abrupt("return",i);case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.fittingAddDataToFittingDesignSense=function(){var e=vb(mb().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sC(1);case 2:n=t.stateManager.core,o=n.fittingDesign,i=n.pad,a=V_().fittingDesign.senseSetting.getSenseSettings(),s=Object(Or.pick)(a,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,A=r.grooves,l=void 0===A?{}:A,f=r.hardwareGrooves,h=void 0===f?{}:f,p={findRelativeModel:i.findModelOrAssemblyModelById,transformModel:Ps},o.setFittings([].concat(Qb(Zd(c,db(db({},p),{},{type:J.HOLE,defaultConfig:s}))),Qb(Zd(l,db(db({},p),{},{type:J.GROOVE,defaultConfig:s}))))),o.setGrooveFittings(Zd(h,db(db({},p),{},{type:J.HARDWARE_GROOVE,transformModel:hu,defaultConfig:s})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.appendFittingDataToFittingDesign=function(){var e=vb(mb().mark((function e(r,n){var o,i,a,s,u,c,A,l,f,h,p;return mb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.state.state,a=i.design,s=i.autoSave,u=!r.id||r.id===a.id,c=Db,A=n.timeout,l=n.save,f=void 0===l?s:l,h={id:null!==(o=r.id)&&void 0!==o?o:a.id,holes:db(db({},u?a.holes:c.holes),r.holes||{}),grooves:db(db({},u?a.grooves:c.grooves),r.grooves||{}),hardwares:db(db({},u?a.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:db(db({},u?a.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Or.pull)(Object(Or.keys)(h),"id").forEach((function(t){var e=h[t];Object(Or.keys)(e).forEach((function(t){0===e[t].length&&delete e[t]}))})),!f){e.next=12;break}return p=uC(A),t.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),e.abrupt("return",p.promise);case 12:t.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.$actionRestoreFittingDesign=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.design=e}))})),t.$actionLoadFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s=this;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$actionLoadFittingDesign,o=e.params,t.next=4,cb(o.modelid);case 4:return i=t.sent,t.prev=5,t.next=8,DL(db(db({},o),i));case 8:a=t.sent,pu.Util.safeExec((function(){var t=r.core.design.getCustom(),n=s.getAxr($w).state.state.currModelId;if(n===e.params.modelid&&a){var o=Mb(t,n),i=Rb(a),u=Tb(i,o);yI(sm).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:i.join(","),notExistsIds:u.join(","),notExistsIdsCount:!!u.length})}})),n.done.dispatch({params:e,result:{designData:a,modelId:i.modelid}}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(5),n.failed.dispatch({params:e});case 16:case"end":return t.stop()}}),t,this,[[5,13]])}))),t.done.every((function(t,e){var r=this.$actionRestoreFittingDesign,n=t.result.designData?t.result.designData:Object(Or.cloneDeep)(Db),o=this.getAxr($w).state.state.currModelId;t.result.modelId===o&&r.dispatch(n);var i=t.params.defer;i&&i.resolve(t.result.designData)})),t.failed.every((function(t,e){var r,n=this.getAxr($w).state.state.currModelId;(null===(r=t.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var o=t.params.defer;o&&o.reject(new Error("load fitting design error"))}))})),t.$actionClearFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr($w).state.state.currModelId,o=e.modelId,i=void 0===o?n:o,t.next=4,cb(i);case 4:return a=t.sent,s=this.$actionClearFittingDesign,t.prev=6,t.next=9,jL(a);case 9:s.done.dispatch({params:e,result:void 0}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),s.failed.dispatch({params:e});case 15:case"end":return t.stop()}}),t,this,[[6,12]])}))),t.done.every(mb().mark((function t(e,r){var n,o,i;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=this.getAxr($w).state.state.currModelId,(null!==(n=e.params.modelId)&&void 0!==n?n:o)===o&&this.initFittingDesign(),(i=e.params.defer)&&i.resolve();case 5:case"end":return t.stop()}}),t,this)}))),t.failed.every(mb().mark((function t(e,r){var n;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return t.stop()}}),t)})))})),t.$actionSaveFittingDesign=t.unitCreator.async((function(t){t.started.every(mb().mark((function t(e,r){var n,o,i,a,s,u=this;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.state.state.design,o=e.design,i=void 0===o?n:o,t.next=4,cb(i.id);case 4:return a=t.sent,s=this.$actionSaveFittingDesign,pu.Util.safeExec((function(){var t=yI(sm),e=u.getAxr($w).state.state.currModelId,o=r.core.design.getCustom();if(i&&(!i.id||e===a.modelid)){var s=Mb(o,e),c=Rb(i),A=Tb(c,s);xb(Object(Or.omit)(n,["id"]))?t.log({logKey:"FittingDesignCreate",modelId:a.modelid,allModelIds:s.join(","),fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length}):t.log({logKey:"FittingDesignUpdate",modelId:a.modelid,fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length})}})),t.prev=7,t.next=10,TL(db(db({},i),{},{id:a.modelid}),a);case 10:s.done.dispatch({params:e,result:void 0}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(7),s.failed.dispatch({params:e,result:t.t0});case 16:case"end":return t.stop()}}),t,this,[[7,13]])}))),t.failed.every(mb().mark((function t(e,r){var n,o;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&(o=e.result||new Error("保存失败"),n.reject(o));case 2:case"end":return t.stop()}}),t)}))),t.done.every(mb().mark((function t(e,r){var n,o,i;return mb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.params.design,o=this.getAxr($w).state.state.currModelId,!n||n.id&&n.id!==o||this.$actionRestoreFittingDesign.dispatch(n),(i=e.params.defer)&&setTimeout((function(){i.resolve()}));case 5:case"end":return t.stop()}}),t,this)})))})),t}return e=i,(r=[{key:"init",value:function(){bb(_b(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Eb(e.prototype,r),n&&Eb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function Lb(t){return(Lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kb(t){return function(t){if(Array.isArray(t))return Nb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(t,e)}(t)||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 Nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Fb=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Lb(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lb(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ub(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zb(n.key),n)}}function zb(t){var e=function(t,e){if("object"!=Lb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Lb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Lb(e)?e:String(e)}function Yb(){return(Yb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Hb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Hb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kb(t)););return t}function Vb(t,e){return(Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kb(t);if(e){var o=Kb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wb(this,r)}}function Wb(t,e){if(e&&("object"===Lb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kb(t){return(Kb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vb(t,e)}(i,t);var e,r,n,o=qb(i);function i(){var t;return Gb(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshFittingHint=t.unitCreator.sync((function(t){t.latest(Fb().mark((function t(){var e,r;return Fb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateFittingHintConf=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){Yb(Kb(i.prototype),"init",this).call(this),this.$actionRefreshFittingHint.dispatch()}},{key:"setFittingHint",value:function(t){this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"clearFittingHint",value:function(t){var e=t?Object(Or.omit)(this.state.state.option,t):{};this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"setFittingHardwareHint",value:function(t){var e=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),r=Object(Or.fromPairs)(e.map((function(t){return t.hardwareData?[t.hardwareData.id,t.id]:[]})).filter((function(t){return 2===t.length})));V_().scene.$actionModelHint.dispatch(Object(Or.mapKeys)(t,(function(t,e){return r[e]||""})))}},{key:"clearFittingHardwareHint",value:function(t){t||V_().scene.$actionModelHint.dispatch({});var e=Object(Or.castArray)(t),r=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),n=Object(Or.fromPairs)(r.map((function(t){return t.hardwareData?[t.id,t.hardwareData.id]:[]})).filter((function(t){return 2===t.length}))),o=V_().scene.state.state.overrideMaterialOption;V_().scene.$actionModelHint.dispatch(Object(Or.omitBy)(o,(function(t,r){var o=n[r];return!!o&&e.includes(o)})))}},{key:"rerenderToSense",value:function(){var t=this.state.state.option,e=this.stateManager.core,r=e.design,n=e.fittingDesign,o=r.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),i=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getArcSquareGrooveModels(),A=n.getRoundCornerGrooveModels(),l=n.getSpecialShapedGrooveModels(),f=n.getPathGrooveModels(),h=Object(Or.map)(t,(function(t,e){var r=[].concat(kb(o),kb(i),kb(a),kb(s),kb(u),kb(A),kb(l),kb(f),kb(c)).find((function(t){return t.id===e}));if(r)return new un({linkModel:r,hintOutline:t.outline})})).filter((function(t){return!!t}));n.setFittingHintModels(h)}}])&&Ub(e.prototype,r),n&&Ub(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function Xb(t){return(Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$b(n.key),n)}}function $b(t){var e=function(t,e){if("object"!=Xb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xb(e)?e:String(e)}var tB=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.__changeMap={}}var e,r,n;return e=t,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({field:"isHidden"},this.isHidden,t),this.isHidden=t}},{key:"__trackUpdateField",value:function(t,e,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,o=t.field;e===r||n.some((function(t){return t.field===o}))||n.push({field:o})}}])&&Zb(e.prototype,r),n&&Zb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function eB(t){var e,r=new tB;if(r.id=t.id,t instanceof gr){if(!t.isAppendHardware)return;e=J.HARDWARE,r.isHidden=t.getInvisible(),r.originalData=t.hardwareData}else t instanceof Cn||t instanceof mo?(r.isHidden=!t.visible,e=t.type,r.originalData=t.fittingData):(r.isHidden=!t.visible,e=t.type,r.originalData=t.data);return r.linkParamModelId=t.linkParamModelId,r.modelType=e,r}function rB(t){return(rB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nB(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=iB(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function oB(t){return function(t){if(Array.isArray(t))return aB(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||iB(t)||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 iB(t,e){if(t){if("string"==typeof t)return aB(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?aB(t,e):void 0}}function aB(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cB(n.key),n)}}function cB(t){var e=function(t,e){if("object"!=rB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rB(e)?e:String(e)}function AB(t,e){return(AB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hB(t);if(e){var o=hB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fB(this,r)}}function fB(t,e){if(e&&("object"===rB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hB(t){return(hB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pB=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&AB(t,e)}(i,t);var e,r,n,o=lB(i);function i(){return sB(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAllFittingModels",value:function(t){var e=new Set;if(t){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(t);if(!r)return[];for(var n=[r];n.length;){var o=n.shift();e.add(o.id),n.push.apply(n,oB((null==o?void 0:o.getChildNodes())||[]))}}var i=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),a=this.stateManager.core.fittingDesign.getFittings(),s=this.stateManager.core.fittingDesign.getGrooveFittings(),u=this.stateManager.core.fittingDesign.getHoleModels(),c=this.stateManager.core.fittingDesign.getSquareGrooveModels(),A=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),l=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),f=this.stateManager.core.fittingDesign.getPathGrooveModels(),h=[].concat(oB(i),oB(a),oB(s),oB(u),oB(c),oB(A),oB(l),oB(f));return e.size>0&&(h=h.filter((function(t){return e.has(t.linkParamModelId)}))),h.map((function(t){return eB(t)}))}},{key:"findHardwareParamModels",value:function(t){var e,r=[],n=nB(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.isAppendHardware&&r.push(o),r.push.apply(r,oB(this.findHardwareParamModels(o.getChildNodes())))}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"save",value:function(t){var e,r=[],n=[],o=nB(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;i.modelType===J.HARDWARE?r.push(i):n.push(i)}}catch(t){o.e(t)}finally{o.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(t){var e=this.stateManager.core.pad;t.forEach((function(t){var r=e.findModelOrAssemblyModelById(t.id);if(r){var n=t.__changeMap.update;(void 0===n?[]:n).forEach((function(e){"isHidden"===e.field&&r.setInvisible(t.getHidden())})),t.__changeMap.update=[]}})),dL().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(t){var e=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getHoleModels(),o=this.stateManager.core.fittingDesign.getSquareGrooveModels(),i=this.stateManager.core.fittingDesign.getArcSquareGrooveModels(),a=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),s=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),u=this.stateManager.core.fittingDesign.getPathGrooveModels(),c=this.stateManager.core.fittingDesign.getFittingHintModels();t.forEach((function(t){var A;t.modelType===J.HARDWARE_GROOVE?A=r.find((function(e){return e.id===t.id})):t.modelType===J.HOLE||t.modelType===J.GROOVE?A=e.find((function(e){return e.id===t.id})):t.modelType===J.HOLE_V2?A=n.find((function(e){return e.id===t.id})):t.modelType===J.SQUARE_GROOVE?A=[].concat(oB(o),oB(i)).find((function(e){return e.id===t.id})):t.modelType===J.ROUND_CORNER_GROOVE?A=a.find((function(e){return e.id===t.id})):t.modelType===J.SPECIAL_SHAPED_GROOVE?A=s.find((function(e){return e.id===t.id})):t.modelType===J.PATH_GROOVE&&(A=u.find((function(e){return e.id===t.id})));var l=c.find((function(e){return e.linkModel.id===t.id}));if(A){var f=t.__changeMap.update;(void 0===f?[]:f).forEach((function(e){"isHidden"===e.field&&(null==A||A.setVisible(!t.getHidden()),null==l||l.setVisible(!t.getHidden()))})),t.__changeMap.update=[]}}))}}])&&uB(e.prototype,r),n&&uB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function dB(t){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var gB=["holes","grooves"];function yB(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vB(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yB(i,n,o,a,s,"next",t)}function s(t){yB(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mB(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function IB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mB(Object(r),!0).forEach((function(e){EB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function EB(t,e,r){return(e=_B(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function bB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bB=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==dB(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(dB(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function BB(t){return function(t){if(Array.isArray(t))return wB(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return wB(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wB(t,e)}(t)||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 wB(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function PB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_B(n.key),n)}}function _B(t){var e=function(t,e){if("object"!=dB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dB(e)?e:String(e)}function QB(){return(QB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=OB(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function OB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=RB(t)););return t}function DB(t,e){return(DB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function xB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=RB(t);if(e){var o=RB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return MB(this,r)}}function MB(t,e){if(e&&("object"===dB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function RB(t){return(RB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var TB=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&DB(t,e)}(a,t);var e,r,n,o,i=xB(a);function a(){var t;return PB(this,a),(t=i.apply(this,arguments)).state=t.stateCreator.create({fittings:[],hardwares:[]}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionAddFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.fittings=[].concat(BB(t.fittings),[e])}))})),t.$actionClearFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.fittings=[]}))})),t.$actionAddHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.hardwares=[].concat(BB(t.hardwares),[e])}))})),t.$actionClearHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.hardwares=[]}))})),t.$actionViewerInit=t.unitCreator.sync((function(t){t.latest(bB().mark((function t(e,r){var n,o;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(nE.take)([o]);case 5:this.clearHardware(),this.clearFitting(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshFittingViewer=t.unitCreator.sync((function(t){t.latest(bB().mark((function t(){var e,r,n,o,i=this;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:n=this.state.state.hardwares,o=this.state.state.fittings,this.clearHardware(),this.clearFitting(),o.forEach((function(t){return i.addFitting(t)})),n.forEach((function(t){return i.addHardware(t)})),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.addFitting=function(e){var r,n,o=Object(Or.cloneDeep)(e);return null===(r=o.holes)||void 0===r||r.forEach((function(t){Object(Or.isNil)(t.holeId)&&(t.holeId=Object(Xr.default)())})),null===(n=o.grooves)||void 0===n||n.forEach((function(t){Object(Or.isNil)(t.grooveId)&&(t.grooveId=Object(Xr.default)())})),t.addDataToFittingViewer(o),t.$actionAddFitting.dispatch(o),o},t.clearFitting=function(){var e=t.stateManager.core.fittingDesign;e.setHoleModels([]),e.setSquareGrooveModels([]),e.setArcSquareGrooveModels([]),e.setRoundCornerGrooveModels([]),e.setSpecialShapedGrooveModels([]),e.setPathGrooveModels([]),t.$actionClearFitting.dispatch()},t.getFitting=function(e){var r=t.state.state.fittings,n=Object(Or.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.getHardware=function(e){var r=t.state.state.hardwares,n=Object(Or.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.addDataToFittingViewer=function(e){var r,n,o,i,a,s,u,c,A,l,h,p=t.stateManager.core.fittingDesign,d=V_().fittingDesign.senseSetting.getSenseSettings(),g=Object(Or.pick)(d,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),y={findRelativeModel:Ab},v=e.holes,m=e.grooves,I=CB(e,gB),E=!!e.finishedProfile&&!Object(Or.isNil)(e.arcPlane);if(v&&(s=v.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:rg}),{color:g.holeColor,opacity:g.holeOpacity})}))),m){var C=Object(Or.groupBy)(m,"geometryType");E?c=null===(r=C[f.SQUARE])||void 0===r?void 0:r.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:hg}),{color:g.grooveColor,opacity:g.grooveOpacity})})):u=null===(n=C[f.SQUARE])||void 0===n?void 0:n.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:Wi}),{color:g.grooveColor,opacity:g.grooveOpacity})})),A=null===(o=C[f.ROUND_CORNER])||void 0===o?void 0:o.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:ng}),{color:g.grooveColor,opacity:g.grooveOpacity})})),l=null===(i=C[f.SPECIAL_SHAPED])||void 0===i?void 0:i.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:og}),{color:g.grooveColor,opacity:g.grooveOpacity})})),h=null===(a=C[f.PATH])||void 0===a?void 0:a.map((function(t){return fg(IB(IB({},I),t),IB(IB({},y),{},{transformModel:ig}),{color:g.grooveColor,opacity:g.grooveOpacity})}))}s&&s.length>0&&p.addHoleModels(s),u&&u.length>0&&p.addSquareGrooveModels(u),c&&c.length>0&&p.addArcSquareGrooveModels(c),A&&A.length>0&&p.addRoundCornerGrooveModels(A),l&&l.length>0&&p.addSpecialShapedGrooveModels(l),h&&h.length>0&&p.addPathGrooveModels(h)},t.addHardwareToViewer=function(){var e=vB(bB().mark((function e(r){var n,o,i,a;return bB().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.modelId,o=r.hardwares,i=Ab(n)){e.next=4;break}throw new Error("".concat(n," 关联的模型不存在"));case 4:return a=Ag(i),e.next=7,t.getAxr(rE).loadFittingHardwareToSense({hardware:EB({},a.id,o)},ge.V2);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=a,(r=[{key:"init",value:function(){QB(RB(a.prototype),"init",this).call(this),this.$actionViewerInit.dispatch(),this.$actionRefreshFittingViewer.dispatch()}},{key:"initFittingViewer",value:function(){this.clearHardware(),this.clearFitting()}},{key:"addHardware",value:(o=vB(bB().mark((function t(e){var r,n;return bB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(Or.cloneDeep)(e),null===(r=n.hardwares)||void 0===r||r.forEach((function(t){Object(Or.isNil)(t.id)&&(t.id=Object(Xr.default)())})),t.next=4,this.addHardwareToViewer(n);case 4:return this.$actionAddHardware.dispatch(n),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"clearHardware",value:function(){this.stateManager.core.design.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V2&&t.dispose()})),this.$actionClearHardware.dispatch()}}])&&SB(e.prototype,r),n&&SB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(nb);function jB(t){return(jB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var LB=["modelId","defer"],kB=["timeout","modelId"];function NB(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FB(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function GB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?FB(Object(r),!0).forEach((function(e){UB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function UB(t,e,r){return(e=qB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function YB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */YB=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==jB(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(jB(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function HB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qB(n.key),n)}}function qB(t){var e=function(t,e){if("object"!=jB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jB(e)?e:String(e)}function WB(){return(WB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=KB(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function KB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$B(t)););return t}function JB(t,e){return(JB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function XB(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$B(t);if(e){var o=$B(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ZB(this,r)}}function ZB(t,e){if(e&&("object"===jB(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $B(t){return($B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JB(t,e)}(s,t);var e,r,n,o,i,a=XB(s);function s(){var t;return HB(this,s),(t=a.apply(this,arguments)).state=t.stateCreator.create({intersectedLoading:AI.FAIL,intersectedResult:void 0,intersectedVisible:!1}),t.$reducerState=t.reducerCreator.create(t.state),t._getParamModelIntersectedCallback=[],t.$actionRefreshIntersect=t.unitCreator.sync((function(t){t.latest(YB().mark((function t(){var e,r,n;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:(n=this.state.state.intersectedResult)&&this.$actionAddIntersectedDataToSense.dispatch(n),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionLoadParamModelIntersectedData=t.unitCreator.async((function(e){e.started.every(YB().mark((function t(e,r){var n,o,i,a,s,u,c,A,l;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,cb(e.modelId);case 2:return n=t.sent,o=yI(rm),i=e.modelId,a=void 0===i?n.modelid:i,s=e.defer,u=zB(e,LB),c=V_().viewParamModel.state.state.currModelId===a,A=this.$actionLoadParamModelIntersectedData,t.prev=7,t.next=10,o.getIntersectedById(GB({modelId:a},u));case 10:if(l=t.sent,!c){t.next=14;break}return t.next=14,A.done.dispatch({params:e,result:{result:l,modelId:a}});case 14:s&&s.resolve(l),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(7),this._getParamModelIntersectedCallback.forEach((function(e){e.reject(t.t0)}));case 21:case"end":return t.stop()}}),t,this,[[7,17]])}))),e.done.every((function(e,r){var n=e.params.defer,o=V_().viewParamModel.state.state.currModelId;n&&n.resolve(e.result.result),e.result.modelId===o&&t.$actionAddIntersectedDataToSense.dispatch(e.result.result)})),e.started.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.LOADING})),e.done.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.SUCCESS,t.intersectedResult=e.result.result})),e.failed.produce(t.$reducerState,(function(t,e){t.intersectedLoading=AI.FAIL}))})),t.$actionAddIntersectedDataToSense=t.unitCreator.sync((function(e){e.every((function(e,r){var n=r.core,o=n.fittingDesign,i=n.pad,a=t.state.state.intersectedVisible,s=t.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),u=s.intersectedColor,c=s.intersectedBodyColor,A=s.intersectedThroughColor,l=s.grooveIntersectedColor,f=s.grooveIntersectedBodyColor;o.setIntersects([]);var h=e.option,p=void 0===h?{}:h,d=e.intersectedGroups,g=Object(Or.map)(d,(function(t){var e=!0===p.references?1:0,r=t.intersecteds[e],n=r["@type"],o=t.intersectType;if(void 0!==p.plankFaceIds){var a=hC(r)||Object(Or.isNil)(r.plankFaceId)?null:r.plankFaceId;if(!p.plankFaceIds.includes(a))return!1}var s=i.findModelOrAssemblyModelById(r.linkedModelId);if(s){var h=Ks(t,r,s),d=new Map([[$.BOTH_PLANK,new Map([[X.FACE,u],[X.SHELL,c],[X.THROUGH_SHELL,A]])],[$.PLANK_FURNITURE,new Map([[X.FACE,l],[X.SHELL,f]])]]).get(o).get(n);return h.setViewColor(d),h}})).filter((function(t){return!!t}));o.setIntersects(g),a||r.kaf.invisibleManager.hide("scene3d",CI,g.map((function(t){return t.id})))}))})),t.$actionToggleShowIntersected=t.unitCreator.sync((function(e){e.latest((function(t,e){var r=e.core.fittingDesign;t?e.kaf.invisibleManager.display("scene3d",CI,r.getIntersects().map((function(t){return t.id}))):e.kaf.invisibleManager.hide("scene3d",CI,r.getIntersects().map((function(t){return t.id})))})),e.produce(t.$reducerState,(function(t,e){t.intersectedVisible=e}))})),t.toggleShowIntersectGroupData=function(e){var r=t.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");t.$actionAddIntersectedDataToSense.dispatch(GB(GB({},r),{},{option:e}))},t}return e=s,(r=[{key:"init",value:function(){WB($B(s.prototype),"init",this).call(this),this.$actionRefreshIntersect.dispatch()}},{key:"getParamModelIntersectedData",value:(o=YB().mark((function t(e){var r,n,o,i,a,s,u,c,A,l=this;return YB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=V_().viewParamModel.state.state.currModelId,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r:a,u=zB(n,kB),c=uC(i),this.$actionLoadParamModelIntersectedData.started.dispatch(GB(GB({modelId:s},u),{},{defer:c,timeout:i})),this._getParamModelIntersectedCallback.push(c),A=function(){var t=l._getParamModelIntersectedCallback.indexOf(c);l._getParamModelIntersectedCallback.splice(t,1)},t.abrupt("return",c.promise.then((function(t){return A(),t})).catch((function(t){return A(),Promise.reject(t)})));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){NB(i,r,n,a,s,"next",t)}function s(t){NB(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&VB(e.prototype,r),n&&VB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(nb);function ew(t){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rw(Object(r),!0).forEach((function(e){ow(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ow(t,e,r){var n;return n=function(t,e){if("object"!=ew(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ew(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ew(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iw(t,e){var r=e.x,n=e.y,o=e.z;[0,5].includes(t)&&(r-=.1,n-=.1),[1,3].includes(t)&&(o-=.1,r-=.1),[2,4].includes(t)&&(o-=.1,n-=.1);var i=r/2,a=n/2,s=o/2,u=[{x:-i,y:-a,z:s},{x:i,y:-a,z:s},{x:i,y:a,z:s},{x:-i,y:a,z:s}],c=u.map((function(t){return nw(nw({},t),{},{z:-t.z})}));switch(t){case 0:return u;case 1:return[u[0],c[0],c[3],u[3]];case 2:return[u[0],c[0],c[1],u[1]];case 3:return[u[1],c[1],c[2],u[2]];case 4:return[u[2],c[2],c[3],u[3]];case 5:return c}return[]}function aw(t){return(aw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sw=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==aw(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(aw(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aw(n.key),n)}}function Aw(t){var e=function(t,e){if("object"!=aw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aw(e)?e:String(e)}function lw(){return(lw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=fw(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function fw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gw(t)););return t}function hw(t,e){return(hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gw(t);if(e){var o=gw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dw(this,r)}}function dw(t,e){if(e&&("object"===aw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gw(t){return(gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yw={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},vw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hw(t,e)}(i,t);var e,r,n,o=pw(i);function i(){var t;return uw(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{},defaultConfig:yw}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshPlankFaceHint=t.unitCreator.sync((function(t){t.latest(sw().mark((function t(){var e,r;return sw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateDefaultOption=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.defaultConfig=Object(Or.extend)({},t.defaultConfig,e)}))})),t.$actionUpdateHintOption=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){lw(gw(i.prototype),"init",this).call(this),this.$actionRefreshPlankFaceHint.dispatch()}},{key:"setDefaultHintConfig",value:function(t){this.$actionUpdateDefaultOption.dispatch(t)}},{key:"setModelHint",value:function(t){var e=this,r=Object(Or.mapValues)(t,(function(t){return function(t,e){var r={};return Object(Or.isObject)(t.hintOutline)?r.hintOutline=t.hintOutline:!0===t.hintOutline&&(r.hintOutline=e.outline),t.hintPlankFace&&t.hintPlankFace.length&&(r.hintPlankFace=t.hintPlankFace.map((function(t){var r="color"in t?t:e.plankFace,n=r.color,o=r.opacity;return Object(Or.isArray)(t.plankFaceId)?t.plankFaceId.map((function(t){return{color:n,opacity:o,plankFaceId:t}})):{plankFaceId:t.plankFaceId,color:n,opacity:o}})).flat()),r}(t,e.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(t){var e=t?Object(Or.omit)(this.state.state.option,t):{};this.setModelHint(e)}},{key:"rerenderToSense",value:function(){var t=this.stateManager.core,e=t.fittingDesign,r=t.pad,n=this.state.state.option,o=Object(Or.map)(n,(function(t,e){var n=r.findModelOrAssemblyModelById(e);if(n)return function(t,e){var r={linkModel:e};if(t.hintPlankFace&&t.hintPlankFace.length){var n=e.getSize();r.plankFaces=t.hintPlankFace.map((function(t){var e=zi(t.plankFaceId,_e.default).mul(.1),r=iw(t.plankFaceId,n).map((function(t){var r=new _e.default(t).add(e);return{x:r.x,y:r.y,z:r.z}}));return nw(nw({},t),{},{points:r})}))}if(t.hintOutline&&(r.hintOutline=t.hintOutline),r.plankFaces||r.hintOutline)return new ti(r)}(t,n)})).filter((function(t){return!!t}));e.setPlankFaceHintModels(o)}}])&&cw(e.prototype,r),n&&cw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function mw(t){return(mw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Iw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ew(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cw(n.key),n)}}function Cw(t){var e=function(t,e){if("object"!=mw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mw(e)?e:String(e)}function bw(t,e){return(bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pw(t);if(e){var o=Pw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ww(this,r)}}function ww(t,e){if(e&&("object"===mw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pw(t){return(Pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bw(t,e)}(i,t);var e,r,n,o=Bw(i);function i(){var t;return Iw(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:he,holeOpacity:1,grooveOpacity:1,attachOrderRender:!0}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionSenseSetting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){e.renderIgnoreCategory&&(e.renderIgnoreCategory=Object(Or.castArray)(e.renderIgnoreCategory)),Object(Or.extend)(t,e)}))})),t}return e=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&Ew(e.prototype,r),n&&Ew(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function _w(t){return(_w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ow(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dw(n.key),n)}}function Dw(t){var e=function(t,e){if("object"!=_w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_w(e)?e:String(e)}function xw(t,e){return(xw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tw(t);if(e){var o=Tw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rw(this,r)}}function Rw(t,e){if(e&&("object"===_w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tw(t){return(Tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xw(t,e)}(i,t);var e,r,n,o=Mw(i);function i(){var t;return Qw(this,i),(t=o.apply(this,arguments)).fittingDesignSense=t.partialCreator.create(jb),t.intersected=t.partialCreator.create(tw),t.senseSetting=t.partialCreator.create(Sw),t.fittingModel=t.partialCreator.create(pB),t.plankFaceHint=t.partialCreator.create(vw),t.fittingHint=t.partialCreator.create(Jb),t.fittingViewer=t.partialCreator.create(TB),t}return e=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Ow(e.prototype,r),n&&Ow(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function Lw(t){return(Lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kw(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Nw(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){kw(i,n,o,a,s,"next",t)}function s(t){kw(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Fw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Fw=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Lw(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lw(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Gw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zw(n.key),n)}}function zw(t){var e=function(t,e){if("object"!=Lw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Lw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Lw(e)?e:String(e)}function Yw(){return(Yw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Hw(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Hw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kw(t)););return t}function Vw(t,e){return(Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kw(t);if(e){var o=Kw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ww(this,r)}}function Ww(t,e){if(e&&("object"===Lw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kw(t){return(Kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jw(t){return function(t){if(Array.isArray(t))return Xw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Xw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xw(t,e)}(t)||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 Xw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Zw(t){var e=t.map((function(t){return t.subModels&&t.subModels.length?Zw(t.subModels):[]})).flat();return e.push.apply(e,Jw(t)),e}var $w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vw(t,e)}(f,t);var e,r,n,o,i,a,s,u,c,A,l=qw(f);function f(){var t;return Gw(this,f),(t=l.apply(this,arguments)).state=t.stateCreator.create({loading:AI.FAIL,allSubModels:[],result:void 0,currModelId:""}),t.$reducerState=t.reducerCreator.create(t.state),t._startAutoSyncModelView=Object(Or.once)((function(){WL(!0);var e=Object(Or.debounce)((function(e){t._refreshCustomModel(e)}),500),r=function(r){var n=t.state.state.currModelId;r.some((function(t){return t.id===n}))&&e(n)};HL().on(r),VL().on(r),qL().on(r)})),t.$actionSetModelId=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.currModelId!==e&&(t.result=void 0,t.allSubModels=[]),t.currModelId=e}))})),t.$actionLoadParamModelJsonData=t.unitCreator.async((function(e){e.started.every(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p,d,g,y,v,m,I,E;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.defer,o=e.hasFitting,i=void 0!==o&&o,a=e.force,s=void 0!==a&&a,u=e.templateId,c=void 0===u?wC("getJsonConfig").defaultTemplateId:u,A=e.timeout,l=e.ignoreResetPosition,f=void 0===l?wC("getJsonConfig").ignoreResetPosition:l,h=this.state.state,p=h.currModelId,d=h.result,g=h.currTemplateId,r){t.next=4;break}throw new Error("not selected model!");case 4:if(y=r===p,v=g===c,m=this.$actionLoadParamModelJsonData,t.prev=7,I=y&&!s&&v?d:void 0,!i||I){t.next=13;break}return t.next=12,UL(r,c);case 12:I=t.sent;case 13:if(I){t.next=18;break}return QL.delete(r),t.next=17,zL(r,c,f,A);case 17:I=t.sent;case 18:if(I){t.next=20;break}throw new Error("输入json数据出现异常");case 20:return E=y&&!c?Zw(I.paramModel):this.state.state.allSubModels,y&&V_().scene.$actionToggleSelectModel.dispatch(!0),t.next=24,m.done.dispatch({params:e,result:{ossContent:I,allSubModels:E}});case 24:t.next=31;break;case 26:return t.prev=26,t.t0=t.catch(7),t.next=30,m.failed.dispatch({params:e});case 30:n&&n.reject(t.t0);case 31:case"end":return t.stop()}}),t,this,[[7,26]])}))),e.done.every((function(t){var e=t.params.defer;e&&e.resolve(t.result.ossContent)})),e.started.produce(t.$reducerState,(function(t,e){t.loading=AI.LOADING})),e.done.produce(t.$reducerState,(function(t,e){var r=e.result,n=r.ossContent,o=r.allSubModels,i=e.params,a=i.templateId,s=i.modelId===t.currModelId;t.loading=AI.SUCCESS,t.result=s?n:t.result,t.allSubModels=s?o:t.allSubModels,t.currTemplateId=a})),e.failed.produce(t.$reducerState,(function(t,e){t.loading=AI.FAIL}))})),t}return e=f,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"init",value:function(){Yw(Kw(f.prototype),"init",this).call(this)}},{key:"_refreshCustomModel",value:(A=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p=this;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.state.state.currModelId===e){t.next=2;break}return t.abrupt("return");case 2:return r=this.getStateManager().core.design.getCustom(),n=r.getParamModels().filter((function(t){return!t.isAppendHardware})),o=r.getParamModelAssemblies(),t.next=7,GL(e);case 7:i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),u=s.paramModels,c=s.paramModelAssemblies;try{A=Object(Or.keyBy)(u,(function(t){return t.id})),(l=ol(n,u,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModels(t)})),l.delete.forEach((function(t){return r.removeParamModel(t)})),l.update.forEach((function(t){return new $E(A[t.id]).generate(t)})),f=Object(Or.keyBy)(c,(function(t){return t.id})),(h=ol(o,c,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModelAssemblies(t)})),h.delete.forEach((function(t){return r.removeParamModelAssembly(t)})),h.update.forEach((function(t){return new UE(f[t.id]).generate(t)})),this.getAxr(VC).$actionAutoRefreshModel.dispatch()}catch(t){console.error("partial sync model view fail",t),r.setParamModels(u),r.setParamModelAssemblies(c)}this.getStateManager().core.pad.once(wp.EVENT_PARAM_MODELS_CHANGED,(function(){p.getAxr(VC).$actionAutoRefreshModel.dispatch(),IE&&EE(IE)}));case 14:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"viewParamModelById",value:(c=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Or.isArray)(e)?e[0]:e,this.$actionSetModelId.dispatchResolve(r),n=V_().scene,this.resetView(),(o=this.getAxr(jw).fittingDesignSense).initFittingDesign(),this.getAxr(jw).fittingViewer.initFittingViewer(),function(){var t=Nw(Fw().mark((function t(){var e;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=uC(),o.$actionLoadFittingDesign.started.dispatch({defer:e,params:{modelid:r}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),t.next=13,this.getAxr(rE).getCurrentCustomData(r);case 13:return i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),(u=new ke).addParamModels.apply(u,Jw(s.paramModels)),u.addParamModelAssemblies.apply(u,Jw(s.paramModelAssemblies)),t.next=22,this.getAxr(VC).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!i.context});case 22:if(t.prev=22,!V_().fittingDesign.senseSetting.getSenseSettings().attachOrderRender){t.next=29;break}return t.next=27,YL(r);case 27:(c=t.sent).length&&(A=c.reduce((function(t,e){return t[e.id]={opacity:.15,color:"#000000"},t}),{}),V_().scene.$actionSetCustomModelMaterial.dispatch(A));case 29:t.next=34;break;case 31:t.prev=31,t.t0=t.catch(22),console.error("组件提审模型获取失败",t.t0);case 34:case"end":return t.stop()}}),t,this,[[22,31]])}))),function(t){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Nw(Fw().mark((function t(){var e,r,n,o,i,a,s,u,c,A;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getStateManager().core.design.getCustom(),r=e.getParamModels().filter((function(t){return!t.isAppendHardware})),n=e.getParamModelAssemblies(),o=this.state.state.currModelId,(0!==r.length||0!==n.length)&&o){t.next=6;break}throw new Error("No custom model in the scene!");case 6:return e.clearAllParamModels(),t.next=9,GL(this.state.state.currModelId);case 9:return i=t.sent,a=new DE,i.context&&a.unSerialize(i.context),s=eC(i,a),e.addParamModels.apply(e,Jw(s.paramModels)),e.addParamModelAssemblies.apply(e,Jw(s.paramModelAssemblies)),u=this.getAxr(jw).fittingViewer,t.next=18,u.getFitting();case 18:return c=t.sent,t.next=21,u.getHardware();case 21:return A=t.sent,this.stateManager.core.pad.once(wp.EVENT_PARAM_MODELS_CHANGED,(function(){c.map((function(t){return u.addFitting(t)})),A.map((function(t){return u.addHardware(t)}))})),t.next=26,this.getAxr(VC).$actionAddModelToSense.started.dispatchResolve({custom:e,needAttach:!i.context});case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(s=Nw(Fw().mark((function t(){var e,r;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=yI(LI.MiniAppSelectModelService),t.next=3,null==e?void 0:e.getSelected();case 3:if(!(null==(r=t.sent)?void 0:r.length)){t.next=9;break}return t.next=7,this.viewParamModelById(Object(Or.map)(r,"id").filter((function(t){return!!t})));case 7:t.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getParamModelJsonData",value:(a=Nw(Fw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.state,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r.currModelId:a,u=n.force,c=void 0!==u&&u,A=n.templateId,l=n.ignoreResetPosition,c){t.next=14;break}return h=uC(),this.getAxr(jw).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:h,params:{modelid:s}}),t.prev=5,t.next=8,h.promise;case 8:f=t.sent,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),console.log(t.t0);case 14:return p=uC(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:s,hasFitting:!!f,force:c,templateId:A,timeout:"number"==typeof i?i/1e3:void 0,ignoreResetPosition:l}),t.abrupt("return",p.promise);case 17:case"end":return t.stop()}}),t,this,[[5,11]])}))),function(t){return a.apply(this,arguments)})},{key:"validateModelStable",value:function(t){var e=this.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(e){for(var r=[e],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var o=r.shift();o.getType()===Ss.ParamModelType.PARAM_PRIMITIVE&&o.getLegal()?(n.total++,o.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(o.id))):r.push.apply(r,Jw(o.getChildNodes()))}return n}}},{key:"getTopModelList",value:(i=Nw(Fw().mark((function t(e){var r;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=yI(bm),t.next=3,r.getTopParamModels(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=Nw(Fw().mark((function t(e){var r,n,o,i;return Fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Object(Or.castArray)(e),n=yI(LI.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){t.next=10;break}return t.next=7,n.getParamModelPhotoById(r[i]).then((function(t){o.push(t)}));case 7:--i,t.next=4;break;case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"resetView",value:function(){var t=this.getStateManager().core,e=t.design.getCustom();e.clearAllParamModels();var r=e.getParamModelAssemblies();r.length&&r.map((function(t){return e.removeParamModelAssembly(t)})),t.fittingDesign.setIntersects([]),t.fittingDesign.setPlankFaceHintModels([]),t.fittingDesign.setFittingHintModels([]),t.fittingDesign.setPlankOutlineHintModels([]),t.fittingDesign.setPlankAreaFaceHints([]),IE=void 0}}])&&Uw(e.prototype,r),n&&Uw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(pu.AXR);function tP(t){return(tP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eP(t){return function(t){if(Array.isArray(t))return rP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return rP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rP(t,e)}(t)||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 rP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nP=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==tP(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(tP(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function oP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,aP(n.key),n)}}function aP(t){var e=function(t,e){if("object"!=tP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tP(e)?e:String(e)}function sP(){return(sP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=uP(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function uP(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fP(t)););return t}function cP(t,e){return(cP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fP(t);if(e){var o=fP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lP(this,r)}}function lP(t,e){if(e&&("object"===tP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fP(t){return(fP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var hP=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cP(t,e)}(i,t);var e,r,n,o=AP(i);function i(){var t;return oP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({show:!1,message:"模型数据更新提示",description:"设计方案中的模型数据已更新,建议完成模型数据更新后继续操作",defaultPosition:{x:(window.innerWidth-360-12)/window.innerWidth,y:12/window.innerHeight}}),t.$reducerState=t.reducerCreator.create(t.state),t._detectionResultMap=new Map,t._prevDetectResult=void 0,t.$actionInit=t.unitCreator.sync((function(t){t.latest(nP().mark((function t(e,r){var n,o,i,a;return nP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr($w);case 1:return o=n.$actionSetModelId.messageType(),t.next=5,Object(nE.take)([o]);case 5:i=t.sent,a=i.payload,this._detectionResultMap.clear(),this._prevDetectResult=void 0,this.$actionMergeState.dispatch({show:!1}),JL(a),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.debEmitDetectResult=Object(Or.debounce)((function(t){return _r.emit(wr.DETECT_RESULT_CHANGE,t)}),100),t.getDetectResult=function(t){return eP(t.values()).every((function(t){return t}))},t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.enableDetectionOnce=Object(Or.once)((function(){t.toggleDetection(!0)})),t.setDetectionUIOnce=Object(Or.once)((function(e){var r=Object(Or.cloneDeep)(e),n=r.defaultPosition;n&&(r.defaultPosition={x:n.x/window.innerWidth,y:n.y/window.innerHeight}),t.$actionMergeState.dispatch(r)})),t}return e=i,(r=[{key:"module",value:function(){return"Detection"}},{key:"init",value:function(){sP(fP(i.prototype),"init",this).call(this),this.$actionInit.dispatch(),this.initialization()}},{key:"initialization",value:function(){var t=this;KL().on((function(e){var r=e.productId,n=e.detectRuleItem,o=e.result;if(t.getAxr($w).state.state.currModelId===r){t._detectionResultMap.set(n,o);var i=t.getDetectResult(t._detectionResultMap);i!==t._prevDetectResult&&(t.debEmitDetectResult({productId:r,result:i}),t._prevDetectResult=i),i?t.$actionMergeState.dispatch({show:!1}):t.$actionMergeState.dispatch({show:!0})}}))}},{key:"toggleDetection",value:function(t){XL(t)}}])&&iP(e.prototype,r),n&&iP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);function pP(t,e){for(var r=t.toFixed(e).split("."),n=r[1];"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);return n?r[0]+"."+n:r[0]}function dP(t){var e=new c.BBox3d;return t.forEach((function(t){e.addPoint(t.clone())})),new Be.default(new _e.default({x:e.width,y:e.height,z:e.depth}),new _e.default(e.center),new _e.default({x:0,y:0,z:0}))}function gP(t){return(gP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yP(t,e,r){var n;return n=function(t,e){if("object"!=gP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vP(t){return(vP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EP(n.key),n)}}function IP(t,e,r){return e&&mP(t.prototype,e),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EP(t){var e=function(t,e){if("object"!=vP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vP(e)?e:String(e)}var CP=IP((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.start=e,this.end=r,this.getMainLine=function(){var t=n.start.point,e=n.end.point;return new li.a(t.clone(),e.clone())},this.getCapLines=function(t){var e=n.start,r=e.point,o=e.face,i=e.element,a=n.end.point,s=n.getLineDirection,u=o.getNormal().clone(),c=r.clone(),A=a.clone(),l=s(),f=new _e.default,h=mC(i).getConcatenatedMatrix(),p=Qs.a.decompose(h).euler,d=(new Se.default).setFromEuler(p).invert();if(l===me.Z)f=dC(new _e.default(0,t,0).applyQuaternion(d),u);else if(l===me.Y){f=dC(new _e.default(t,0,0).applyQuaternion(d),u)}else{f=dC(new _e.default(0,0,t).applyQuaternion(d),u)}var g=f.clone().normalize().mul(t),y=f.clone().negate().normalize().mul(t);return[new li.a(new _e.default(c.x,c.y,c.z).add(g),new _e.default(c.x,c.y,c.z).add(y)),new li.a(new _e.default(A.x,A.y,A.z).add(g),new _e.default(A.x,A.y,A.z).add(y))]},this.getLineDirection=function(){var t=n.start,e=t.point,r=t.element,o=n.end.point,i=e.clone(),a=o.clone().clone().sub(i.clone()),s=mC(r).getConcatenatedMatrix(),u=Qs.a.decompose(s).euler,c=(new Se.default).setFromEuler(u);a.applyQuaternion(c);var A,l=(A=a,new _e.default(Math.abs(A.x),Math.abs(A.y),Math.abs(A.z))).normalize(),f=l.x,h=l.y,p=l.z,d=Math.max(f,h,p);return d===f?me.X:d===h?me.Y:me.Z}}));function bP(t){return function(t){if(Array.isArray(t))return PP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wP(t)||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 BP(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||wP(t,e)||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 wP(t,e){if(t){if("string"==typeof t)return PP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?PP(t,e):void 0}}function PP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var SP=new Map([[me.X,{indexArray:[7,6],offsetNormal:new _e.default(0,0,1),lineColor:"#FF5533",lineOpacity:1,textStyle:{color:"#FF5533",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[me.Y,{indexArray:[7,4],offsetNormal:new _e.default(-1,0,0),lineColor:"#16D9A8",lineOpacity:1,textStyle:{color:"#16D9A8",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[me.Z,{indexArray:[0,4],offsetNormal:new _e.default(0,-1,0),lineColor:"#338BFF",lineOpacity:1,textStyle:{color:"#338BFF",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}]]),_P=new Map([[me.X,.5],[me.Y,.7],[me.Z,.3]]);function QP(t,e){var r=SP.get(e);if(!r)throw new Error("unknown direction");var n=function(t){if(0!==t.length){var e=t[0].getMatrix(),r=(new Pe.default).getInverse(e),n=new Os.default,o=Qs.a.decompose(e).rotation;return t.forEach((function(t){n.includePoints(t.getPoints().map((function(t){return t.clone().applyMatrix4(r)})))})),new Be.default(n.getSize().clone(),n.getCenter().clone().applyMatrix4(e),o)}}(t.map((function(t){return t.getConcatenatedBox3()})));if(!n)throw new Error("mergedBox not exist");var o=n.getPoints(),i=n.getRotation(),a=BP(r.indexArray,2),s=a[0],u=a[1],c=r.offsetNormal,A=r.lineColor,l=r.lineOpacity,f=r.textStyle,h=c.clone().applyQuaternion((new Se.default).setFromEuler(new we.default(i.x,i.y,i.z))).normalize(),p=h.clone().mul(30),d=o[s].add(p),g=o[u].add(p),y=new li.a(d,g),v=h.clone().mul(20),m=v.clone().negate();return{mainLine:y,capLines:[new li.a(d.clone().add(v),d.clone().add(m)),new li.a(g.clone().add(v),g.clone().add(m))],lineStyle:{color:A,opacity:l},textStyle:f}}function OP(t){var e=new Map(t.map((function(t){return[t.getConcatenatedBox3(),t]}))),r=new Map(bP(e.keys()).map((function(t){return Object.values(function(t){var e=t.getPoints();function r(t,r,n){var o=e[t].clone(),i=_e.default.sub(e[r],o),a=_e.default.sub(e[n],o);return new Wm.default(o,i,a)}return{faces:yP(yP(yP(yP(yP(yP({},Ee.Bottom,r(3,2,0)),Ee.Front,r(0,1,4)),Ee.Left,r(3,0,7)),Ee.Right,r(1,2,5)),Ee.Back,r(2,3,6)),Ee.Top,r(4,5,7))}}(t).faces).map((function(e){return[e,t]}))})).flat(1)),n=bP(r.keys()).reduce((function(t,e){var r=e.getNormal().clone(),n=bP(t.keys()).find((function(t){return _e.default.isParallel(t,r,.01)}));return n?t.get(n).push(e):t.set(r,[e]),t}),new Map);n.forEach((function(t,e){var n=t.map((function(t){return{face:t,faceOrder:_e.default.dot2(t.getCenter(),e),boxOrder:_e.default.dot2(r.get(t).getPosition(),e)}}));n.sort((function(t,e){return t.faceOrder-e.faceOrder}));var o=[];n.forEach((function(t){var e=o[o.length-1]||[],r=e[0];if(r&&c.Num.isEqual(r.faceOrder,t.faceOrder,.01))return void e.push(t);o.push([t])})),o.forEach((function(t){t.length>1&&t.sort((function(t,e){return t.boxOrder-e.boxOrder}))}));var i=new Map(o.flat(1).map((function(t,e){return[t.face,e]})));t.sort((function(t,e){return i.get(t)-i.get(e)}))}));var o=new Map;n.forEach((function(t,e){t.forEach((function(t,r,n){for(var i=t.getNormal().clone(),a=t.getCenter().clone(),s=new qm.a(a,i),u=_e.default.dot2(i,e)>0;;){u?r++:r--;var c=n[r];if(!c)break;var A=c.intersectRay(s,!1);if(A){if(_e.default.dot2(i,c.getNormal())>0)break;var l={facePair:[t,c],line:new li.a(a,A)};o.has(e)?o.get(e).push(l):o.set(e,[l]);break}}}))}));var i=bP(o.values()).map((function(t){return e=t,r=Object(Or.groupBy)(e,(function(t){return t.facePair.map((function(t){return t.toString()})).slice().sort().join("-")})),Object.entries(r).map((function(t){var e=BP(t,2),r=(e[0],e[1]);return r.sort((function(t,e){return _e.default.cross2(t.facePair[0].directionU.clone(),t.facePair[0].directionV.clone()).length()-_e.default.cross2(e.facePair[0].directionU.clone(),e.facePair[0].directionV.clone()).length()})),r[0]}));var e,r})).flat(1).filter((function(t){return t.line.length()>.4})).map((function(t){return new CP({point:t.line.start,face:t.facePair[0],box:r.get(t.facePair[0]),element:e.get(r.get(t.facePair[0]))},{point:t.line.end,face:t.facePair[1],box:r.get(t.facePair[1]),element:e.get(r.get(t.facePair[1]))})})),a=Object(Or.groupBy)(i,(function(t){return t.getLineDirection()})),s=new Map;return Object.entries(a).forEach((function(t){var e=BP(t,2),r=e[0],n=e[1],o=SP.get(r);s.set(r,{lineStyle:{color:o.lineColor,opacity:o.lineOpacity},textStyle:o.textStyle,lines:n.map((function(t){return{mainLine:t.getMainLine(),capLines:t.getCapLines(20)}}))})})),s}function DP(t){return(DP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xP(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||RP(t,e)||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 MP(t){return function(t){if(Array.isArray(t))return TP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||RP(t)||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 RP(t,e){if(t){if("string"==typeof t)return TP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?TP(t,e):void 0}}function TP(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jP=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==DP(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(DP(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function LP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NP(n.key),n)}}function NP(t){var e=function(t,e){if("object"!=DP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DP(e)?e:String(e)}function FP(t,e){return(FP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zP(t);if(e){var o=zP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UP(this,r)}}function UP(t,e){if(e&&("object"===DP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zP(t){return(zP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var YP=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FP(t,e)}(i,t);var e,r,n,o=GP(i);function i(){var t;return LP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({dimensionRulers:new Map,spacingDistanceRulers:new Map}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(jP().mark((function t(e,r){var n,o;return jP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(nE.take)([o]);case 5:this.$actionSetDimensionRulers.dispatch(new Map),this.$actionSetSpacingDistanceRulers.dispatch(new Map),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshRulerLines=t.unitCreator.sync((function(t){t.latest(jP().mark((function t(){var e,r;return jP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(VC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(nE.take)([r]);case 5:this.refreshDimensionRulers(),this.refreshSpacingDistanceRulers(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetDimensionRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.dimensionRulers=e}))})),t.$actionSetSpacingDistanceRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.spacingDistanceRulers=e}))})),t.refreshDimensionRulers=function(){var e=t.state.state.dimensionRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeDimensionRulerConfig(i,a);r.set(n,{originData:o,rulerConfig:s})})),t.$actionSetDimensionRulers.dispatch(r)},t}return e=i,(r=[{key:"module",value:function(){return"RulerLine"}},{key:"init",value:function(){this.$actionInit.dispatch(),this.$actionRefreshRulerLines.dispatch()}},{key:"refreshSpacingDistanceRulers",value:function(){var t=this,e=this.state.state.spacingDistanceRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeSpacingDistanceRulers(i,a);r.set(n,{originData:o,rulerConfigs:s})})),this.$actionSetSpacingDistanceRulers.dispatch(r)}},{key:"_computeDimensionRulerConfig",value:function(t,e){var r,n,o,i,a,s=this,u=t.modelIds,c=t.direction;if(0===u.length)throw new Error("modelIds parameter array length must be greater than 0");var A=u.map((function(t){return s.stateManager.core.pad.findModelOrAssemblyModelById(t)})),l=A.filter((function(t){return!t}));if(l.length>0)throw new Error("model: ".concat(l.join(",")," not exist"));var f=QP(A,c),h=f.mainLine,p=f.capLines,d=f.lineStyle,g=f.textStyle;return{mainLine:h,capLines:p,text:pP(h.length(),1),textPosition:h.getCenter(),lineStyle:{color:null!==(n=null===(r=null==e?void 0:e.lineStyle)||void 0===r?void 0:r.color)&&void 0!==n?n:d.color,opacity:null!==(i=null===(o=null==e?void 0:e.lineStyle)||void 0===o?void 0:o.opacity)&&void 0!==i?i:d.opacity},textStyle:null!==(a=null==e?void 0:e.textStyle)&&void 0!==a?a:g}}},{key:"_computeSpacingDistanceRulers",value:function(t,e){var r=t.modelFilter,n=this.stateManager.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),a=tC.ParamModelUtils.flattenModels(o,{getAccessories:function(t){return t.getChildNodes().filter((function(t){return t.getLegal()}))}}),s=[].concat(MP(a),MP(i));return MP(OP(s.filter((function(t){return r({id:(e=t).id,prodCatId:e.getCategory().categoryId});var e}))).entries()).map((function(t){var e=xP(t,2),r=e[0],n=e[1],o=n.lineStyle,i=n.lines,a=n.textStyle;return i.map((function(t){var e=t.mainLine;return{mainLine:e,capLines:t.capLines,lineStyle:o,textStyle:a,text:pP(e.length(),1),textPosition:new _e.default(new c.LineSeg3d(c.Point3d.fromObject(e.start),c.Point3d.fromObject(e.end)).getPoint(e.length()*_P.get(r)))}}))})).flat()}},{key:"addDimensionRuler",value:function(t,e){var r=this._computeDimensionRulerConfig(t),n=Object(Xr.default)(),o=new Map(this.state.state.dimensionRulers).set(n,{originData:{param:t,option:e},rulerConfig:r});return this.$actionSetDimensionRulers.dispatch(o),n}},{key:"removeDimensionRuler",value:function(t){if(t){var e=new Map(this.state.state.dimensionRulers);e.delete(t),this.$actionSetDimensionRulers.dispatch(e)}else this.$actionSetDimensionRulers.dispatch(new Map)}},{key:"addSpacingDistanceRuler",value:function(t,e){var r=this._computeSpacingDistanceRulers(t,e),n=Object(Xr.default)(),o=new Map(this.state.state.spacingDistanceRulers).set(n,{originData:{param:t,option:e},rulerConfigs:r});return this.$actionSetSpacingDistanceRulers.dispatch(o),n}},{key:"removeSpacingDistanceRuler",value:function(t){if(t){var e=new Map(this.state.state.spacingDistanceRulers);e.delete(t),this.$actionSetSpacingDistanceRulers.dispatch(e)}else this.$actionSetSpacingDistanceRulers.dispatch(new Map)}}])&&kP(e.prototype,r),n&&kP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR),HP=r(761),VP=r.n(HP);function qP(t){return(qP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function KP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JP(n.key),n)}}function JP(t){var e=function(t,e){if("object"!=qP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qP(e)?e:String(e)}function XP(t,e){return(XP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZP(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tS(t);if(e){var o=tS(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $P(this,r)}}function $P(t,e){if(e&&("object"===qP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tS(t){return(tS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var eS=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XP(t,e)}(i,t);var e,r,n,o=ZP(i);function i(){var t;return WP(this,i),(t=o.apply(this,arguments)).bzProperties=new Map,t}return e=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:"isHidden"},this.isHidden,t),this.isHidden=t}}])&&KP(e.prototype,r),n&&KP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(jt);function rS(t){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nS(Object(r),!0).forEach((function(e){iS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function iS(t,e,r){var n;return n=function(t,e){if("object"!=rS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==rS(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var aS={x:0,y:0,z:0},sS={x:0,y:0,z:0};function uS(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=e.category,i=e.origin,a=new eS,s=!(t instanceof gr)||t.isRoot(),u=n||s?t:t.getRoot(),c=u instanceof gr;a.id=u.id,a.isRoot=!c||u.isRoot(),a.isHidden=!!u.getInvisible(),a.name=u.getName();var A=W.ASSEMBLY;if(c?A=W.COMMON:t.isTemplateAssembly()&&(A=W.TEMPLATE_ASSEMBLY),a.modelType=A,a.position=a.isRoot?aS:u.getPosition(),a.rotation=a.isRoot?sS:u.getRotation(),a.size="function"==typeof u.getScaledSize?u.getScaledSize():u.getSize(),a.params=AS(u),a.category=o||u.getCategory().categoryId,c){var l=u.getModel();a.productId=null==l?void 0:l.obsBrandGoodId}return n&&(a.root=n),a.isRoot&&(a._origin=i),a.children=(c?u.getChildren():u.getParamModels()).map((function(t){return uS(t,e,r,n||a)})),a.accessories=(c?u.getAccessories():[]).map((function(t){return uS(t,e,r,n||a)})),r.set(a.id,a),u!==t&&r.has(t.id)?r.get(t.id):a}function cS(t,e){var r=t.isRoot?t:t.root;if(!r)return{};var n=r._changeMap,o=e.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),a=n.cloned;return a&&(o=o.clone(!1)),o=function t(e,r,n,o){var i=e._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var a=i.update,s=void 0===a?[]:a,u=i.addNodes,c=void 0===u?[]:u,A=o?oS({},o):{parentModelLite:e,parentModel:n,rootModelLite:e,rootModel:n};s.forEach((function(t){if(t.type===Y.ATTRIBUTE)switch(t.attr){case"position":n.setPosition(e.getPosition());break;case"rotate":n.setRotation(e.getRotation());break;case"isHidden":n.setInvisible(e.getHidden()),function(t){var e=t.getInvisible();V_().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===t.id&&r.setVisible(!e)}))}(n)}if(t.type===Y.STORE){var o=n.getParamStore().getParam(t.attr),i=e.getParam(t.attr);if(o&&i){var a=i.getValue();[Ss.ParamType.MATERIAL,Ss.ParamType.SHAPE].includes(o.getType())&&(a=r.getUnSafeObsBrandGoodToBrandGoodId(a)),a&&o.setValue(a),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),c.forEach((function(o){var i=o.type,a=o.linkId,s=(i===q.CHILD?e.getChild():e.getAccessory()).find((function(t){return t.id===a}));if(s){var u=r.getUnSafeParamModelFromParamModelLite(s);u&&((s._changeMap.cloned||s._origin!==G.SENSE)&&(u=u.clone(!1)),i===q.CHILD?(u.setIsAppend(!0),u.setAppendType(VP.a.CENTER),n.addChild(u)):n.addAccessory(u),t(s,r,u,oS(oS({},A),{},{parentModel:n,parentModelLite:e})),(s._changeMap.cloned||s._origin!==G.SENSE)&&u.assignUniqueId())}}));var l=function(o){return function(i){if(!c.some((function(t){return t.type===o&&t.linkId===i.id}))){var a=n instanceof Qe.CoreParamModelAssembly?n.getParamModels():o===q.ACCESSORY?n.getAccessories():n.getChildren(),s=i._changeMap.originId||i.id,u=a.find((function(t){return t.id===s}));u&&t(i,r,u,oS(oS({},A),{},{parentModel:n,parentModelLite:e}))}}};return e.getChild().forEach(l(q.CHILD)),e.getAccessory().forEach(l(q.ACCESSORY)),n}(r,e,o),a&&o&&o.assignUniqueId(),{create:a,custom:i,model:o}}function AS(t){var e=new Map;return t.getParamStore().forEach((function(t,r){e.set(r,function(t){var e=new Dt;if(e.data={type:t.getType(),displayName:t.getDisplayName(),name:t.getName(),value:t.getValue(),max:t.getMax(),min:t.getMin(),editable:t.getEditable()||t.getOverridable(),optionValues:t.getOptionValues().map((function(t){return{name:t.name,value:t.value}})),recommendValues:t.getRecommendValues().map((function(t){return{name:t.name,value:t.value}})),primitiveOverride:t.getPrimitiveOverride(),step:t.getStep()},[k.MATERIAL,k.SHAPE].includes(e.getType())){var r=t.getProduct();e.data.value=r?r.obsBrandGoodId:""}return e}(t))})),e}var lS=r(273),fS=r.n(lS);function hS(t){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pS(Object(r),!0).forEach((function(e){gS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gS(t,e,r){var n;return n=function(t,e){if("object"!=hS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==hS(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */yS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==hS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(hS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function vS(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function mS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){vS(i,n,o,a,s,"next",t)}function s(t){vS(i,n,o,a,s,"throw",t)}a(void 0)}))}}fS()(function(){var t=mS(yS().mark((function t(e){var r,n;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),t.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:e});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),dS({promise:!0},mI));function IS(){return(IS=mS(yS().mark((function t(e){var r,n,o,i,a;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_d().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ES(){return(ES=mS(yS().mark((function t(e){var r,n,o,i,a;return yS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_d().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var CS=fS()((function(t){return IS.apply(this,arguments)}),dS(dS({},mI),{},{promise:!0})),bS=fS()((function(t){return ES.apply(this,arguments)}),dS(dS({},mI),{},{promise:!0}));function BS(t){return(BS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==BS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(BS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function PS(t){return function(t){if(Array.isArray(t))return SS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return SS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SS(t,e)}(t)||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 SS(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _S(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function QS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,OS(n.key),n)}}function OS(t){var e=function(t,e){if("object"!=BS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=BS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==BS(e)?e:String(e)}var DS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cached=new Map}var e,r,n,o,i;return e=t,(r=[{key:"setProduct",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(e);r||(r=new Map,this.cached.set(e,r)),r.set(t.brandGoodId,t.obsBrandGoodId),r.set(t.obsBrandGoodId,t.brandGoodId)}},{key:"getToggledBrandGood",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(e=this.cached.get(r))||void 0===e?void 0:e.get(t)}},{key:"removeCachedModel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(t)}},{key:"safeGetToggleBrandGood",value:(o=wS().mark((function t(e){var r,n,o,i,a,s,u=this,c=arguments;return wS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Or.castArray)(e),o=[],i=[],a=new Map,n.forEach((function(t){var e=u.getToggledBrandGood(t,r);e?a.set(t,e):/^[0-9]$/.test(t.toString())?i.push(t):o.push(t)})),s=function(t){return[].concat(PS(t.hardwares||[]),PS(t.textures||[]),PS(t.virtualModels||[]),PS(t.paramModelProducts||[]),PS(t.moldings||[]))},!o.length){t.next=12;break}return t.next=10,CS(o).then(s);case 10:t.sent.forEach((function(t){u.setProduct(t,r)}));case 12:if(!i.length){t.next=17;break}return t.next=15,bS(i).then(s);case 15:t.sent.forEach((function(t){u.setProduct(t,r)}));case 17:return[].concat(o,i).forEach((function(t){var e=u.getToggledBrandGood(t,r);e&&a.set(t,e)})),t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){_S(i,r,n,a,s,"next",t)}function s(t){_S(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&QS(e.prototype,r),n&&QS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xS(t){return(xS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function MS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */MS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==xS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(xS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function RS(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function TS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){RS(i,n,o,a,s,"next",t)}function s(t){RS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function jS(t){return function(t){if(Array.isArray(t))return LS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return LS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LS(t,e)}(t)||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 LS(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,FS(n.key),n)}}function FS(t){var e=function(t,e){if("object"!=xS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xS(e)?e:String(e)}var GS,US=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new DS;kS(this,t),this.callback=e,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var e,r,n,o;return e=t,(r=[{key:"getParamModelFromId",value:function(t){if(this.cached.has(t))return this.cached.get(t);var e=this.callback(t);return e?(this.cached.set(t,e),e):void 0}},{key:"getUnSafeParamModel",value:function(t){return this.cached.get(t)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(t){return this.brandGoodsTranslate.getToggledBrandGood(t)}},{key:"addParamModelLite",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=this.models).push.apply(t,jS(r.map((function(t){return t.root||t}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(t){var e,r=t.root||t;switch(t._origin||r._origin){case G.BRANDGOOD:case G.CATEGORY:break;case G.SENSE:var n=r._changeMap.originId||r.id;e=this.getUnSafeParamModel(n)}if(!e||r===t)return e;for(var o,i=t._changeMap.originId||t.id,a=[e];o=a.pop();){if(o.id===i)return o;a.push.apply(a,jS(o.getChildNodes()))}}},{key:"attach",value:(o=TS(MS().mark((function t(){var e,r,n,o,i,a,s,u,c=this;return MS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=e.pop())){t.next=18;break}a=(i=o)._changeMap,s=i._origin,t.t0=s,t.next=t.t0===G.SENSE?8:t.t0===G.CATEGORY||t.t0===G.BRANDGOOD||t.t0===G.TEMPLATE_ID?11:12;break;case 8:return u=a.originId||o.id,r.modelIds.push(u),t.abrupt("break",12);case 11:return t.abrupt("break",12);case 12:if(!a.deleted){t.next=14;break}return t.abrupt("continue",3);case 14:a.update&&a.update.forEach((function(t){if(o&&t.type===Y.STORE&&o.hasParam(t.attr)){var e=o.getParam(t.attr);e&&[k.MATERIAL,k.SHAPE].includes(e.getType())&&e.getValue()&&n.push(e.getValue())}})),e.push.apply(e,jS(o.getChild()).concat(jS(o.getAccessory()))),t.next=3;break;case 18:return t.next=20,Promise.allSettled(jS(Object(Or.uniq)(r.modelIds).map(function(){var t=TS(MS().mark((function t(e){return MS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c.getParamModelFromId(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 20:return t.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&NS(e.prototype,r),n&&NS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zS(t){GS=t}var YS=r(768);function HS(t){return(HS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function VS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */VS=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==HS(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(HS(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function qS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function WS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,KS(n.key),n)}}function KS(t){var e=function(t,e){if("object"!=HS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=HS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==HS(e)?e:String(e)}function JS(){return(JS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=XS(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function XS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=e_(t)););return t}function ZS(t,e){return(ZS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=e_(t);if(e){var o=e_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return t_(this,r)}}function t_(t,e){if(e&&("object"===HS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function e_(t){return(e_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var r_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZS(t,e)}(i,t);var e,r,n,o=$S(i);function i(){var t;return qS(this,i),(t=o.apply(this,arguments)).$actionInit=t.unitCreator.sync((function(t){t.latest(VS().mark((function t(e,r){var n;return VS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(VC);case 1:return t.next=4,Object(nE.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 4:if(n.state.state.main!==lI.SUCCESS){t.next=7;break}return t.next=7,Object(nE.put)(this.$actionSetCamera.message(!0));case 7:t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetCamera=t.unitCreator.sync((function(t){t.latest(VS().mark((function t(e,r){var n,o,i,a,s,u;return VS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(a=r.scene3D).updateEnableCameraAnimation(!1),s=o.length?Object(YS.computeAssemblyBox)(o.map((function(t){return t.getBox3()})),o[0].getMatrix4()):Object(YS.computeAssemblyBox)(i.map((function(t){return t.getBox3()})),i[0].getMatrix4()),u=iC(s),a.updateInitCameraAttributes(u),a.updateScaleFactorRange(.5,4),e?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 10:case"end":return t.stop()}}),t)})))})),t}return e=i,(r=[{key:"init",value:function(){JS(e_(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&WS(e.prototype,r),n&&WS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nb);function n_(t){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o_(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a_(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function i_(t){return function(t){if(Array.isArray(t))return s_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a_(t)||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 a_(t,e){if(t){if("string"==typeof t)return s_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s_(t,e):void 0}}function s_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u_(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function c_(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u_(i,n,o,a,s,"next",t)}function s(t){u_(i,n,o,a,s,"throw",t)}a(void 0)}))}}function A_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A_(Object(r),!0).forEach((function(e){E_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==n_(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n_(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function h_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,C_(n.key),n)}}function d_(){return(d_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=g_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function g_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=I_(t)););return t}function y_(t,e){return(y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v_(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=I_(t);if(e){var o=I_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m_(this,r)}}function m_(t,e){if(e&&("object"===n_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function I_(t){return(I_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function E_(t,e,r){return(e=C_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C_(t){var e=function(t,e){if("object"!=n_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=n_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n_(e)?e:String(e)}var b_=E_(E_(E_(E_(E_(E_(E_(E_(E_(E_({},Ie.HOLE,4),Ie.GROOVE,1),Ie.HARDWARE_GROOVE,2),Ie.HARDWARE,3),Ie.PARAM_MODEL,0),Ie.HOLE_V2,5),Ie.SQUARE_GROOVE,5),Ie.ROUND_CORNER_GROOVE,5),Ie.SPECIAL_SHAPED_GROOVE,5),Ie.PATH_GROOVE,5),B_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y_(t,e)}(l,t);var e,r,n,o,i,a,s,u,A=v_(l);function l(){var t;return h_(this,l),(t=A.apply(this,arguments)).cameraController=t.partialCreator.create(r_),t.state=t.stateCreator.create({renderMode:or.RenderMode.SHADING,selectable:!0,overrideMaterialOption:{},interactionPriority:b_,customModelMaterial:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.$actionToggleRenderMode=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){var n,o,i;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=or.RenderMode.SHADING,o=QA.Unset,t.t0=e.mode,t.next=t.t0===gI.SHADING?5:t.t0===gI.OUTLINE_WITH_SHADING?7:t.t0===gI.TRANSLUCENT?9:t.t0===gI.OUTLINE_AND_TRANSLUCENT?11:t.t0===gI.FULLY_TRANSPARENT?14:17;break;case 5:return n=or.RenderMode.SHADING,t.abrupt("break",17);case 7:return n=or.RenderMode.OUTLINE_WITH_SHADING,t.abrupt("break",17);case 9:return o=QA.Translucent,t.abrupt("break",17);case 11:return n=or.RenderMode.OUTLINE_WITH_SHADING,o=QA.Translucent,t.abrupt("break",17);case 14:return n=or.RenderMode.OUTLINE_WITH_SHADING,o=QA.Transparent,t.abrupt("break",17);case 17:return t.next=19,Object(nE.put)(this.$actionMergeState.message({renderMode:n}));case 19:i=[or.RenderMode.OUTLINE_WITH_SHADING,or.RenderMode.TRANSPARENT_LINE].includes(n),dL().viewer.toggleShowModelOutline(i),dL().viewer.togglePlankOutline(!1),i&&this.enableHardwaresOutline(),dL().viewer.updateTransparentMode(o),r.scene3D.updateRenderMode(n),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 27:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleWhiteMode=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.scene3D.updateRenderMode(e?or.RenderMode.OUTLINE_ONLY:or.RenderMode.SHADING),dL().viewer.togglePlankOutline(e),e?this.disableHardwaresOutline():this.enableHardwaresOutline(),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 5:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderBorder=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e,r){var n;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.enableHardwaresOutline(),n=e?or.RenderMode.OUTLINE_WITH_SHADING:or.RenderMode.SHADING,t.next=4,Object(nE.put)(this.$actionMergeState.message({renderMode:n}));case 4:dL().viewer.toggleShowModelOutline(n===or.RenderMode.OUTLINE_WITH_SHADING),dL().viewer.togglePlankOutline(!1),r.scene3D.updateRenderMode(n),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderTranslucent=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:dL().viewer.updateTransparentMode(e?QA.Translucent:QA.Unset),dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 3:case"end":return t.stop()}}),t,this)})))})),t.$actionModelHint=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({overrideMaterialOption:e}));case 2:dL().viewer.triggerReducer(),this.emit(dI.renderModeChange);case 4:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleSelectModel=t.unitCreator.sync((function(t){t.every(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({selectable:e}));case 2:case"end":return t.stop()}}),t,this)})))})),t.$actionSetInteractionPriority=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){var r=Object.assign(t,{interactionPriority:l_(l_({},t.interactionPriority),e)});dL().viewer.setInteractionPriorityConfig(r.interactionPriority.hardware,r.interactionPriority.paramModel)}))})),t.$actionSetCustomModelMaterial=t.unitCreator.sync((function(t){t.latest(f_().mark((function t(e){return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(nE.put)(this.$actionMergeState.message({customModelMaterial:e}));case 2:dL().viewer.triggerReducer();case 3:case"end":return t.stop()}}),t,this)})))})),t}return e=l,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var t=this;d_(I_(l.prototype),"init",this).call(this),dL().viewer.registerReducer((function(e,r,n){var o=t.state.state.customModelMaterial[e.id]||{},i=o.opacity,a=o.color;n.opacity=e.isAppendHardware?1:i,n.outlineMode=e.outlineMode,n.color=a})),dL().viewer.registerReducer((function(e,r,n){var o=e.getAssembly(),i=!0;o&&(i=!o.getInvisible()),i&&(i=!e.getInvisible()),e.isAppendHardware&&(n.overrideMaterial=t.state.state.overrideMaterialOption[e.id]),n.visible=i}))}},{key:"getAllHardwares",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware}))}},{key:"disableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=or.OutlineMode.Disabled}))}},{key:"enableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=or.OutlineMode.Outlined}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return!t.isAppendHardware}))}},{key:"getAllCustomModels",value:(u=c_(f_().mark((function t(){var e;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAllParamModels(),t.abrupt("return",e.map((function(t){return uS(t,{origin:G.SENSE})})));case 2:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getCustomModelById",value:(s=c_(f_().mark((function t(e){var r;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(e))){t.next=3;break}return t.abrupt("return",uS(r,{origin:G.SENSE}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"save",value:(a=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,c,A;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,n=this.getStateManager().core.pad,(o=new US(n.findModelOrAssemblyModelById)).addParamModelLite.apply(o,i_(r)),t.next=6,o.attach();case 6:return t.next=8,Promise.all(r.map((function(t){return cS(t,o)})));case 8:i=t.sent,a=[],s=[],u=o_(i);try{for(u.s();!(c=u.n()).done;)(A=c.value).create&&A.custom&&A.model&&a.push(A),!A.create&&A.model&&s.push(A.model)}catch(t){u.e(t)}finally{u.f()}(a.length||s.length)&&a.length&&a.forEach((function(t){var e;null===(e=t.custom)||void 0===e||e.addParamModels(t.model)})),dL().viewer.triggerReducer();case 15:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"focusFace",value:function(t){var e=V_().viewParamModel.state.state.currModelId;if(e){var r,n=this.getStateManager(),o=n.core,i=n.scene3D,a=o.design.getCustom().getParamModels().find((function(t){return t.$id===e})),s=o.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e})),u=(a||s).getBox3(),c=u.getPosition(),A=u.getSize().length()*rC,l=u.getMatrix();switch(t){case Ee.Right:r=new _e.default(A,0,0).applyMatrix4(l);break;case Ee.Left:r=new _e.default(-A,0,0).applyMatrix4(l);break;case Ee.Front:r=new _e.default(0,-A,0).applyMatrix4(l);break;case Ee.Back:r=new _e.default(0,A,0).applyMatrix4(l);break;case Ee.Top:this.focusFace(Ee.Front),r=new _e.default(0,0,A).applyMatrix4(l);break;case Ee.Bottom:this.focusFace(Ee.Front),r=new _e.default(0,0,-A).applyMatrix4(l)}i.updateCameraAttributes({lookAt:c,position:r})}}},{key:"updateCameraType",value:function(t){this.getStateManager().scene3D.updateCameraType(t===pe.Orthographic?ob.a.Orthographic:ob.a.Perspective,!0)}},{key:"lookAt",value:(i=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.keepView,o=void 0===n||n,i=this.getStateManager(),a=i.scene3D,s=Ab(r)){t.next=5;break}throw new Error("".concat(r,"模型不存在"));case 5:if(!lb(s)){t.next=8;break}throw new Error("".concat(r,"模型不可见"));case 8:if(u=s.getConcatenatedBox3(),c=u.getPosition(),!o){t.next=18;break}return A=a.state.cameraAttributes,l=A.lookAt,f=A.position,h=f.clone().sub(l.clone()).normalize(),p=f.distance(l),t.next=16,fb({lookAt:c,position:c.clone().add(h.clone().mul(p))});case 16:t.next=20;break;case 18:return t.next=20,fb({lookAt:c});case 20:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"adaptViewer",value:(o=c_(f_().mark((function t(e){var r,n,o,i,a,s,u,A,l,f,h,p,d,g,y,v,m,I,E,C,b,B,w,P,S,_,Q,O,D,x,M,R,T,j,L,k,N,F,G,U;return f_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,!((n=e.scale)<=0)){t.next=4;break}throw new Error("不支持小于等于".concat(0," 的比例"));case 4:if(o=this.getStateManager(),i=o.scene3D,a=Ab(r)){t.next=8;break}throw new Error("".concat(r,"模型不存在"));case 8:if(!lb(a)){t.next=11;break}throw new Error("".concat(r,"模型不可见"));case 11:if(s=a.getConcatenatedBox3(),u=s.getPoints().map((function(t){return new c.Point3d(t)})),l=(A=GS).getCamera(),f=u.map((function(t){return new or.Vector3(t.x,t.y,t.z).applyMatrix4(l.matrixWorldInverse)})),h=new c.BBox3d,f.forEach((function(t){h.addPoint(t)})),p=i.state.perspectiveCameraFov,d=i.state.cameraAttributes,g=d.lookAt,y=d.position,v=d.frustumSize,m=d.near,I=d.far,E=A.getSize(),C=E.width/E.height,b=h.width,B=h.height,w=h.depth,P=new c.Vector3d(g),S=w/2,_=n/100,!(l instanceof or.PerspectiveCamera)){t.next=39;break}return Q=l.zoom,O=p/2,D=B/2/_*Q/Math.tan(O*(Math.PI/180)),x=180*Math.atan(Math.tan(O*Math.PI/180)*C)/Math.PI,M=b/2/_*Q/Math.tan(x*(Math.PI/180)),R=Math.max(M,D),T=Object(Ql.a)(R+S,m+S,I-S),j=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(T)),t.next=37,fb({position:new _e.default(j.x,j.y,j.z)});case 37:t.next=47;break;case 39:return L=B/_/v,k=b/_/(v*C),N=Math.max(L,k),F=(m+I)/2,G=Object(Ql.a)(F,m+S,I-S),U=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(G)),t.next=47,fb({frustumSize:N*v,position:new _e.default(U.x,U.y,U.z)});case 47:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&p_(e.prototype,r),n&&p_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(pu.AXR);function w_(t){return(w_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function P_(t){return function(t){if(Array.isArray(t))return x_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||D_(t)||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_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function __(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?S_(Object(r),!0).forEach((function(e){Q_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Q_(t,e,r){return(e=T_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O_(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||D_(t,e)||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 D_(t,e){if(t){if("string"==typeof t)return x_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x_(t,e):void 0}}function x_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function M_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T_(n.key),n)}}function T_(t){var e=function(t,e){if("object"!=w_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w_(e)?e:String(e)}function j_(){return(j_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=L_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function L_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=G_(t)););return t}function k_(t,e){return(k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N_(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=G_(t);if(e){var o=G_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return F_(this,r)}}function F_(t,e){if(e&&("object"===w_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function G_(t){return(G_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var U_={rawSelected:[],selectedData:[],selectedDataV2:[]},z_=function(t,e){var r=t.entityId+"%%"+t.entityType.toString(),n=e.entityId+"%%"+e.entityType.toString();return r>n?1:r===n?0:-1},Y_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k_(t,e)}(i,t);var e,r,n,o=N_(i);function i(){var t;return M_(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create(U_).mutable(),t.onModelsChange=function(){var e=t.selected.map((function(e){return t.stateManager.core.pad.findModel(e.entityId)})).filter((function(t){return!!t})),r=t.state.state.selectedData;e.length===r.length&&Object(Or.unzip)([e,r]).every((function(t){var e=O_(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return __(__({},t),{},{selectedData:e})})),t.emit(i.EVENT_SELECT_CHANGED))},t.onModelChangeV2=function(){setTimeout((function(){t.onModelsChange()}),0);var e=t.stateManager.core,r=e.pad,n=e.fittingDesign,o=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=n.getArcSquareGrooveModels(),h=t.rawSelected.map((function(t){switch(t.entityType){case DA:return r.findModelEx(t.entityId,Bp);case OA:return r.findParamModelAssembly(t.entityId);case II:return o.find((function(e){return e.id===t.entityId}));case EI:return a.find((function(e){return e.id===t.entityId}));case PI:return s.find((function(e){return e.id===t.entityId}));case SI:return[].concat(P_(u),P_(f)).find((function(e){return e.id===t.entityId}));case _I:return c.find((function(e){return e.id===t.entityId}));case QI:return A.find((function(e){return e.id===t.entityId}));case OI:return l.find((function(e){return e.id===t.entityId}));default:return}})).filter((function(t){return!!t})),p=t.state.state.selectedDataV2;p.length===h.length&&Object(Or.unzip)([p,h]).every((function(t){var e=O_(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return __(__({},t),{},{selectedDataV2:h})})),t.emit(i.EVENT_SELECT_CHANGED_V2))},t._onSelectionChange=function(){t.onStateChange()},t}return e=i,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(t){this.selectionStateManager.select(t)}},{key:"unSelect",value:function(t){this.selectionStateManager.unSelect(t)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){j_(G_(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),j_(G_(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(t){j_(G_(i.prototype),"onEnable",this).call(this,t),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Wf.a,this._onSelectionChange),this.stateManager.core.pad.on(wp.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),_r.on(wr.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(t){this.stateManager.core.pad.off(wp.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),_r.off(wr.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return U_})),this.selectionStateManager.off(Wf.a,this._onSelectionChange),this.rawSelected=[],this.selected=[],j_(G_(i.prototype),"onDisable",this).call(this,t)}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value;if(t.sort(z_),this.rawSelected!==t){this.rawSelected=t;var e=this.resolveSelected(t)||[];this.selectedIsChanged(this.selected,e)&&(this.selected=e),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(t){return t.filter((function(t){return t.entityType===DA}))}},{key:"selectedIsChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),n=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),o=0,i=n.length;o<i;++o)if(r[o]!==n[o])return!0;return!1}}])&&R_(e.prototype,r),n&&R_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.AXR);Y_.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",Y_.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var H_={entry:VC,scene:B_,select:Y_,fittingDesign:jw,baseDesignInfo:rE,viewParamModel:$w,rulerLine:YP,detection:hP};function V_(){return dL().axr.axrs}var q_=Object(wA.getConnector)(),W_=q_.connect,K_=q_.setRootState;function J_(t,e,r){return W_((function(){return t(V_(),dL().getStateManager())}),e,r)}var X_=r(504),Z_=r.n(X_),$_=r(910),tQ=r.n($_);function eQ(t){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oQ(n.key),n)}}function oQ(t){var e=function(t,e){if("object"!=eQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eQ(e)?e:String(e)}function iQ(t,e){return(iQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=uQ(t);if(e){var o=uQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sQ(this,r)}}function sQ(t,e){if(e&&("object"===eQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uQ(t){return(uQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cQ,AQ=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iQ(t,e)}(i,t);var e,r,n,o=aQ(i);function i(){return rQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.tip,r=t.noImg,n=t.imgSrc,o=t.className;return yu.a.createElement("div",{className:Z_()(tQ.a.empty,o)},!r&&yu.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),e&&yu.a.createElement("p",null,e))}}])&&nQ(e.prototype,r),n&&nQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent);function lQ(t){return(lQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fQ=["prefixCls","className","disabled","onDragStartT","onDragMoveT","onDragEndT","onDragCancelT"];function hQ(){return(hQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function pQ(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function dQ(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return gQ(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gQ(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function gQ(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IQ(n.key),n)}}function mQ(t,e,r){return e&&vQ(t.prototype,e),r&&vQ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IQ(t){var e=function(t,e){if("object"!=lQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lQ(e)?e:String(e)}function EQ(t,e){return(EQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=BQ(t);if(e){var o=BQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bQ(this,r)}}function bQ(t,e){if(e&&("object"===lQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function BQ(t){return(BQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wQ="tui-draggable",PQ={prefixCls:wQ},SQ="".concat(wQ,"-ignore"),_Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&EQ(t,e)}(r,t);var e=CQ(r);function r(){var t;return yQ(this,r),(t=e.apply(this,arguments)).elementRef=gu.createRef(),t.listening=!1,t.waitingMove=!1,t.handleMouseDown=function(e){var r=e.nativeEvent.target;r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLElement&&r.classList.contains(SQ)||function(){var t,r=dQ(e.nativeEvent.composedPath());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n instanceof HTMLElement&&n.classList.contains(SQ))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}()||(t.handleCancel(),0===e.button&&t.startDrag(e))},t.handleMouseMove=function(e){var r=t.props,n=r.onDragMoveT,o=r.onDragStartT,i=new QQ(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});if(t.waitingMove){if(!i.moved)return;t.waitingMove=!1;var a=o&&o(e,i);a&&a.start||t.clearDragging()}else n&&n(e,i);e.preventDefault()},t.handleMouseUp=function(e){var r=t.props.onDragEndT;if(!t.waitingMove){var n=new QQ(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});r&&r(e,n)}t.clearDragging()},t}return mQ(r,[{key:"componentDidUpdate",value:function(t){!t.disabled&&this.props.disabled&&this.handleCancel()}},{key:"componentWillUnmount",value:function(){this.handleCancel()}},{key:"render",value:function(){var t,e,r,n=this.props,o=n.prefixCls,i=n.className,a=n.disabled,s=(n.onDragStartT,n.onDragMoveT,n.onDragEndT,n.onDragCancelT,pQ(n,fQ)),u=Z_()(o,i,(t={},e="".concat(o,"-disabled"),r=a,(e=IQ(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t));return gu.createElement("div",hQ({ref:this.elementRef,className:u,onMouseDown:a?void 0:this.handleMouseDown},s),this.props.children)}},{key:"startDrag",value:function(t){if((e=t.nativeEvent)!==cQ&&(cQ=e,1)){var e;if(this.startPageX=t.pageX,this.startPageY=t.pageY,this.elementRef.current){var r=this.elementRef.current.getBoundingClientRect();this.startPositionX=r.left,this.startPositionY=r.top}this.addDragListeners(),t.preventDefault()}}},{key:"addDragListeners",value:function(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.listening=!0,this.waitingMove=!0}},{key:"removeDragListeners",value:function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.listening=!1,this.waitingMove=!1}},{key:"handleCancel",value:function(){if(this.listening){var t=this.props.onDragCancelT;t&&t()}this.clearDragging()}},{key:"clearDragging",value:function(){this.removeDragListeners()}}]),r}(gu.Component);_Q.defaultProps=PQ;var QQ=function(){function t(e,r){yQ(this,t),this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.dx=this.pageX-r.startPageX,this.dy=this.pageY-r.startPageY,this.offsetX=r.startPageX-r.startPositionX,this.offsetY=r.startPageY-r.startPositionY}return mQ(t,[{key:"moved",get:function(){return Math.abs(this.dx)>=1||Math.abs(this.dy)>=1}}]),t}(),OQ=_Q,DQ=r(895);function xQ(t){return(xQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function MQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TQ(n.key),n)}}function TQ(t){var e=function(t,e){if("object"!=xQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xQ(e)?e:String(e)}function jQ(t,e){return(jQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NQ(t);if(e){var o=NQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kQ(this,r)}}function kQ(t,e){if(e&&("object"===xQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NQ(t){return(NQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var FQ=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jQ(t,e)}(i,t);var e,r,n,o=LQ(i);function i(){return MQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props;return yu.a.createElement(DQ.b,t)}}])&&RQ(e.prototype,r),n&&RQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(gu.PureComponent),GQ=r(911),UQ=r.n(GQ);function zQ(t){return(zQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function YQ(){return(YQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function HQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qQ(n.key),n)}}function qQ(t){var e=function(t,e){if("object"!=zQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zQ(e)?e:String(e)}function WQ(t,e){return(WQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KQ(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=XQ(t);if(e){var o=XQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JQ(this,r)}}function JQ(t,e){if(e&&("object"===zQ(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function XQ(t){return(XQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}gu.PureComponent;var ZQ,$Q=r(516),tO=r.n($Q);function eO(t){return(eO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uO(n.key),n)}}function oO(t,e){return(oO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sO(t);if(e){var o=sO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aO(this,r)}}function aO(t,e){if(e&&("object"===eO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sO(t){return(sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uO(t){var e=function(t,e){if("object"!=eO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eO(e)?e:String(e)}function cO(){return yu.a.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"14px",height:"14px",fill:"#FFAB00","aria-hidden":"true"},yu.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}))}!function(t){t.Warning="warning"}(ZQ||(ZQ={}));var AO,lO,fO,hO=(AO={},lO=ZQ.Warning,fO=yu.a.createElement(cO,null),(lO=uO(lO))in AO?Object.defineProperty(AO,lO,{value:fO,enumerable:!0,configurable:!0,writable:!0}):AO[lO]=fO,AO),pO={x:0,y:0},dO=J_((function(t){return{detection:t.detection.state}}),(function(t){return{message:t.detection.message,description:t.detection.description,defaultPosition:t.detection.defaultPosition,show:t.detection.show}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oO(t,e)}(i,t);var e,r,n,o=iO(i);function i(){var t;return rO(this,i),(t=o.apply(this,arguments)).state={position:pO},t.elementRef=yu.a.createRef(),t.dragStartPosition=pO,t.prevTranslate=pO,t.getAbsolutePosition=function(t){var e=t.x,r=t.y,n=window;return{x:e*n.innerWidth,y:r*n.innerHeight}},t.handleResize=function(){var e=t.elementRef.current;if(e){var r=t.getAbsolutePosition(t.prevTranslate),n=r.x,o=r.y,i=t.props.defaultPosition,a=t.getAbsolutePosition(i),s=window.innerWidth-a.x-e.clientWidth,u=window.innerHeight-a.y-e.clientHeight;t.setState({position:{x:Math.min(n,s),y:Math.min(o,u)}})}},t.handleDragStart=function(){return t.dragStartPosition=t.state.position,{start:!0}},t.handleDragMove=function(e,r){var n=t.elementRef.current;if(n){var o=t.props.defaultPosition,i=t.getAbsolutePosition(o),a=window.innerWidth-i.x-n.clientWidth,s=window.innerHeight-i.y-n.clientHeight,u={x:Object(Ql.a)(t.dragStartPosition.x+r.dx,0-i.x,a),y:Object(Ql.a)(t.dragStartPosition.y+r.dy,0-i.y,s)};t.setState({position:u}),t.prevTranslate={x:u.x/window.innerWidth,y:u.y/window.innerHeight}}},t.handleDragEnd=function(){t.dragStartPosition=pO},t.handleDragCancel=function(){t.dragStartPosition=pO},t}return e=i,(r=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"render",value:function(){var t=this.props,e=t.message,r=t.description,n=t.defaultPosition,o=t.show,i=this.state.position,a="translate("+i.x+"px, "+i.y+"px)";return o?yu.a.createElement(OQ,{style:{transform:a,left:"".concat(100*n.x,"%"),top:"".concat(100*n.y,"%")},className:tO.a.noticeDraggable,onDragStartT:this.handleDragStart,onDragMoveT:this.handleDragMove,onDragEndT:this.handleDragEnd,onDragCancelT:this.handleDragCancel},yu.a.createElement("div",{className:tO.a.noticeContent,ref:this.elementRef},yu.a.createElement("span",{className:tO.a.noticeIcon},hO[ZQ.Warning]),yu.a.createElement("div",{className:tO.a.noticeMessage},e),yu.a.createElement("div",{className:tO.a.noticeDescription},r))):null}}])&&nO(e.prototype,r),n&&nO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent)),gO=r(912),yO=r.n(gO),vO=r(556);function mO(t){return(mO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function IO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bO(n.key),n)}}function CO(t,e,r){return e&&EO(t.prototype,e),r&&EO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bO(t){var e=function(t,e){if("object"!=mO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mO(e)?e:String(e)}function BO(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wO(t,e)}function wO(t,e){return(wO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function PO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_O(t);if(e){var o=_O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return SO(this,r)}}function SO(t,e){if(e&&("object"===mO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _O(t){return(_O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var QO=Symbol("layout"),OO=J_((function(t){return{status:t.entry.state}}),(function(t){return{status:t.status.main}}),function(t){BO(r,t);var e=PO(r);function r(){return IO(this,r),e.apply(this,arguments)}return CO(r,[{key:"render",value:function(){return this.state.views.map((function(t){return t.content}))}}]),r}(vO.a)),DO=function(t){BO(r,t);var e=PO(r);function r(){return IO(this,r),e.apply(this,arguments)}return CO(r,[{key:"render",value:function(){return yu.a.createElement(OO,{mountPointId:QO})}}]),r}(yu.a.PureComponent),xO=r(165);function MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TO(n.key),n)}}function TO(t){var e=function(t,e){if("object"!=UO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==UO(e)?e:String(e)}function jO(){return(jO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LO(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function LO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=GO(t)););return t}function kO(t,e){return(kO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function NO(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=GO(t);if(e){var o=GO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return FO(this,r)}}function FO(t,e){if(e&&("object"===UO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function GO(t){return(GO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function UO(t){return(UO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var zO=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":UO(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};function YO(t,e){return t===e||t&&e&&t.equals(e)}var HO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kO(t,e)}(i,t);var e,r,n,o=NO(i);function i(){var t;return MO(this,i),(t=o.apply(this,arguments)).basicMaterial=new or.default.LineBasicMaterial({transparent:!0}),t.dashedMaterial=new or.default.LineDashedMaterial({transparent:!0,gapSize:20,dashSize:20}),t}return e=i,(r=[{key:"buildMesh",value:function(){var t=new or.default.Line(void 0,void 0);return t.outlineMode=or.default.OutlineMode.Disabled,t}},{key:"componentDidMount",value:function(){jO(GO(i.prototype),"componentDidMount",this).call(this),this.update({})}},{key:"componentDidUpdate",value:function(t,e){jO(GO(i.prototype),"componentDidUpdate",this).call(this,t,e),this.update(t)}},{key:"update",value:function(t){var e=this.props,r=e.start,n=e.end,o=e.dashed,i=e.interactive,a=void 0===i||i,s=e.color,u=e.alwaysTop,c=void 0===u||u,A=e.visible,l=void 0===A||A,f=e.opacity;if(!YO(t.start,r)||!YO(t.end,n)){var h=[];h.push(r.x,r.y,r.z),h.push(n.x,n.y,n.z);var p=new or.default.BufferGeometry;p.addAttribute("position",new or.default.BufferAttribute(new Float32Array(h),3)),or.geomOperator.computeLineDistances(p),this.mesh.geometry=p}this.mesh.setMaterials(o?this.dashedMaterial:this.basicMaterial),this.mesh.expectOnlyMaterial().setValues({color:s,depthTest:!c,opacity:f}),this.mesh.visible=l,this.mesh.renderOrder=c?999:0,this.mesh.interactionLayers=new or.default.Layers,this.mesh.interactionLayers.set(a?0:1)}}])&&RO(e.prototype,r),n&&RO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(92).b),VO=HO=zO([xO.a],HO),qO=r(393);function WO(t){return(WO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function JO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?KO(Object(r),!0).forEach((function(e){XO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function XO(t,e,r){return(e=tD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tD(n.key),n)}}function tD(t){var e=function(t,e){if("object"!=WO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WO(e)?e:String(e)}function eD(t,e){return(eD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=oD(t);if(e){var o=oD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nD(this,r)}}function nD(t,e){if(e&&("object"===WO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function oD(t){return(oD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{cameraPosition:t.scene3D.cameraAttributes.position,cameraLookAt:t.scene3D.cameraAttributes.lookAt,frustumSize:t.scene3D.cameraAttributes.frustumSize}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eD(t,e)}(i,t);var e,r,n,o=rD(i);function i(){return ZO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.position,r=t.text,n=t.style;return yu.a.createElement(qO.b,null,(function(t){var o=t.sceneToCanvas(e),i={position:"absolute",top:0,left:0,transform:"translate(-50%, -50%) translate(".concat(o.x,"px, ").concat(o.y,"px)")};return yu.a.createElement("div",{style:JO(JO({},n),i)},r)}))}}])&&$O(e.prototype,r),n&&$O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));function aD(t){return(aD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sD(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||cD(t,e)||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 uD(t){return function(t){if(Array.isArray(t))return AD(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||cD(t)||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 cD(t,e){if(t){if("string"==typeof t)return AD(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?AD(t,e):void 0}}function AD(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hD(n.key),n)}}function hD(t){var e=function(t,e){if("object"!=aD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aD(e)?e:String(e)}function pD(t,e){return(pD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yD(t);if(e){var o=yD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gD(this,r)}}function gD(t,e){if(e&&("object"===aD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yD(t){return(yD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vD=J_((function(t){return{rulerLine:t.rulerLine.state}}),(function(t){return{dimensionRulers:new Map(uD(t.rulerLine.dimensionRulers.entries()).map((function(t){var e=sD(t,2);return[e[0],e[1].rulerConfig]}))),spacingDistanceRulers:new Map(uD(t.rulerLine.spacingDistanceRulers.entries()).map((function(t){var e=sD(t,2);return[e[0],e[1].rulerConfigs]})))}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pD(t,e)}(i,t);var e,r,n,o=dD(i);function i(){return lD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.dimensionRulers,r=t.spacingDistanceRulers;return yu.a.createElement(yu.a.Fragment,null,uD(e.entries()).map((function(t){var e=sD(t,2),r=e[0],n=e[1],o=n.mainLine,i=n.capLines,a=n.lineStyle,s=a.color,u=a.opacity,c=n.textStyle,A=n.text,l=n.textPosition;return yu.a.createElement(gu.Fragment,{key:r},[o].concat(uD(i)).map((function(t,e){return yu.a.createElement(VO,{opacity:u,color:s,key:e,start:t.start,end:t.end})})),yu.a.createElement(iD,{position:l,text:A,style:c}))})),uD(r.entries()).map((function(t){var e=sD(t,2),r=e[0];return e[1].map((function(t,e){var n=t.mainLine,o=t.capLines,i=t.lineStyle,a=i.color,s=i.opacity,u=t.textStyle,c=t.text,A=t.textPosition;return yu.a.createElement(gu.Fragment,{key:"".concat(r,"-").concat(e)},[n].concat(uD(o)).map((function(t,e){return yu.a.createElement(VO,{opacity:s,color:a,key:e,start:t.start,end:t.end})})),yu.a.createElement(iD,{position:A,text:c,style:u}))}))})))}}])&&fD(e.prototype,r),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent)),mD=r(213);function ID(t){return(ID="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ED(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bD(n.key),n)}}function CD(t,e,r){return e&&ED(t.prototype,e),r&&ED(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bD(t){var e=function(t,e){if("object"!=ID(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ID(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ID(e)?e:String(e)}function BD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wD(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&PD(t,e)}function PD(t,e){return(PD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=QD(t);if(e){var o=QD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _D(this,r)}}function _D(t,e){if(e&&("object"===ID(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function QD(t){return(QD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var OD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){var e=t.scene3D;return{cameraType:e.cameraType,cameraAttributes:e.cameraAttributes,initCameraAttributes:e.initCameraAttributes,perspectiveCameraMode:e.perspectiveCameraMode,perspectiveCameraFov:e.perspectiveCameraFov,groundGridConfig:e.groundGridConfig,enableCameraAnimation:e.enableCameraAnimation,renderMode:e.renderMode,cameraControlMode:e.cameraControlMode}}),function(t){wD(r,t);var e=SD(r);function r(){return BD(this,r),e.apply(this,arguments)}return CD(r)}(bc.ob.DeprecatedFullScene3D)),DD=function(t){wD(r,t);var e=SD(r);function r(){return BD(this,r),e.apply(this,arguments)}return CD(r,[{key:"render",value:function(){return this.state.views.map((function(t){t.key;return t.content}))}}]),r}(vO.a),xD=J_((function(){return{}}),(function(){return{}}),function(t){wD(r,t);var e=SD(r);function r(){var t;return BD(this,r),(t=e.apply(this,arguments)).onInit=function(t){var e=t.viewer.config;zS(t.viewer),e.autoInstance.enabled.set(!0),e.popMeshMerge.enabled.set(!0),e.background.active.set(or.BackgroundMode.SolidColorBackground),e.background.solid.color.set(new or.Color(pI.sceneBG)),e.ground.enabled.set(!1),e.effects.planarShadow.enabled.set(!1),e.effects.taa.enabled.set(!1),e.staticFrameCache.enabled.set(!1),e.isExtraCopyBeforeScreenEnabled.set(!1),e.effects.ao.enabled.set(!1),dL().viewer.onScene3DInit(t)},t.onGrabStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateGrabing(!0)},t.onGrabEnd=function(){t.props.rootState.scene3D.updateGrabing(!1)},t.onZoomStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateZooming(!0)},t.onZoomEnd=function(){t.props.rootState.scene3D.updateZooming(!1)},t.onCameraAnimationEnd=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1)},t}return CD(r,[{key:"render",value:function(){var t=this.props,e=t.rootState.scene3D,r=t.containerId,n=t.size;return yu.a.createElement(OD,{enableAO:!1,onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:e.updateScale,onCameraAttributesChange:e.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd,orthCameraDirectionChangeable:!0,cameraControlMode:mD.a.defaultMode},yu.a.createElement(DD,{mountPointId:jI.scene3D}))}}]),r}(yu.a.PureComponent));function MD(t){return(MD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function RD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jD(n.key),n)}}function jD(t){var e=function(t,e){if("object"!=MD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=MD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==MD(e)?e:String(e)}function LD(t,e){return(LD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=FD(t);if(e){var o=FD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ND(this,r)}}function ND(t,e){if(e&&("object"===MD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function FD(t){return(FD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GD=J_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{size:t.scene3D.size}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&LD(t,e)}(i,t);var e,r,n,o=kD(i);function i(){var t;return RD(this,i),(t=o.apply(this,arguments)).rootRef=yu.a.createRef(),t.updateLayout=Object(Or.throttle)((function(){var e=t.rootRef.current;if(e){var r=e.getBoundingClientRect();t.props.rootState.scene3D.updateSize(new bn.default(r.width,r.height))}}),200),t}return e=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 t=this.props,e=t.size,r=t.className;return yu.a.createElement("div",{ref:this.rootRef,id:hI.SCENE_ID,className:r},yu.a.createElement(xD,{containerId:hI.SCENE_ID,size:new c.Vector2d(e.x,e.y)}))}}])&&TD(e.prototype,r),n&&TD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));r(1380);function UD(t){return(UD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YD(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,HD(n.key),n)}}function HD(t){var e=function(t,e){if("object"!=UD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==UD(e)?e:String(e)}function VD(t,e){return(VD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qD(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=KD(t);if(e){var o=KD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return WD(this,r)}}function WD(t,e){if(e&&("object"===UD(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function KD(t){return(KD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var JD=J_((function(){return{}}),(function(){return{}}),function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&VD(t,e)}(i,t);var e,r,n,o=qD(i);function i(){return zD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return yu.a.createElement(yu.a.Fragment,null,yu.a.createElement(vI.a,{mountPointId:QO},yu.a.createElement(GD,{key:"s3",className:yO.a.scene3D}),yu.a.createElement(dO,null)),yu.a.createElement(vI.a,{mountPointId:jI.scene3D},yu.a.createElement(vD,null)))}}])&&YD(e.prototype,r),n&&YD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(yu.a.PureComponent));function XD(t,e){if(t.length!==e.length)return[];for(var r=t.length,n=[],o=0;o<r-1;o++)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].x,e[o].y,e[o].z),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+1].x,t[o+1].y,t[o+1].z);return n}function ZD(t){return(ZD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tx(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$D(Object(r),!0).forEach((function(e){ex(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ex(t,e,r){var n;return n=function(t,e){if("object"!=ZD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ZD(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rx(t){var e=t.color,r=t.side,n=t.opacity,o=t.points,i=t.matrix,a=t.depth,s=new or.Shape,u=new or.MeshBasicMaterial(tx({color:e,side:r},PC(n)));s.setFromPoints(o.map((function(t){return new or.Vector2(t.x,t.y)})));var c=or.shapeBuilder.shape({shapes:s}),A=new or.Mesh(c,u);return A.position.set(0,0,a),A.applyMatrix(i),SC(A),A}function nx(t){var e=t.matrix,r=t.side,n=t.color,o=t.opacity,i=new or.MeshBasicMaterial(tx({side:r,color:n},PC(o))),a=new or.BufferGeometry,s=XD(t.topPoints,t.bottomPoints);a.addAttribute("position",new or.BufferAttribute(new Float32Array(s),3));var u=new or.Mesh(a,i);return u.applyMatrix(e),SC(u),u}function ox(t){var e=or.geomOperator.createEdge(t,25),r=new or.LineBasicMaterial({color:pI.outline,depthTest:!0,depthWrite:!0}),n=new or.LineSegments(e,r);return SC(n),n}function ix(t){return function(t){if(Array.isArray(t))return ux(t)}(t)||cx(t)||sx(t)||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 ax(t){return function(t){if(Array.isArray(t))return t}(t)||cx(t)||sx(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 sx(t,e){if(t){if("string"==typeof t)return ux(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ux(t,e):void 0}}function ux(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cx(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Ax(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lx(t,e,r){return(e=hx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fx(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hx(n.key),n)}}function hx(t){var e=function(t,e){if("object"!=vx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vx(e)?e:String(e)}function px(t,e){return(px=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yx(t);if(e){var o=yx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gx(this,r)}}function gx(t,e){if(e&&("object"===vx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yx(t){return(yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function vx(t){return(vx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var mx,Ix=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":vx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ex=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":vx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Cx=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&px(t,e)}(i,t);var e,r,n,o=dx(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=SI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.shapeArrPointsInGroove,a=t.grooveStart,s=t.grooveEnd,u=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ax(Object(r),!0).forEach((function(e){lx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ax(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:or.Side.DoubleSide,color:r},PC(n))),c=i.map((function(e){var r=new or.Shape,n=ax(e),i=n[0],a=n.slice(1);r.moveTo(i.x,i.y),a.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(i.x,i.y);var s=or.shapeBuilder.extrude(r,{bevelEnabled:!1,depth:o}),c=new or.Mesh(s,u),A=pC(t.grooveFacePointToGlobalMatrix());return c.applyMatrix(A),SC(c),c})),A=c.map((function(t){var e=ox(t.geometry);return t.add(e),e}));e.wireFrames=A,e.updateWireFrameVisibility();var l=new or.Group;return l.add(c),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&l.add([a,s].map((function(e,r){var n=new or.Mesh(Bx,0===r?wx:Px);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),l},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&fx(e.prototype,r),n&&fx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function bx(t){return dP([].concat(ix(t.getTopRenderPoints()),ix(t.getBottomRenderPoints())))}Cx=Ix([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.squareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:bx(this.$model)}}))]),Ex("design:paramtypes",["function"==typeof(mx=void 0!==bs&&bs)?mx:Object])],Cx);var Bx=new or.shapeBuilder.SphereBufferGeometry(3),wx=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),Px=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Sx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sx(Object(r),!0).forEach((function(e){Qx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sx(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qx(t,e,r){return(e=Dx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ox(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dx(n.key),n)}}function Dx(t){var e=function(t,e){if("object"!=jx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jx(e)?e:String(e)}function xx(t,e){return(xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tx(t);if(e){var o=Tx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rx(this,r)}}function Rx(t,e){if(e&&("object"===jx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tx(t){return(Tx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jx(t){return(jx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Lx,kx,Nx=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Fx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gx=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xx(t,e)}(i,t);var e,r,n,o=Mx(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).$model=t,r.entityMap=e,r.entityType=II,r.wireFrames=[],r.renderCubeMesh=function(){var t=r.$model,e=t.position,n=t.size,o=t.rotate,i=t.visible,a=t.viewColor,s=t.opacity,u=or.shapeBuilder.box({width:n.x,height:n.y,depth:n.z}),c=new or.MeshBasicMaterial(_x({color:a,visible:i},PC(s))),A=new or.Mesh(u,c);A.position.set(e.x,e.y,e.z),A.rotation.set(o.x,o.y,o.z),A.visible=i,SC(A);var l=[A].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return r.wireFrames=l,r.updateWireFrameVisibility(),A},r.renderCylinderMesh=function(){var t=r.$model,e=t.position,n=t.visible,o=t.rotate,i=t.height,a=t.viewColor,s=t.opacity,u=t.fittingData.diameter/2,c=or.shapeBuilder.cylinder({radiusTop:u,radiusBottom:u,height:i}),A=new or.MeshBasicMaterial(_x({color:a,visible:n},PC(s))),l=new or.Mesh(c,A);l.position.set(e.x,e.y,e.z),l.rotation.set(o.x,o.y,o.z),SC(l);var f=[l].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return r.wireFrames=f,r.updateWireFrameVisibility(),l},r.entityId=t.id,r}return e=i,(r=[{key:"createRenderMesh",value:function(){var t=this.$model.type;return t===J.GROOVE?this.renderCubeMesh():t===J.HOLE?this.renderCylinderMesh():void 0}},{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Ox(e.prototype,r),n&&Ox(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function Ux(t){return function(t){if(Array.isArray(t))return zx(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return zx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zx(t,e)}(t)||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 zx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hx(t,e,r){return(e=qx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vx(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qx(n.key),n)}}function qx(t){var e=function(t,e){if("object"!=Zx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Zx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Zx(e)?e:String(e)}function Wx(t,e){return(Wx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Kx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xx(t);if(e){var o=Xx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jx(this,r)}}function Jx(t,e){if(e&&("object"===Zx(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xx(t){return(Xx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zx(t){return(Zx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Gx=Nx([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this,e=this.$model.type;return{create:function(){var e=t.createRenderMesh();return t.entityMap.set(e,{entityId:t.$model.id,entityType:II}),e},update:function(e){var r=t.$model,n=r.position,o=r.visible;e.position.set(n.x,n.y,n.z),e.visible=o,e.material&&(e.material.visible=o),t.updateWireFrameVisibility()},get interactionPriority(){return e===J.HOLE?V_().scene.state.state.interactionPriority.hole:V_().scene.state.state.interactionPriority.groove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),Fx("design:paramtypes",["function"==typeof(Lx=void 0!==Cn&&Cn)?Lx:Object,"function"==typeof(kx="undefined"!=typeof Map&&Map)?kx:Object])],Gx);var $x,tM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Zx(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},eM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Zx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},rM=bc.ib.Highlighters.generateWireGeometryForHighlighterGeometry,nM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wx(t,e)}(i,t);var e,r,n,o=Kx(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=BI,e.entityId=t.id,e}return e=i,(r=[{key:"createOutlineMesh",value:function(){var t=this.$model.hintOutline,e=t.color,r=t.opacity,n=this.$model.visible,o=function(t){var e=new or.BufferGeometry,r=t.getVertices(),n=[];t.getIndices().forEach((function(t){n.push(r[t.x],r[t.y])})),e.setAttribute("position",bc.ib.createBufferAttribute(n)),e.computeBoundingBox();var o=e.getBoundingBox().getCenter(new or.Vector3);return e.setAttribute("position",bc.ib.createBufferAttribute(n.map((function(t){return function(t,e){var r=new or.Vector3(e.x,e.y,e.z).sub(t);return t.clone().add(r)}(o,t)})))),e}(this.getGeometry()),i=new or.LineBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yx(Object(r),!0).forEach((function(e){Hx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yx(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:e},PC(r))),a=new or.LineSegments(o,i);return or.geomOperator.computeLineDistances(o),a.renderOrder=999,a.outlineMode=or.OutlineMode.Disabled,a.castPlanarShadow=!1,a.castShadow=!1,a.visible=n,i.visible=n,a}},{key:"getGeometry",value:function(){var t,e=this.$model.linkModel;return t=e instanceof Qe.CoreParamModel?e.getConcatenatedBox3():e instanceof Cn||e instanceof Ia?e.boundingBox:dP([].concat(Ux(e.getTopRenderPoints()),Ux(e.getBottomRenderPoints()))),rM(t)}}])&&Vx(e.prototype,r),n&&Vx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),oM=nM=tM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createOutlineMesh()},update:function(e){var r=t.$model.visible;e.visible=r,e.getMaterials().forEach((function(t){t.visible=r}))}}}))]),eM("design:paramtypes",["function"==typeof($x=void 0!==un&&un)?$x:Object])],nM);function iM(t){return function(t){if(Array.isArray(t))return aM(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return aM(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aM(t,e)}(t)||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 aM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uM(n.key),n)}}function uM(t){var e=function(t,e){if("object"!=hM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hM(e)?e:String(e)}function cM(t,e){return(cM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fM(t);if(e){var o=fM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lM(this,r)}}function lM(t,e){if(e&&("object"===hM(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fM(t){return(fM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hM(t){return(hM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var pM,dM,gM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hM(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":hM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cM(t,e)}(i,t);var e,r,n,o=AM(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).$model=t,r.entityMap=e,r.entityType=EI,r.wireFrames=[],r.entityId=t.id,r}return e=i,(r=[{key:"createGrooveFittingRender",value:function(){var t=this.$model,e=new or.Group,r=t.pointToGlobalMatrix(),n=t.depth,o=t.viewColor,i=t.opacity,a=t.visible,s=void 0!==a&&a,u=t.path.getAllPolygonPoints(),A=new Pe.default;A.fromString(r.toArray().join(","));var l=pC(A),f=rx({matrix:l,depth:0,points:u,color:o,side:or.Side.FrontSide,opacity:i}),h=rx({matrix:l,depth:-n,points:u,color:o,side:or.Side.BackSide,opacity:i}),p=[].concat(iM(u),[u[0]]),d=nx({matrix:l,topPoints:p.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:p.map((function(t){return new c.Point3d(t.x,t.y,-n)})),color:o,side:or.Side.DoubleSide,opacity:i});[f,h,d,e].forEach((function(t){t.visible=s}));var g=[f,h,d],y=g.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return this.wireFrames=y,this.updateWireFrameVisibility(),e.add(g),e}},{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&sM(e.prototype,r),n&&sM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function mM(t){var e=new c.BBox3d;return[].concat(iM(t.getTopRenderPoints()),iM(t.getBottomRenderPoints())).forEach((function(t){e.addPoint(new c.Point3d(t))})),new Be.default(new _e.default({x:e.width,y:e.height,z:e.depth}),new _e.default(e.center),new _e.default({x:0,y:0,z:0}))}function IM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function EM(t,e,r){return(e=bM(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bM(n.key),n)}}function bM(t){var e=function(t,e){if("object"!=_M(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_M(e)?e:String(e)}function BM(t,e){return(BM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=SM(t);if(e){var o=SM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PM(this,r)}}function PM(t,e){if(e&&("object"===_M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function SM(t){return(SM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _M(t){return(_M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vM=gM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){var e=t.createGrooveFittingRender();return t.entityMap.set(e,{entityId:t.$model.id,entityType:EI}),e},update:function(e){var r=t.$model.visible;e.traverse((function(t){t.visible=r,t instanceof or.Mesh&&t.getMaterials().forEach((function(t){t.visible=r}))})),e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.hardwareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:mM(this.$model)}}))]),yM("design:paramtypes",["function"==typeof(pM=void 0!==mo&&mo)?pM:Object,"function"==typeof(dM="undefined"!=typeof Map&&Map)?dM:Object])],vM);var QM,OM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_M(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},DM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_M(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},xM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&BM(t,e)}(i,t);var e,r,n,o=wM(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=PI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.height,n=t.color,o=t.opacity,i=t.position,a=t.rotate,s=t.radius,u=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?IM(Object(r),!0).forEach((function(e){EM(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IM(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:n},PC(o))),c=or.shapeBuilder.cylinder({radiusTop:s,radiusBottom:s,height:r}),A=new or.Mesh(c,u);A.position.set(i.x,i.y,i.z),A.rotation.set(a.x,a.y,a.z),SC(A);var l=[A].map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=l,e.updateWireFrameVisibility(),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&CM(e.prototype,r),n&&CM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function MM(t){var e=new or.BufferGeometry;if(e.index=new or.BufferAttribute(new Uint16Array(t.indices),1),e.addAttribute("position",new or.BufferAttribute(new Float32Array(t.vertices),3)),e.addAttribute("uv",new or.BufferAttribute(new Float32Array(t.textures),2)),t.normals){var r=new Float32Array(t.normals);e.addAttribute("normal",new or.BufferAttribute(r,3))}else or.geomOperator.computeNormalsByPosition(e);return e}function RM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TM(n.key),n)}}function TM(t){var e=function(t,e){if("object"!=FM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=FM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==FM(e)?e:String(e)}function jM(t,e){return(jM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LM(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NM(t);if(e){var o=NM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kM(this,r)}}function kM(t,e){if(e&&("object"===FM(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NM(t){return(NM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function FM(t){return(FM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}xM=OM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,e.material&&(e.material.visible=r),t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.holeV2}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),DM("design:paramtypes",["function"==typeof(QM=void 0!==Ia&&Ia)?QM:Object])],xM);var GM,UM=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FM(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},zM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":FM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},YM=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jM(t,e)}(i,t);var e,r,n,o=LM(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=CI,e.entityId=t.id,e}return e=i,r&&RM(e.prototype,r),n&&RM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a),HM=YM=UM([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.geometryModel,n=e.viewColor,o=e.originPoints,i=new or.Group,a=MM(r),s=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:or.Side.DoubleSide}),u=new or.Mesh(a,s);u.renderOrder=998,i.add(u),SC(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(t){var e=new or.Mesh(VM,qM);return e.position.set(t.x,t.y,t.z),e.renderOrder=999,e})));return i}(t)},update:function(){}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.bbox}}))]),zM("design:paramtypes",["function"==typeof(GM=void 0!==jo&&jo)?GM:Object])],YM),VM=new or.shapeBuilder.SphereBufferGeometry(3),qM=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function WM(t){return function(t){if(Array.isArray(t))return KM(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return KM(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KM(t,e)}(t)||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 KM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function JM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,XM(n.key),n)}}function XM(t){var e=function(t,e){if("object"!=rR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rR(e)?e:String(e)}function ZM(t,e){return(ZM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $M(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=eR(t);if(e){var o=eR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tR(this,r)}}function tR(t,e){if(e&&("object"===rR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function eR(t){return(eR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rR(t){return(rR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var nR,oR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},iR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":rR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},aR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZM(t,e)}(i,t);var e,r,n,o=$M(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=OI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.connectivePath.map((function(t){return t.getAllPolygonPoints()})).flat(),u=new Pe.default;u.fromString(n.toArray().join(","));var A=pC(u),l=rx({matrix:A,depth:0,points:s,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:-o,points:s,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(WM(s),[s[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&JM(e.prototype,r),n&&JM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function sR(t){return dP([].concat(WM(t.getTopRenderPoints()),WM(t.getBottomRenderPoints())))}function uR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cR(n.key),n)}}function cR(t){var e=function(t,e){if("object"!=pR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pR(e)?e:String(e)}function AR(t,e){return(AR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hR(t);if(e){var o=hR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fR(this,r)}}function fR(t,e){if(e&&("object"===pR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hR(t){return(hR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pR(t){return(pR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}aR=oR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.pathGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:sR(this.$model)}}))]),iR("design:paramtypes",["function"==typeof(nR=void 0!==Oa&&Oa)?nR:Object])],aR);var dR,gR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&AR(t,e)}(i,t);var e,r,n,o=lR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=DI,e.entityId=t.id,e}return e=i,r&&uR(e.prototype,r),n&&uR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a);function mR(t){var e=t.linkModel,r=t.faceId,n=e.getConcatenatedMatrix(),o=function(t){var e,r=null===(e=t.getParam("thickness"))||void 0===e?void 0:e.getData().value;return r?+r:0}(e),i=r===se.TOP?o/2:-o/2;return{position:new _e.default(0,0,i).applyMatrix4(n),rotation:(new or.Euler).setFromRotationMatrix(pC(n))}}function IR(t){var e=t.outer,r=t.inners,n=ER(e),o=r.map(ER);return n.holes=o,n}function ER(t){var e=t[0],r=new or.Shape;return r.moveTo(e.x,e.y),t.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(e.x,e.y),r}function CR(t){return function(t){if(Array.isArray(t))return bR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bR(t,e)}(t)||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 bR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function BR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wR(n.key),n)}}function wR(t){var e=function(t,e){if("object"!=OR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OR(e)?e:String(e)}function PR(t,e){return(PR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=QR(t);if(e){var o=QR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _R(this,r)}}function _R(t,e){if(e&&("object"===OR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function QR(t){return(QR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OR(t){return(OR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vR=gR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.color,r=t.opacity,n=t.faces,o=t.visible,i=t.faceId===se.TOP?or.Side.FrontSide:or.Side.BackSide,a=new or.MeshBasicMaterial({transparent:!0,opacity:r,color:e,side:i}),s=n.map(IR),u=or.shapeBuilder.shape({shapes:s}),c=new or.Mesh(u,a),A=mR(t),l=A.position,f=A.rotation;return c.position.set(l.x,l.y,l.z),c.rotation.set(f.x,f.y,f.z),c.visible=o,a.visible=o,SC(c),c}(t.$model)},update:function(e){var r=t.$model,n=r.visible,o=r.color,i=r.opacity;e.visible=n,e.expectOnlyMaterial().setValues({opacity:i,color:o,visible:n});var a=mR(t.$model),s=a.position,u=a.rotation;e.position.set(s.x,s.y,s.z),e.rotation.set(u.x,u.y,u.z)}}}))]),yR("design:paramtypes",["function"==typeof(dR=void 0!==Vo&&Vo)?dR:Object])],vR);var DR,xR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":OR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},MR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},RR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&PR(t,e)}(i,t);var e,r,n,o=SR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=bI,e.entityId=t.id,e}return e=i,r&&BR(e.prototype,r),n&&BR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(SA.a),TR=RR=xR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.plankFaces,n=e.linkModel,o=e.hintOutline,i=n.getConcatenatedMatrix(),a=new or.Group;r&&r.forEach((function(t){var e=MM(tu(t,i)),r=new or.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:t.color,opacity:t.opacity,transparent:!0,side:or.Side.DoubleSide}),n=new or.Mesh(e,r);n.renderOrder=998,SC(n),a.add(n)}));if(o){var s=n.getSize(),u=n.getWireFrames();if(!u){var c=iw(0,s),A=iw(5,s);u=[].concat(CR(Object(Or.zip)(c,[].concat(CR(c.slice(1)),[c[0]]))),CR(Object(Or.zip)(A,[].concat(CR(A.slice(1)),[A[0]]))),CR(Object(Or.zip)(c,A))).flat().map((function(t){return[t.x,t.y,t.z]})).flat()}var l=Object(Or.chunk)(u,3).map((function(t){return new _e.default(t[0],t[1],t[2]).applyMatrix4(i)})).map((function(t){return[t.x,t.y,t.z]})).flat(),f=new Sl({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});a.add(f)}return a}(t)},update:function(){}}}))]),MR("design:paramtypes",["function"==typeof(DR=void 0!==ti&&ti)?DR:Object])],RR);function jR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function LR(t,e,r){return(e=NR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NR(n.key),n)}}function NR(t){var e=function(t,e){if("object"!=YR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YR(e)?e:String(e)}function FR(t,e){return(FR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GR(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zR(t);if(e){var o=zR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UR(this,r)}}function UR(t,e){if(e&&("object"===YR(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zR(t){return(zR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YR(t){return(YR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var HR,VR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":YR(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},qR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":YR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},WR=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FR(t,e)}(i,t);var e,r,n,o=GR(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=wI,e.entityId=t.id,e}return e=i,(r=[{key:"createMesh",value:function(){var t=this.$model,e=t.viewColor,r=t.opacity,n=t.visible;if(t.linkModel){var o=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jR(Object(r),!0).forEach((function(e){LR(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jR(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},PC(r))),i=new or.Mesh(new or.BufferGeometry,o);return o.setValues({side:or.Side.DoubleSide,color:e}),i.useOriginMaterialInTransparentMode=!0,i.outlineMode=or.OutlineMode.Disabled,i.castShadow=!1,i.castPlanarShadow=!1,i.visible=n,o.visible=n,this.updateMesh(i),i}}},{key:"updateMesh",value:function(t){var e=this.$model,r=e.points,n=e.linkModel,o=e.height,i=r.map((function(t){return new c.Point3d(t.x,t.y,o/2)})),a=r.map((function(t){return new c.Point3d(t.x,t.y,-o/2)}));if(t.geometry instanceof or.BufferGeometry){var s=XD(i,a);t.geometry.addAttribute("position",new or.BufferAttribute(new Float32Array(s),3)),t.geometry.destroy()}var u=n.getConcatenatedMatrix(),A=new _e.default(0,0,0).applyMatrix4(u);return t.position.set(A.x,A.y,A.z),t.rotation.setFromRotationMatrix(pC(u)),t}}])&&kR(e.prototype,r),n&&kR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),KR=WR=VR([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createMesh()},update:function(e){var r=t.$model,n=r.visible,o=r.viewColor,i=r.opacity;e.visible=n,e.getMaterials().forEach((function(t){t.setValues({opacity:i,color:o,visible:n})})),t.updateMesh(e)}}}))]),qR("design:paramtypes",["function"==typeof(HR=void 0!==Ai&&Ai)?HR:Object])],WR);function JR(t){return function(t){if(Array.isArray(t))return XR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return XR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XR(t,e)}(t)||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 XR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ZR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$R(n.key),n)}}function $R(t){var e=function(t,e){if("object"!=oT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oT(e)?e:String(e)}function tT(t,e){return(tT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function eT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nT(t);if(e){var o=nT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rT(this,r)}}function rT(t,e){if(e&&("object"===oT(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nT(t){return(nT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oT(t){return(oT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var iT,aT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":oT(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},sT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":oT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},uT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tT(t,e)}(i,t);var e,r,n,o=eT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=_I,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.data,u=t.path.getAllPolygonPoints(),A=pC(n),l=rx({matrix:A,depth:o,points:u,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:0,points:u,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(JR(u),[u[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,o)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&r.add([s.start,s.end].map((function(e,r){var n=new or.Mesh(AT,0===r?lT:fT);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&ZR(e.prototype,r),n&&ZR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function cT(t){return dP([].concat(JR(t.getTopRenderPoints()),JR(t.getBottomRenderPoints())))}uT=aT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.roundCornerGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:cT(this.$model)}}))]),sT("design:paramtypes",["function"==typeof(iT=void 0!==Ga&&Ga)?iT:Object])],uT);var AT=new or.shapeBuilder.SphereBufferGeometry(3),lT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),fT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function hT(t){return function(t){if(Array.isArray(t))return pT(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return pT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pT(t,e)}(t)||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 pT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gT(n.key),n)}}function gT(t){var e=function(t,e){if("object"!=ET(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ET(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ET(e)?e:String(e)}function yT(t,e){return(yT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=IT(t);if(e){var o=IT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mT(this,r)}}function mT(t,e){if(e&&("object"===ET(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function IT(t){return(IT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ET(t){return(ET="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var CT,bT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ET(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},BT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ET(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},wT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yT(t,e)}(i,t);var e,r,n,o=vT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=QI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new or.Group,n=t.grooveFacePointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.path.getAllPolygonPoints(),u=new Pe.default;u.fromString(n.toArray().join(","));var A=pC(u),l=rx({matrix:A,depth:0,points:s,color:i,side:or.Side.FrontSide,opacity:a}),f=rx({matrix:A,depth:-o,points:s,color:i,side:or.Side.BackSide,opacity:a}),h=[].concat(hT(s),[s[0]]),p=[l,f,nx({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:or.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=ox(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&dT(e.prototype,r),n&&dT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function PT(t){return dP([].concat(hT(t.getTopRenderPoints()),hT(t.getBottomRenderPoints())))}function ST(t){return function(t){if(Array.isArray(t))return OT(t)}(t)||DT(t)||QT(t)||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 _T(t){return function(t){if(Array.isArray(t))return t}(t)||DT(t)||QT(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 QT(t,e){if(t){if("string"==typeof t)return OT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?OT(t,e):void 0}}function OT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function DT(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function xT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function MT(t,e,r){return(e=TT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TT(n.key),n)}}function TT(t){var e=function(t,e){if("object"!=FT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=FT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==FT(e)?e:String(e)}function jT(t,e){return(jT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LT(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=NT(t);if(e){var o=NT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kT(this,r)}}function kT(t,e){if(e&&("object"===FT(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function NT(t){return(NT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function FT(t){return(FT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}wT=bT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.specialShapedGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:PT(this.$model)}}))]),BT("design:paramtypes",["function"==typeof(CT=void 0!==Za&&Za)?CT:Object])],wT);var GT,UT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FT(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},zT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":FT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},YT=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jT(t,e)}(i,t);var e,r,n,o=LT(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).$model=t,e.entityType=SI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.data,a=t.shapeArrPointsInGroove,s=new or.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xT(Object(r),!0).forEach((function(e){MT(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:or.Side.DoubleSide,color:r},PC(n))),u=a.map((function(e){var r=new or.Shape,n=_T(e),i=n[0],a=n.slice(1);r.moveTo(i.x,i.y),a.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(i.x,i.y);var u=or.shapeBuilder.extrude(r,{bevelEnabled:!1,depth:o}),c=new or.Mesh(u,s),A=pC(t.grooveFacePointToGlobalMatrix());return c.applyMatrix(A),SC(c),c})),c=u.map((function(t){var e=ox(t.geometry);return t.add(e),e}));e.wireFrames=c,e.updateWireFrameVisibility();var A=new or.Group;return A.add(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&A.add([i.start,i.end].map((function(e,r){var n=new or.Mesh(VT,0===r?qT:WT);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=pC(t.pointToGlobalMatrix());return n.applyMatrix(o),n}))),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=dL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&RT(e.prototype,r),n&&RT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a);function HT(t){return dP([].concat(ST(t.getTopRenderPoints()),ST(t.getBottomRenderPoints())))}YT=UT([Object(_A.b)([new bc.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return V_().scene.state.state.interactionPriority.squareGroove}}})),new bc.o.HighlightGeometryAPI3D((function(){return{geometry:HT(this.$model)}}))]),zT("design:paramtypes",["function"==typeof(GT=void 0!==ls&&ls)?GT:Object])],YT);var VT=new or.shapeBuilder.SphereBufferGeometry(3),qT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),WT=new or.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function KT(t){return(KT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function JT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ZT(n.key),n)}}function XT(t,e,r){return e&&JT(t.prototype,e),r&&JT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ZT(t){var e=function(t,e){if("object"!=KT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KT(e)?e:String(e)}var $T=XT((function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.getDesignDoc=e,this.objectEntityMap=new Map,this.createFittingEntities=bc.ob.flatEntitiesCreator((function(t){return new Gx(t,r.objectEntityMap)})),this.createIntersectEntities=bc.ob.flatEntitiesCreator((function(t){return new HM(t)})),this.createGrooveFittingEntities=bc.ob.flatEntitiesCreator((function(t){return new vM(t,r.objectEntityMap)})),this.createPlankFaceHintEntities=bc.ob.flatEntitiesCreator((function(t){return new TR(t)})),this.careateFittingHintEntities=bc.ob.flatEntitiesCreator((function(t){return new oM(t)})),this.careatePlankOutlineHintEntities=bc.ob.flatEntitiesCreator((function(t){return new KR(t)})),this.createHoleEntities=bc.ob.flatEntitiesCreator((function(t){return new xM(t)})),this.createSquareGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new YT(t)})),this.createArcSquareGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new Cx(t)})),this.createRoundCornerGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new uT(t)})),this.createSpecialShapedGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new wT(t)})),this.createPathGrooveEntities=bc.ob.flatEntitiesCreator((function(t){return new aR(t)})),this.createPlankAreaFaceHintEntities=bc.ob.flatEntitiesCreator((function(t){return new vR(t)})),this.getFittingEntities=function(){var t=r.getDesignDoc();return t?r.createFittingEntities(t.getFittings()):[]},this.getGrooveFittingEntities=function(){var t=r.getDesignDoc();return t?r.createGrooveFittingEntities(t.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var t=r.getDesignDoc();return t?r.createIntersectEntities(t.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankFaceHintEntities(t.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var t=r.getDesignDoc();return t?r.careateFittingHintEntities(t.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var t=r.getDesignDoc();return t?r.careatePlankOutlineHintEntities(t.getPlankOutlineHintModels()):[]},this.getHoleEntities=function(){var t=r.getDesignDoc();return t?r.createHoleEntities(t.getHoleModels()):[]},this.getSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSquareGrooveEntities(t.getSquareGrooveModels()):[]},this.getArcSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createArcSquareGrooveEntities(t.getArcSquareGrooveModels()):[]},this.getRoundCornerGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createRoundCornerGrooveEntities(t.getRoundCornerGrooveModels()):[]},this.getSpecialShapedGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSpecialShapedGrooveEntities(t.getSpecialShapedGrooveModels()):[]},this.getPathGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createPathGrooveEntities(t.getPathGrooveModels()):[]},this.getPlankAreaFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankAreaFaceHintEntities(t.getPlankAreaFaceHints()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities,this.getHoleEntities,this.getSquareGrooveEntities,this.getArcSquareGrooveEntities,this.getRoundCornerGrooveEntities,this.getSpecialShapedGrooveEntities,this.getPathGrooveEntities,this.getPlankAreaFaceHintEntities]}));function tj(t){return(tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ej(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return rj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rj(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function rj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oj(n.key),n)}}function oj(t){var e=function(t,e){if("object"!=tj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tj(e)?e:String(e)}var ij=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){e.pressMap.forEach((function(t,r){e.pressMap.set(r,!1)}))},this.onKeyDown=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)||e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!0)},this.onKeyUp=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)&&(e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!1))},this.active()}var e,r,n;return e=t,(r=[{key:"addKeyboardKeyListener",value:function(t){var e=this,r=Object(Or.castArray)(t);if(r.some((function(t){return!e.isValidKeyboardKey(t)})))throw new Error("keyboard-key is invalid");var n,o=ej(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(t){o.e(t)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(t){var e,r=ej(Object(Or.castArray)(t));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(t){var e=this;return Object(Or.castArray)(t).every((function(t){return e.pressMap.get(t)}))}},{key:"getKeyBoardKey",value:function(t){return t.key.toLowerCase()}},{key:"isPrevent",value:function(t){if(this.disabled)return!0;var e=t.target;if(!e)return!1;if("INPUT"===e.tagName){var r=e.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===e.tagName||"TEXTAREA"===e.tagName}},{key:"isValidKeyboardKey",value:function(t){return be.includes(t)}}])&&nj(e.prototype,r),n&&nj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),aj=new Map([[Ss.ParamModelCategory.FRAME,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.FRAME,Ss.ParamModelCategory.SLIDING_DOOR_BOARD,Ss.ParamModelCategory.PARAM_FURNITURE_PART,Ss.ParamModelCategory.SANITARY_COMPONENT,Ss.ParamModelCategory.DOOR_LEAF,Ss.ParamModelCategory.DECORATIVE_MOLDING_C,Ss.ParamModelCategory.DECORATIVE_MOLDING_W,Ss.ParamModelCategory.HANDS_FREE,Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Ss.ParamModelCategory.SHOWER_ROOM,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.FRAME,Ss.ParamModelCategory.PARAM_FURNITURE_PART,Ss.ParamModelCategory.SANITARY_COMPONENT,Ss.ParamModelCategory.DOOR_LEAF,Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SPECIAL_FRAME,Ss.ParamModelCategory.EMBED_FRAME_W,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.SPACE_GROUP,Ss.ParamModelCategory.POLE_W,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,Ss.ParamModelCategory.SLIDING_DOOR_BOARD,Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.RAIL,Ss.ParamModelCategory.DOOR_LEAF]],[Ss.ParamModelCategory.SLIDING_DOOR_C,[Ss.ParamModelCategory.RAIL,Ss.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Ss.ParamModelCategory.SPACE_GROUP,[Ss.ParamModelCategory.DRAWER,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.PARAM_FURNITURE,Ss.ParamModelCategory.FASCIA_BOARD,Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ss.ParamModelCategory.BOARD,Ss.ParamModelCategory.SPECIAL_BOARD,Ss.ParamModelCategory.SPACE_GROUP]],[Ss.ParamModelCategory.SINGLE_SLIDING_DOOR,[Ss.ParamModelCategory.SLIDING_DOOR_CORE,Ss.ParamModelCategory.DOOR_WAIST_LINE]],[Ss.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Ss.ParamModelCategory.SWING_DOOR]],[Ss.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.SWING_DOOR,[Ss.ParamModelCategory.DOOR_CORE,Ss.ParamModelCategory.DOOR_WAIST_LINE,Ss.ParamModelCategory.DECORATIVE_MOLDING,Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.DRAWER,[Ss.ParamModelCategory.DRAWER_PANEL,Ss.ParamModelCategory.SWING_DOOR,Ss.ParamModelCategory.BOARD]],[Ss.ParamModelCategory.PARAM_FURNITURE,[Ss.ParamModelCategory.FURNITURE_LEG]],[Ss.ParamModelCategory.KADA,[Ss.ParamModelCategory.BYOBU,Ss.ParamModelCategory.BYOBU_FRAME,Ss.ParamModelCategory.BYOBU_PANEL]]]);function sj(t){return(sj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uj(t){return function(t){if(Array.isArray(t))return cj(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return cj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cj(t,e)}(t)||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 cj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Aj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lj(n.key),n)}}function lj(t){var e=function(t,e){if("object"!=sj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sj(e)?e:String(e)}var fj=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ue.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new ij,this.memoGetHintModelLite=fS()((function(t){return e.isFittingLikeModel(t)?eB(t):e.getParamModelLite(t)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var e,r,n;return e=t,(r=[{key:"isAccessory",value:function(t){var e;if(this.isAccessoryCache.has(t.id))return this.isAccessoryCache.get(t.id);var r=null===(e=null==t?void 0:t.getParent)||void 0===e?void 0:e.call(t),n=(aj.get(r?r.getCategory().getRoot():void 0)||[]).some((function(e){return t.getCategory().belongsTo(e)}));return this.isAccessoryCache.set(t.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(t,e){for(var r,n,o=this,i=[],a=e;a&&a!==t;)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(t){return o.isAccessory(t)}))||e}},{key:"getParamModelLite",value:function(t){var e=(t.isRoot()?t:t.getRoot()).getAssembly();return e?uS(t,{origin:G.SENSE},void 0,uS(e,{origin:G.SENSE})):uS(t,{origin:G.SENSE})}},{key:"topModelModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o,i,a,s=t.isRoot()?t:t.getRoot(),u=s.getAssembly(),c=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=!1;if(c&&(i=bL(c))&&!this.isFittingLikeModel(i)&&(c.entityType===DA?a=(a=i.isRoot()?i:i.getRoot()).getAssembly()||a:(A=!0,a=i),o=a===s||a===u),o){for(var l=!1,f=!1,h=i instanceof Qe.CoreParamModel?i.getParent():void 0,p=t;p;){if(p===i){l=!0;break}if(p===h){f=!0;break}p=(null===(r=p.getParent)||void 0===r?void 0:r.call(p))||(null===(n=p.getAssembly)||void 0===n?void 0:n.call(p))}if(e===ce.CLICK)return l?i:f?this.getAccessoryAtFirstLevel(h,t):a instanceof Qe.CoreParamModelAssembly?(i.isRoot()?i:i.getRoot())===s?this.getAccessoryAtFirstLevel(s,t):s:this.getAccessoryAtFirstLevel(s,t);if(e===ce.DB_CLICK)return l?A?s:this.getAccessoryAtFirstLevel(i,t):this.getAccessoryAtFirstLevel(s,t)}else{if(e===ce.CLICK)return u||s;if(e===ce.DB_CLICK)return u?s:this.getAccessoryAtFirstLevel(s,t)}}},{key:"accessoryModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o=t.isRoot()?t:t.getRoot(),i=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,a=i&&bL(i),s=!1;if(a&&!this.isFittingLikeModel(a)&&(s=(a.isRoot()?a:a.getRoot())===o),s){for(var u=!1,c=!1,A=null==a?void 0:a.getParent(),l=t;l;){if(l===a){u=!0;break}if(l===A){c=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(e===ce.CLICK)return u?a:this.getAccessoryAtFirstLevel(c?A:o,t);if(e===ce.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(a,t);var f=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(f,t)}}else{if(e===ce.CLICK)return this.getAccessoryAtFirstLevel(o,t);if(e===ce.DB_CLICK){var h=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(h,t)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(t){var e,r;if(this.isFittingLikeModel(t))return t;var n,o,i=t.isRoot()?t:t.getRoot(),a=i.getAssembly(),s=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,u=!1;if(s&&(n=bL(s))&&!this.isFittingLikeModel(n)&&(u=(o=s.entityType===DA?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n)===i||o===a),n&&u){for(var c=!1,A=!1,l=n instanceof Qe.CoreParamModel?n.getParent():void 0,f=t;f;){if(f===n){c=!0;break}if(f===l){A=!0;break}f=(null===(e=f.getParent)||void 0===e?void 0:e.call(f))||(null===(r=f.getAssembly)||void 0===r?void 0:r.call(f))}return c?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Qe.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,t):A?this.getAccessoryAtFirstLevel(l,t):this.designMode===ue.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,t)}return this.designMode===ue.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,t)}},{key:"setCurSelectEntity",value:function(t){this.curSelectEntity=t}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(t){this.curHintEntity=t}},{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(t,e){this.designMode=t,t===ue.CUSTOM?(this.customModeFindSelectModel=null==e?void 0:e.findSelectModel,this.customModeFindHintModel=null==e?void 0:e.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(Or.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(t){var e=BL[t.type];return{entityId:t.id,entityType:e}}},{key:"customModeSelectModel",value:function(t,e){var r,n;n=this.isFittingLikeModel(t)?eB(t):this.getParamModelLite(t);var o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,e);return Object(Or.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(t){var e,r=this,n=this.memoGetHintModelLite(t),o=null===(e=this.customModeFindHintModel)||void 0===e?void 0:e.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Or.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(t){return t instanceof Ia||t instanceof ls||t instanceof bs||t instanceof Ga||t instanceof Za||t instanceof Oa||t instanceof mo||t instanceof Cn||t instanceof gr&&Boolean(t.isAppendHardware)}},{key:"getSelectEntity",value:function(t,e){var r;if(this.isMultiSelect&&this.designMode!==ue.CUSTOM){switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t}if(!r)return;var n=CL(r),o=Object(Or.castArray)(this.curSelectEntity).filter((function(t){return t}));this.prevModeSelectEntity.length&&o.push.apply(o,uj(this.prevModeSelectEntity));var i=o[0]&&bL(o[0]);if(i&&this.isFittingLikeModel(i)!==this.isFittingLikeModel(r))return n;var a=o.filter((function(t){return t.entityId!==n.entityId}));return a.length!==o.length?a:[].concat(uj(a),[n])}switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t;break;case ue.CUSTOM:return this.customModeSelectModel(t,e)}return CL(r||t)}},{key:"getHintEntity",value:function(t){var e;switch(this.designMode){case ue.TOP_MODEL:case ue.ACCESSORY:e=this.topModelModeAndAccessoryModeHint(t);break;case ue.PRODUCT:e=t;break;case ue.CUSTOM:return this.customModeHintModel(t)}var r=this.curSelectEntity&&Object(Or.castArray)(this.curSelectEntity)||[];if(!([].concat(uj(r),uj(this.prevModeSelectEntity)).findIndex((function(t){return t.entityId===e.id}))>-1))return CL(e)}},{key:"registerMultiSelectShortcut",value:function(t){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=t,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&Aj(e.prototype,r),n&&Aj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function hj(t){return(hj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gj(n.key),n)}}function gj(t){var e=function(t,e){if("object"!=hj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hj(e)?e:String(e)}function yj(t,e){return(yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ij(t);if(e){var o=Ij(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mj(this,r)}}function mj(t,e){if(e&&("object"===hj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ij(t){return(Ij=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ej=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yj(t,e)}(i,t);var e,r,n,o=vj(i);function i(){return pj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"pickRayTarget",value:function(t){return t&&bL(t)}},{key:"selection",get:function(){return dL().getStateManager().kaf.selection}},{key:"hint",get:function(){return dL().getStateManager().kaf.hint}},{key:"designModeCtx",get:function(){return dL().designModeContext}}])&&dj(e.prototype,r),n&&dj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(593).a.Feature);function Cj(t){return(Cj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wj(n.key),n)}}function wj(t){var e=function(t,e){if("object"!=Cj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cj(e)?e:String(e)}function Pj(t,e){return(Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Qj(t);if(e){var o=Qj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _j(this,r)}}function _j(t,e){if(e&&("object"===Cj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qj(t){return(Qj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oj=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pj(t,e)}(i,t);var e,r,n,o=Sj(i);function i(){var t;return bj(this,i),(t=o.apply(this,arguments)).isMouseDown=!1,t}return e=i,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(t){if(!this.isMouseDown){var e=this.context.pick(t.sceneId,t.event),r=this.pickRayTarget(null==e?void 0:e.entity);if(_r.eventNames().includes(wr.PLANK_FACE_HOVER)&&r instanceof Qe.CoreParamModel){var n=e.entity,o=n.point,i={modelId:n.entityId,id:vC(r,o)};_r.emit(wr.PLANK_FACE_HOVER,i)}if(r){var a=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ue.CUSTOM,this.hint.hint(a)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Bj(e.prototype,r),n&&Bj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ej);function Dj(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return xj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xj(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function xj(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Mj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rj(n.key),n)}}function Rj(t){var e=function(t,e){if("object"!=Nj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Nj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Nj(e)?e:String(e)}function Tj(t,e){return(Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kj(t);if(e){var o=kj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lj(this,r)}}function Lj(t,e){if(e&&("object"===Nj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kj(t){return(kj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Nj(t){return(Nj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Fj=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nj(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Gj=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Nj(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Uj=bc.ib.Highlighters.WireGeometry,zj=bc.ib.Highlighters.generateWireGeometryForHighlighterGeometry,Yj=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tj(t,e)}(i,t);var e,r,n,o=jj(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this)).models=t,r.createFittingModelBox=e,r}return e=i,(r=[{key:"getGeometry",value:function(){var t,e=new Uj,r=Dj(this.models);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=void 0;o=n instanceof Qe.CoreParamModel||n instanceof Qe.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var i=zj(o);e.append(i)}}catch(t){r.e(t)}finally{r.f()}return e}}])&&Mj(e.prototype,r),n&&Mj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(SA.a),Hj=Yj=Fj([Object(_A.b)([new bc.o.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Gj("design:paramtypes",[Array,Function])],Yj);function Vj(t){return(Vj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wj(n.key),n)}}function Wj(t){var e=function(t,e){if("object"!=Vj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vj(e)?e:String(e)}function Kj(t,e){return(Kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jj(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zj(t);if(e){var o=Zj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xj(this,r)}}function Xj(t,e){if(e&&("object"===Vj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zj(t){return(Zj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kj(t,e)}(i,t);var e,r,n,o=Jj(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this))._init(),t}return e=i,(r=[{key:"_init",value:function(){var t=this,e={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(e){var r=e.map((function(t){return bL(t)}));return new Hj(r.filter((function(t){return t})),t.createFittingModelBox)}};this.selection.addMultiSelectionConfig(e)}},{key:"createFittingModelBox",value:function(t){var e;if(t instanceof Cn)e=t.boundingBox;else if(t instanceof mo)e=mM(t);else if(t instanceof Ia)e=t.boundingBox;else if(t instanceof ls)e=HT(t);else if(t instanceof Ga)e=cT(t);else if(t instanceof Za)e=PT(t);else if(t instanceof Oa)e=sR(t);else{if(!(t instanceof bs))throw new Error("不支持的多选类型");e=bx(t)}return e}},{key:"onClick",value:function(t){this.triggerClick(t,ce.CLICK)}},{key:"onDblClick",value:function(t){this.designModeCtx.isMultiSelect||this.triggerClick(t,ce.DB_CLICK)}},{key:"triggerClick",value:function(t,e){var r=this.context.pick(t.sceneId,t.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(_r.eventNames().includes(wr.PLANK_FACE_CLICK)&&n instanceof Qe.CoreParamModel){var o=r.entity,i=o.point,a={modelId:o.entityId,id:vC(n,i)};_r.emit(wr.PLANK_FACE_CLICK,a)}if(n){var s=this.designModeCtx.getSelectEntity(n,e);this.designModeCtx.getDesignMode()===ue.CUSTOM?s&&this.selection.select(s):(this.selection.select(s),this.designModeCtx.setCurSelectEntity(s))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&qj(e.prototype,r),n&&qj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ej);function tL(t){return(tL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eL(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rL(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?eL(Object(r),!0).forEach((function(e){nL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eL(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nL(t,e,r){return(e=iL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oL(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iL(n.key),n)}}function iL(t){var e=function(t,e){if("object"!=tL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tL(e)?e:String(e)}function aL(){return(aL="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=sL(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function sL(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lL(t)););return t}function uL(t,e){return(uL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cL(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lL(t);if(e){var o=lL(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return AL(this,r)}}function AL(t,e){if(e&&("object"===tL(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lL(t){return(lL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fL,hL=new pu.SingletonRef,pL=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uL(t,e)}(i,t);var e,r,n,o=cL(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:JD,axrs:H_,singleton:hL},t)).stateManager=e,r.viewer=new lh,r.designModeContext=new fj,r}return e=i,(r=[{key:"init",value:function(){aL(lL(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var t=this.stateManager;t.initState(),K_(t);var e=this.getDependentPlugin(du.a),r=this.getDependentPlugin(cI);t.kaf=e.stateManager,t.core=r.stateManager}},{key:"initNet",value:function(){aL(lL(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Rd),this.client=new Vp(this.net)}},{key:"initApp",value:function(){var t=this,e=this.stateManager,r=e.core,n=r.design,o=r.pad,i=this.getDependentPlugin(du.a);this.viewer.config(i,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return t.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(t,e){for(var r=e.point,n=o.findModelOrAssemblyModelById(t.entityId);n&&!TI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:DA,point:r}:rL(rL({},t),{},{point:r})},paramModelSymbol:DA,filterParamModel:function(e){return!t.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(e.getCategory().categoryId)}}),i.registerEntityDocument(new $T((function(){return e.core.fittingDesign}))),e.kaf.toolbox.addIdleToolFeature((function(){return new $j})),e.kaf.toolbox.addIdleToolFeature((function(){return new Oj})),i.setLayout(DO)}}])&&oL(e.prototype,r),n&&oL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(pu.PluginApplication),dL=hL.instance;function gL(t){return(gL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yL(t,e,r){var n;return n=function(t,e){if("object"!=gL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vL(t){return function(t){if(Array.isArray(t))return mL(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return mL(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mL(t,e)}(t)||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 mL(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function IL(t,e){var r=new Map;return function(){var n,o=e.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=t.apply(void 0,arguments),Object(Or.isObject)(n)&&Object(Or.isFunction)(n.then)&&Object(Or.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function EL(t){return t instanceof gr?DA:t instanceof Pr?OA:t instanceof Cn?II:t instanceof mo?EI:t instanceof Ia?PI:t instanceof ls||t instanceof bs?SI:t instanceof Ga?_I:t instanceof Za?QI:t instanceof Oa?OI:void 0}function CL(t){return{entityId:t.id,entityType:EL(t)}}function bL(t){var e=t.entityId,r=t.entityType,n=dL().getStateManager().core,o=n.fittingDesign,i=n.pad;switch(r){case DA:return i.findModelOrAssemblyModelById(e);case OA:return i.findParamModelAssembly(e);case EI:return o.getGrooveFittings().find((function(t){return t.id===e}));case II:return o.getFittings().find((function(t){return t.id===e}));case PI:return o.getHoleModels().find((function(t){return t.id===e}));case SI:return[].concat(vL(o.getSquareGrooveModels()),vL(o.getArcSquareGrooveModels())).find((function(t){return t.id===e}));case _I:return o.getRoundCornerGrooveModels().find((function(t){return t.id===e}));case QI:return o.getSpecialShapedGrooveModels().find((function(t){return t.id===e}));case OI:return o.getPathGrooveModels().find((function(t){return t.id===e}));default:return}}var BL=(yL(yL(yL(yL(yL(yL(yL(yL(yL(yL(fL={},Ie.PARAM_MODEL,DA),Ie.PARAM_MODEL_ASSEMBLY,OA),Ie.HOLE,II),Ie.GROOVE,II),Ie.HARDWARE_GROOVE,EI),Ie.HARDWARE,DA),Ie.HOLE_V2,PI),Ie.SQUARE_GROOVE,SI),Ie.ROUND_CORNER_GROOVE,_I),Ie.SPECIAL_SHAPED_GROOVE,QI),yL(fL,Ie.PATH_GROOVE,OI));function wL(t){return(wL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function PL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */PL=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==wL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function SL(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function _L(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){SL(i,n,o,a,s,"next",t)}function s(t){SL(i,n,o,a,s,"throw",t)}a(void 0)}))}}var QL=new Map;function OL(t){return["designid","levelid","modelid","toolType"].map((function(e){return t[e]||""})).join(":")}var DL=IL(function(){var t=_L(PL().mark((function t(e){var r,n,o;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=_d(),n=OL(e),!QL.has(n)){t.next=4;break}return t.abrupt("return",QL.get(n));case 4:return t.next=6,r.get("/cos/api/fitting-design",{params:e});case 6:return o=t.sent,QL.set(n,o.data.d),t.abrupt("return",o.data.d);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),OL);function xL(t,e){var r=yI(em);"function"==typeof r.fittingDesignHasChanged&&r.fittingDesignHasChanged({modelId:t,isLock:e}).catch((function(){}))}var ML,RL,TL=function(){var t=_L(PL().mark((function t(e,r){var n,o;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_d(),o=OL(r),t.prev=2,t.next=5,n.post("/cos/api/fitting-design",e,{params:r});case 5:QL.set(o,e),xL(r.modelid,!0),t.next=14;break;case 9:if(t.prev=9,t.t0=t.catch(2),null===(i=t.t0)||!Object(Or.isObject)(i)||"0"===i.c||!i.m){t.next=13;break}throw new Error("错误码:".concat(t.t0.c,";错误信息:").concat(t.t0.m));case 13:throw t.t0;case 14:case"end":return t.stop()}var i}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}(),jL=function(){var t=_L(PL().mark((function t(e){var r,n;return PL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),n=OL(e),t.prev=2,t.next=5,r.delete("/cos/api/fitting-design",{params:e});case 5:QL.has(n)&&QL.delete(n),xL(e.modelid,!1),t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(2),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();function LL(t){return(LL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */kL=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==LL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(LL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function NL(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){NL(i,n,o,a,s,"next",t)}function s(t){NL(i,n,o,a,s,"throw",t)}a(void 0)}))}}!function(t){t.UNKNOWN="UNKNOWN",t.PENDING="PENDING",t.RUNNING="RUNNING",t.SAVING="SAVING",t.SUCCESS="SUCCESS",t.FAIL="FAIL",t.CANCEL="CANCEL",t.TIMEOUT="TIMEOUT"}(ML||(ML={})),function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW"}(RL||(RL={}));var GL=function(){var t=FL(kL().mark((function t(e){var r,n;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Or.castArray)(e),n=yI(bm),t.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),UL=IL(function(){var t=FL(kL().mark((function t(e,r){var n;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=yI(LI.MiniAppParamModelJsonDataService),t.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:e,templateId:r}));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),zL=IL(function(){var t=FL(kL().mark((function t(e,r,n,o){var i;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=yI(LI.MiniAppParamModelJsonDataService),t.abrupt("return",i.getModelJsonDataByModelId({modelIds:e,templateId:r,ignoreResetPosition:n,timeout:o},{timeout:-1}));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),YL=function(){var t=FL(kL().mark((function t(e){var r;return kL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=yI(hm),t.abrupt("return",r.findUnProductiveModels(e));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),HL=function(){return yI(nm).modelAdd},VL=function(){return yI(nm).modelUpdate},qL=function(){return yI(nm).modelDelete},WL=function(t){return yI(nm).toggleMonitor(t)},KL=function(){return yI(fm).afterDetect},JL=function(t){return yI(fm).setDetectionProduct(t)},XL=function(t){return yI(fm).toggleDetection(t)};function ZL(t){return(ZL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tk(t,e,r){var n;return n=function(t,e){if("object"!=ZL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ZL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ek(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ek=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ZL(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ZL(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function rk(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function nk(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){rk(i,n,o,a,s,"next",t)}function s(t){rk(i,n,o,a,s,"throw",t)}a(void 0)}))}}var ok=fS()(function(){var t=nk(ek().mark((function t(e){var r,n;return ek().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_d(),t.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:e,cache:!0}});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$L(Object(r),!0).forEach((function(e){tk(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({promise:!0},mI)),ik=fS()(function(){var t=nk(ek().mark((function t(e){var r,n,o;return ek().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_d(),t.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:e});case 3:return o=t.sent,t.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Or.mapValues)(o.data.d.modelCenterMap,(function(t){return JSON.parse(t)})):{});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());function ak(t){return(ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uk(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sk(Object(r),!0).forEach((function(e){ck(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sk(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ck(t,e,r){return(e=hk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ak(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return lk(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lk(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function lk(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function fk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hk(n.key),n)}}function hk(t){var e=function(t,e){if("object"!=ak(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ak(e)?e:String(e)}function pk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dk(t,e){return(dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=mk(t);if(e){var o=mk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yk(this,r)}}function yk(t,e){if(e&&("object"===ak(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vk(t)}function vk(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mk(t){return(mk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ik=new Set(["ModelViewerSelectionV2Service.startWatchSelectedChangedEvent","ModelViewerSelectionV2Service.onSelectedChanged","ModelViewerSelectionV2Service._genEntityFromElement","ModelViewerSelectionV2Service._genElement"]);function Ek(t){return function(e){return function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dk(t,e)}(s,r);var n,o,i,a=gk(s);function s(){var r;pk(this,s);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r=a.call.apply(a,[this].concat(o));var u,c=e.name,A=Object.getOwnPropertyNames(e.prototype).filter((function(t){var e="".concat(c,".").concat(t);return"function"==typeof r[t]&&"constructor"!==t&&!Ik.has(e)})),l=Ak(A);try{var f=function(){var e=u.value,n=r[e];Object.defineProperty(vk(r),e,{configurable:!0,enumerable:!0,writable:!0,value:_t(n,{beforeCalled:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return{apiName:e,args:r,start:Date.now()}},afterCalled:function(r,n,o,i){var a="".concat(c,".").concat(e),s="";if(r){var u=r instanceof Error?r.message:r&&r.toString?r.toString():"unknown";s="\n customSdk:called ".concat(a," api fail:\n arguments is ").concat(JSON.stringify(o),",\n errMsg is ").concat(u,"\n ")}var A=t||{},l=A.level,f=void 0===l?"L2":l,h=A.owner,p={level:f,owner:void 0===h?"baijiu":h,downstream:"customOwnerField=owner"},d=uk({status:!r,apiType:"CUSTOM_SPLIT_API",apiName:a,duration:Date.now()-n.start,success:!r,version:window.__customSdkVersion,errMsg:s},p);window.__dev_recorder&&window.__dev_recorder(uk(uk({},d),{},{args:o,ret:i})),_r.emit(wr.API_CALLED,d)}})})};for(l.s();!(u=l.n()).done;)f()}catch(t){l.e(t)}finally{l.f()}return r}return n=s,o&&fk(n.prototype,o),i&&fk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n}(e)}}function Ck(t){return(Ck="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wk(n.key),n)}}function Bk(t,e,r){return e&&bk(t.prototype,e),r&&bk(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function wk(t){var e=function(t,e){if("object"!=Ck(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ck(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ck(e)?e:String(e)}var Pk=Bk((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function Sk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Sk=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Fk(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Fk(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function _k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Qk(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_k(Object(r),!0).forEach((function(e){Ok(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ok(t,e,r){return(e=Tk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dk(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function xk(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Dk(i,n,o,a,s,"next",t)}function s(t){Dk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Mk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tk(n.key),n)}}function Tk(t){var e=function(t,e){if("object"!=Fk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fk(e)?e:String(e)}function jk(t,e){return(jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Lk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Nk(t);if(e){var o=Nk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kk(this,r)}}function kk(t,e){if(e&&("object"===Fk(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Nk(t){return(Nk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fk(t){return(Fk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Gk=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fk(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Uk=function(){return V_().fittingDesign.fittingDesignSense},zk=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jk(t,e)}(c,t);var e,r,n,o,i,a,s,u=Lk(c);function c(){return Mk(this,c),u.apply(this,arguments)}return e=c,(r=[{key:"toggleAutoSave",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Uk().$actionEnableAutoSave.dispatch(t)}},{key:"isAutoSave",value:function(){return Uk().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(s=xk(Sk().mark((function t(e){var r;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&(V_().viewParamModel.state.state.currModelId!==e||Uk().state.state.design.id!==e)){t.next=3;break}return t.abrupt("return",this.getConnectedFittingDesign());case 3:return t.next=5,cb(e);case 5:return r=t.sent,t.abrupt("return",DL(Qk(Qk({},r),{},{modelid:e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Uk().getConnectedFittingDesign(t,e)}},{key:"validateFittingDesign",value:function(t,e){var r=V_().entry.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(!r)return{validated:!1};var n=V_().fittingDesign.senseSetting.getSenseSettings();return{validated:function(t){if(!t.isClosedPath())return!1;for(var e=t.points,r=t.lines,n=e.length,o=0;o<n;o++){var i={type:Js.POINT,val:e[o]},a={type:Js.LINE,val:r[o]};if(!cu(i.val))return!1;if(!Au(a.val))return!1;if(!fu(i,a))return!1;for(var s=o+1;s<n;s++){var u={type:Js.POINT,val:e[s]},c={type:Js.LINE,val:r[s]};if(!fu(i,u))return!1;if(!fu(i,c))return!1;if(!fu(a,u))return!1;if(!fu(a,c))return!1}}return!0}(hu(t,r,Object(Or.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(a=xk(Sk().mark((function t(e){var r,n=arguments;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},t.abrupt("return",Uk().appendFittingDataToFittingDesign(e,r));case 2:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"saveDesign",value:(i=xk(Sk().mark((function t(e){var r,n,o,i=arguments;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=uC(n),Uk().$actionSaveFittingDesign.started.dispatch({defer:o,design:e}),t.abrupt("return",o.promise);case 5:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=xk(Sk().mark((function t(e){var r,n,o,i,a;return Sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,a=uC(o),Uk().$actionClearFittingDesign.started.dispatch({defer:a,modelId:i}),t.abrupt("return",a.promise);case 4:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&Rk(e.prototype,r),n&&Rk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Pk);function Yk(t){return(Yk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qk(n.key),n)}}function qk(t){var e=function(t,e){if("object"!=Yk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Yk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yk(e)?e:String(e)}function Wk(t,e){return(Wk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Kk(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xk(t);if(e){var o=Xk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jk(this,r)}}function Jk(t,e){if(e&&("object"===Yk(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xk(t){return(Xk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}zk=Gk([Ek()],zk);var Zk=(new Os.default).setFromCenterAndSize(new _e.default(0,0,0),new _e.default(200,200,100)),$k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wk(t,e)}(i,t);var e,r,n,o=Kk(i);function i(){return Hk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var t=this.state,e=t.initCameraAttributes,r=e.position,n=e.lookAt,o=t.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 Zk}}])&&Vk(e.prototype,r),n&&Vk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ob.i);function tN(t){return(tN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rN(n.key),n)}}function rN(t){var e=function(t,e){if("object"!=tN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tN(e)?e:String(e)}function nN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oN(t,e){return(oN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sN(t);if(e){var o=sN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aN(this,r)}}function aN(t,e){if(e&&("object"===tN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sN(t){return(sN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oN(t,e)}(i,t);var e,r,n,o=iN(i);function i(){return nN(this,i),o.apply(this,arguments)}return e=i,r&&eN(e.prototype,r),n&&eN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(bc.Jb.combine({scene3D:$k})),cN=window.document.createElement("script");cN.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(cN);function AN(t){return(AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hN(n.key),n)}}function hN(t){var e=function(t,e){if("object"!=AN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AN(e)?e:String(e)}function pN(t,e){return(pN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yN(t);if(e){var o=yN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gN(this,r)}}function gN(t,e){if(e&&("object"===AN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yN(t){return(yN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pN(t,e)}(i,t);var e,r,n,o=dN(i);function i(){var t;return lN(this,i),(t=o.apply(this,arguments)).rootState=new uN,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new pL(this,this.rootState);t.init(),t.run()}}])&&fN(e.prototype,r),n&&fN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}($m.a);function mN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EN(n.key),n)}}function EN(t){var e=function(t,e){if("object"!=PN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==PN(e)?e:String(e)}function CN(t,e){return(CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=wN(t);if(e){var o=wN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BN(this,r)}}function BN(t,e){if(e&&("object"===PN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wN(t){return(wN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function PN(t){return(PN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}vN.dependencies=[du.a,cI];var SN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_N=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CN(t,e)}(i,t);var e,r,n,o=bN(i);function i(){return mN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleModelViewIntersected",value:function(t){V_().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(t)}},{key:"toggleModelViewedIntersected",value:function(t){V_().fittingDesign.intersected.toggleShowIntersectGroupData(t)}}])&&IN(e.prototype,r),n&&IN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function QN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */QN=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==NN(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(NN(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ON(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function DN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ON(i,n,o,a,s,"next",t)}function s(t){ON(i,n,o,a,s,"throw",t)}a(void 0)}))}}function xN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,RN(n.key),n)}}function RN(t){var e=function(t,e){if("object"!=NN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=NN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==NN(e)?e:String(e)}function TN(t,e){return(TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kN(t);if(e){var o=kN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return LN(this,r)}}function LN(t,e){if(e&&("object"===NN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kN(t){return(kN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function NN(t){return(NN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}_N=SN([Ek()],_N);var FN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":NN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},GN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&TN(t,e)}(u,t);var e,r,n,o,i,a,s=jN(u);function u(){return xN(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"getAllCustomModels",value:(a=DN(QN().mark((function t(){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.getAllCustomModels());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"getCustomModelById",value:(i=DN(QN().mark((function t(e){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.getCustomModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=DN(QN().mark((function t(e){return QN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().scene.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&MN(e.prototype,r),n&&MN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Pk);function UN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zN(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,YN(n.key),n)}}function YN(t){var e=function(t,e){if("object"!=KN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KN(e)?e:String(e)}function HN(t,e){return(HN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function VN(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=WN(t);if(e){var o=WN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qN(this,r)}}function qN(t,e){if(e&&("object"===KN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function WN(t){return(WN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function KN(t){return(KN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}GN=FN([Ek({level:"L0"})],GN);var JN=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":KN(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},XN=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&HN(t,e)}(i,t);var e,r,n,o=VN(i);function i(){return UN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setFittingHint",value:function(t){V_().fittingDesign.fittingHint.setFittingHint(t)}},{key:"clearFittingHint",value:function(t){V_().fittingDesign.fittingHint.clearFittingHint(t)}},{key:"setFittingHardwareHint",value:function(t){V_().fittingDesign.fittingHint.setFittingHardwareHint(t)}},{key:"clearFittingHardwareHint",value:function(t){V_().fittingDesign.fittingHint.clearFittingHardwareHint(t)}}])&&zN(e.prototype,r),n&&zN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function ZN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ZN=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==uF(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(uF(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function $N(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function tF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$N(i,n,o,a,s,"next",t)}function s(t){$N(i,n,o,a,s,"throw",t)}a(void 0)}))}}function eF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nF(n.key),n)}}function nF(t){var e=function(t,e){if("object"!=uF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=uF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==uF(e)?e:String(e)}function oF(t,e){return(oF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sF(t);if(e){var o=sF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aF(this,r)}}function aF(t,e){if(e&&("object"===uF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sF(t){return(sF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uF(t){return(uF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}XN=JN([Ek()],XN);var cF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},AF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oF(t,e)}(s,t);var e,r,n,o,i,a=iF(s);function s(){return eF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getAllFittingModels",value:(i=tF(ZN().mark((function t(e){return ZN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().fittingDesign.fittingModel.getAllFittingModels(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=tF(ZN().mark((function t(e){return ZN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().fittingDesign.fittingModel.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&rF(e.prototype,r),n&&rF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);AF=cF([Ek()],AF);var lF=r(127);function fF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pF(n.key),n)}}function pF(t){var e=function(t,e){if("object"!=mF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mF(e)?e:String(e)}function dF(t,e){return(dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=vF(t);if(e){var o=vF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yF(this,r)}}function yF(t,e){if(e&&("object"===mF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vF(t){return(vF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mF(t){return(mF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var IF,EF,CF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":mF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(t){t.View3D="view3d",t.Roamer="roamer"}(IF||(IF={})),function(t){t.UP="UP",t.DOWN="DOWN",t.LEFT="LEFT",t.RIGHT="RIGHT",t.FRONT="FRONT",t.BACK="BACK"}(EF||(EF={}));var bF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dF(t,e)}(i,t);var e,r,n,o=gF(i);function i(){return fF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleCameraMode",value:function(t){var e;switch(t){case IF.View3D:e=mD.c.View3D;break;case IF.Roamer:e=mD.c.Roamer}dL().getStateManager().scene3D.updatePerspectiveCameraMode(e)}},{key:"moveCamera",value:function(t){var e,r=dL().getStateManager().scene3D;switch(t){case EF.UP:case EF.FRONT:e=lF.a.UP;break;case EF.DOWN:case EF.BACK:e=lF.a.DOWN;break;case EF.LEFT:e=lF.a.LEFT;break;case EF.RIGHT:e=lF.a.RIGHT}if(e){if(t===EF.UP||t===EF.DOWN)return void r.onQEPress(e);r.onWASDPress(e)}}},{key:"focusFace",value:function(t){return V_().scene.focusFace(t)}},{key:"updateCameraType",value:function(t){return V_().scene.updateCameraType(t)}},{key:"lookAt",value:function(t){return V_().scene.lookAt(t)}},{key:"unstable__adaptViewer",value:function(t){return V_().scene.adaptViewer(t)}},{key:"toggleCameraTranslateMode",value:function(t){var e=t===de.Default?mD.a.defaultMode:mD.a.classicalMode;dL().getStateManager().scene3D.setCameraControlMode(e)}}])&&hF(e.prototype,r),n&&hF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function BF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,PF(n.key),n)}}function PF(t){var e=function(t,e){if("object"!=DF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DF(e)?e:String(e)}function SF(t,e){return(SF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _F(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=OF(t);if(e){var o=OF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return QF(this,r)}}function QF(t,e){if(e&&("object"===DF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OF(t){return(OF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function DF(t){return(DF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}bF=CF([Ek({level:"L0"})],bF);var xF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":DF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},MF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SF(t,e)}(i,t);var e,r,n,o=_F(i);function i(){return BF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDefaultHint",value:function(t){V_().fittingDesign.plankFaceHint.setDefaultHintConfig(t)}},{key:"setModelHint",value:function(t){V_().fittingDesign.plankFaceHint.setModelHint(t)}},{key:"clearModelHint",value:function(t){V_().fittingDesign.plankFaceHint.clearModelHint(t)}}])&&wF(e.prototype,r),n&&wF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function RF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RF=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==YF(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(YF(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function TF(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function jF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TF(i,n,o,a,s,"next",t)}function s(t){TF(i,n,o,a,s,"throw",t)}a(void 0)}))}}function LF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NF(n.key),n)}}function NF(t){var e=function(t,e){if("object"!=YF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YF(e)?e:String(e)}function FF(t,e){return(FF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zF(t);if(e){var o=zF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UF(this,r)}}function UF(t,e){if(e&&("object"===YF(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zF(t){return(zF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YF(t){return(YF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}MF=xF([Ek()],MF);var HF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":YF(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},VF=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FF(t,e)}(s,t);var e,r,n,o,i,a=GF(s);function s(){return LF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getParamData",value:(i=jF(RF().mark((function t(e){return RF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.getParamModelJsonData(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamIntersected",value:(o=jF(RF().mark((function t(e){var r;return RF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,V_().fittingDesign.intersected.getParamModelIntersectedData(e);case 2:return r=t.sent,t.abrupt("return",(n=r,{intersectedGroups:Object(Or.map)(n.intersectedGroups,(function(t){return lC(lC({},t),{},{intersecteds:Object(Or.map)(t.intersecteds,(function(t){return Object(Or.omit)(t,["shell"])}))})}))}));case 4:case"end":return t.stop()}var n}),t)}))),function(t){return o.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.ignoreCategory||(t.ignoreCategory=he),V_().viewParamModel.getTopModelList(t)}},{key:"getParamModelPhotoById",value:function(t){return V_().viewParamModel.getParamModelPhotoData(t)}}])&&kF(e.prototype,r),n&&kF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);function qF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function WF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,KF(n.key),n)}}function KF(t){var e=function(t,e){if("object"!=tG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tG(e)?e:String(e)}function JF(t,e){return(JF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function XF(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$F(t);if(e){var o=$F(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ZF(this,r)}}function ZF(t,e){if(e&&("object"===tG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $F(t){return($F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tG(t){return(tG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}VF=HF([Ek({level:"L0"})],VF);var eG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},rG=function(){return V_().select},nG=function(){return dL().designModeContext},oG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JF(t,e)}(i,t);var e,r,n,o=XF(i);function i(){var t;return qF(this,i),(t=o.apply(this,arguments)).hasWatchSelectionChange=!1,t.plankFaceClickEvent={on:function(t){_r.on(wr.PLANK_FACE_CLICK,t)},once:function(t){_r.once(wr.PLANK_FACE_CLICK,t)},off:function(t){_r.off(wr.PLANK_FACE_CLICK,t)}},t.plankFaceHoverEvent={on:function(t){_r.on(wr.PLANK_FACE_HOVER,t)},once:function(t){_r.once(wr.PLANK_FACE_HOVER,t)},off:function(t){_r.off(wr.PLANK_FACE_HOVER,t)}},t.onSelectedChanged=function(){_r.emit(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t.getSelected())},t}return e=i,(r=[{key:"getSelected",value:function(){return rG().state.state.selectedDataV2.map(this._genElement).filter((function(t){return!!t}))}},{key:"select",value:function(t){var e=Object(Or.castArray)(t).map(this._genEntityFromElement);rG().select(e),nG().setCurSelectEntity(e)}},{key:"unSelect",value:function(t){if(t){var e=Object(Or.castArray)(t).map(this._genEntityFromElement);rG().unSelect(e);var r=nG().getCurSelectEntity();r&&(Array.isArray(r)?nG().setCurSelectEntity(Object(Or.difference)(r,e)):e.includes(r)&&nG().setCurSelectEntity(void 0))}else rG().select(),nG().setCurSelectEntity(void 0)}},{key:"on",value:function(t){this.startWatchSelectedChangedEvent(),_r.on(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"off",value:function(t){_r.off(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"once",value:function(t){this.startWatchSelectedChangedEvent(),_r.once(wr.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,rG().on(Y_.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(t){var e={entityId:t.id,entityType:BL[t.type]};return"__intersected_model"===t.type&&(e.entityType=CI),e}},{key:"_genElement",value:function(t){var e,r=t.id;if(t instanceof gr?t.isAppendHardware?(e=Ie.HARDWARE,r=t.hardwareData.id):e=Ie.PARAM_MODEL:t instanceof Pr?e=Ie.PARAM_MODEL_ASSEMBLY:t instanceof mo?e=Ie.HARDWARE_GROOVE:t instanceof Cn?e=t.type===J.HOLE?Ie.HOLE:Ie.GROOVE:t instanceof Ia?e=Ie.HOLE_V2:t instanceof ls||t instanceof bs?e=Ie.SQUARE_GROOVE:t instanceof Ga?e=Ie.ROUND_CORNER_GROOVE:t instanceof Za?e=Ie.SPECIAL_SHAPED_GROOVE:t instanceof Oa&&(e=Ie.PATH_GROOVE),e)return{id:r,type:e}}},{key:"__onDestroy",value:function(){rG().off(Y_.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&WF(e.prototype,r),n&&WF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function iG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */iG=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==dG(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(dG(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function aG(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function sG(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){aG(i,n,o,a,s,"next",t)}function s(t){aG(i,n,o,a,s,"throw",t)}a(void 0)}))}}function uG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,AG(n.key),n)}}function AG(t){var e=function(t,e){if("object"!=dG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dG(e)?e:String(e)}function lG(t,e){return(lG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pG(t);if(e){var o=pG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hG(this,r)}}function hG(t,e){if(e&&("object"===dG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pG(t){return(pG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dG(t){return(dG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}oG=eG([Ek({level:"L0"})],oG);var gG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lG(t,e)}(u,t);var e,r,n,o,i,a,s=fG(u);function u(){return uG(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"viewSelected",value:(a=sG(iG().mark((function t(){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.viewSelectedParamModel());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"viewModelById",value:(i=sG(iG().mark((function t(e){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.viewParamModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var t=dL().getStateManager().scene3D;t.updateEnableCameraAnimation(!0),t.reset()}},{key:"toggleModelBorder",value:function(t){V_().scene.$actionToggleRenderBorder.dispatch(t)}},{key:"toggleModelTransparent",value:function(t){V_().scene.$actionToggleRenderTranslucent.dispatch(t)}},{key:"toggleModelFullTransparent",value:function(t){V_().scene.$actionToggleRenderMode.dispatch({mode:t?gI.FULLY_TRANSPARENT:gI.SHADING})}},{key:"toggleWhiteMode",value:function(t){V_().scene.$actionToggleWhiteMode.dispatch(t)}},{key:"setting",value:function(t){V_().fittingDesign.senseSetting.$actionSenseSetting.dispatch(t)}},{key:"refreshModel",value:(o=sG(iG().mark((function t(){return iG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.refreshCustomModelData());case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"setInteractionPriority",value:function(t){if(Object.values(t).some((function(t){return"number"!=typeof t})))throw new Error("Interaction priority must be a number.");V_().scene.$actionSetInteractionPriority.dispatch(t)}},{key:"getInteractionPriority",value:function(){return Object(Or.cloneDeep)(V_().scene.state.state.interactionPriority)}}])&&cG(e.prototype,r),n&&cG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Pk);function vG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IG(n.key),n)}}function IG(t){var e=function(t,e){if("object"!=wG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wG(e)?e:String(e)}function EG(t,e){return(EG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=BG(t);if(e){var o=BG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bG(this,r)}}function bG(t,e){if(e&&("object"===wG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function BG(t){return(BG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function wG(t){return(wG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}yG=gG([Ek({level:"L0"})],yG);var PG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},SG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&EG(t,e)}(i,t);var e,r,n,o=CG(i);function i(){return vG(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"parseModelPlankPath",value:function(t){return e=t.modelID,r=t.data,n=[],o=r.path?Vn(ye.OUTER,r.path):void 0,i=r.holes.map((function(t){return Vn(ye.INNER,t)})),a=new Map,o&&(n.push(o),a.set(o,i)),n.push.apply(n,AE(i)),new dE(e,n,a);var e,r,n,o,i,a}},{key:"syncModelPlankPath",value:function(t){EE(t)}}])&&mG(e.prototype,r),n&&mG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function _G(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_G=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==LG(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(LG(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function QG(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function OG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xG(n.key),n)}}function xG(t){var e=function(t,e){if("object"!=LG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LG(e)?e:String(e)}function MG(t,e){return(MG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jG(t);if(e){var o=jG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TG(this,r)}}function TG(t,e){if(e&&("object"===LG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jG(t){return(jG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LG(t){return(LG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}SG=PG([Ek({level:"L0"})],SG);var kG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":LG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},NG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&MG(t,e)}(s,t);var e,r,n,o,i,a=RG(s);function s(){return OG(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"stable",value:(o=_G().mark((function t(e){return _G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",V_().viewParamModel.validateModelStable(e.modelId));case 1:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){QG(i,r,n,a,s,"next",t)}function s(t){QG(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&DG(e.prototype,r),n&&DG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(Pk);function FG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UG(n.key),n)}}function UG(t){var e=function(t,e){if("object"!=qG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qG(e)?e:String(e)}function zG(t,e){return(zG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function YG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=VG(t);if(e){var o=VG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return HG(this,r)}}function HG(t,e){if(e&&("object"===qG(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function VG(t){return(VG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qG(t){return(qG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}NG=kG([Ek()],NG);var WG=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":qG(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},KG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zG(t,e)}(i,t);var e,r,n,o=YG(i);function i(){var t;return FG(this,i),(t=o.apply(this,arguments)).drawDimensionLine=function(t,e){return V_().rulerLine.addDimensionRuler(t,e)},t}return e=i,(r=[{key:"removeDimensionLine",value:function(t){return V_().rulerLine.removeDimensionRuler(t)}},{key:"clearDimensionLine",value:function(){return V_().rulerLine.removeDimensionRuler()}},{key:"drawSpacingDistanceLine",value:function(t,e){return V_().rulerLine.addSpacingDistanceRuler(t,e)}},{key:"removeSpacingDistanceLine",value:function(t){return V_().rulerLine.removeSpacingDistanceRuler(t)}},{key:"clearSpacingDistanceLine",value:function(){return V_().rulerLine.removeSpacingDistanceRuler()}}])&&GG(e.prototype,r),n&&GG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function JG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ZG(n.key),n)}}function ZG(t){var e=function(t,e){if("object"!=nU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nU(e)?e:String(e)}function $G(t,e){return($G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rU(t);if(e){var o=rU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eU(this,r)}}function eU(t,e){if(e&&("object"===nU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rU(t){return(rU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function nU(t){return(nU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}KG=WG([Ek()],KG);var oU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":nU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},iU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$G(t,e)}(i,t);var e,r,n,o=tU(i);function i(){return JG(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDesignMode",value:function(t){var e=t.mode,r=t.customModeCb;dL().designModeContext.setDesignMode(e,r)}},{key:"registerMultiSelectShortcut",value:function(t){dL().designModeContext.registerMultiSelectShortcut(t)}}])&&XG(e.prototype,r),n&&XG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function aU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uU(n.key),n)}}function uU(t){var e=function(t,e){if("object"!=hU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hU(e)?e:String(e)}function cU(t,e){return(cU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function AU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fU(t);if(e){var o=fU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lU(this,r)}}function lU(t,e){if(e&&("object"===hU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fU(t){return(fU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hU(t){return(hU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}iU=oU([Ek({level:"L0"})],iU);var pU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},dU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cU(t,e)}(i,t);var e,r,n,o=AU(i);function i(){return aU(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setGetJsonConfig",value:function(t){if(!t||"object"!==hU(t))throw new Error("option 必须是一个对象");!function(t,e){BC[t]=CC(CC({},BC[t]),e)}("getJsonConfig",t)}}])&&sU(e.prototype,r),n&&sU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);function gU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */gU=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==PU(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(PU(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function yU(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function vU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yU(i,n,o,a,s,"next",t)}function s(t){yU(i,n,o,a,s,"throw",t)}a(void 0)}))}}function mU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EU(n.key),n)}}function EU(t){var e=function(t,e){if("object"!=PU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==PU(e)?e:String(e)}function CU(t,e){return(CU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=wU(t);if(e){var o=wU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BU(this,r)}}function BU(t,e){if(e&&("object"===PU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wU(t){return(wU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function PU(t){return(PU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}dU=pU([Ek()],dU);var SU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_U=function(){return V_().fittingDesign.fittingViewer},QU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CU(t,e)}(l,t);var e,r,n,o,i,a,s,u,c,A=bU(l);function l(){return mU(this,l),A.apply(this,arguments)}return e=l,(r=[{key:"addFitting",value:(c=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().addFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"clearFitting",value:(u=vU(gU().mark((function t(){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_U().clearFitting();case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getFitting",value:(s=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().getFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"addHardware",value:(a=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().addHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"clearHardware",value:(i=vU(gU().mark((function t(){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_U().clearHardware();case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getHardware",value:(o=vU(gU().mark((function t(e){return gU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_U().getHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&IU(e.prototype,r),n&&IU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(Pk);function OU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DU(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xU(n.key),n)}}function xU(t){var e=function(t,e){if("object"!=LU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LU(e)?e:String(e)}function MU(t,e){return(MU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RU(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jU(t);if(e){var o=jU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TU(this,r)}}function TU(t,e){if(e&&("object"===LU(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jU(t){return(jU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LU(t){return(LU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}QU=SU([Ek({level:"L0"})],QU);var kU=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":LU(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},NU=function(){return V_().detection},FU=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&MU(t,e)}(i,t);var e,r,n,o=RU(i);function i(){var t;return OU(this,i),(t=o.apply(this,arguments)).onAfterDetect=function(t){_r.on(wr.DETECT_RESULT_CHANGE,t)},t.offAfterDetect=function(t){_r.off(wr.DETECT_RESULT_CHANGE,t)},t}return e=i,(r=[{key:"enableDetection",value:function(){NU().enableDetectionOnce()}},{key:"setDetectionUI",value:function(t){NU().setDetectionUIOnce(t)}}])&&DU(e.prototype,r),n&&DU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pk);FU=kU([Ek()],FU);var GU=r(317),UU=r.n(GU),zU=new pu.I18NManager,YU="custom_order_split",HU={"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 VU(t){return(VU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qU=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==VU(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(VU(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function WU(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function KU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){WU(i,n,o,a,s,"next",t)}function s(t){WU(i,n,o,a,s,"throw",t)}a(void 0)}))}}var JU=Object(Or.once)((function(){return!!Object(pg.parseServQueryParams)()}));function XU(){return ZU.apply(this,arguments)}function ZU(){return(ZU=KU(qU().mark((function t(){var e,r,n=arguments;return qU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=pg.servkit.createTerminal({id:e.clientId||"custom-order-split",type:pg.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:pg.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.parent,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $U=void 0,tz=!1,ez=Date.now();function rz(){void 0!==$U&&(window.clearInterval($U),$U=void 0)}function nz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nz=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==pz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(pz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function oz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function iz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function az(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uz(n.key),n)}}function sz(t,e,r){return e&&az(t.prototype,e),r&&az(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uz(t){var e=function(t,e){if("object"!=pz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pz(e)?e:String(e)}function cz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Az(t,e)}function Az(t,e){return(Az=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hz(t);if(e){var o=hz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fz(this,r)}}function fz(t,e){if(e&&("object"===pz(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hz(t){return(hz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pz(t){return(pz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dz,gz,yz=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pz(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vz=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pz(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mz=function(t){cz(r,t);var e=lz(r);function r(){return iz(this,r),e.apply(this,arguments)}return sz(r,[{key:"postMessageToHost",value:function(t,e){return Object(pg.API_UNSUPPORT)()}}]),r}(pg.ServService);yz([pg.anno.decl.event(),vz("design:type","function"==typeof(dz=void 0!==pg.ServEventer&&pg.ServEventer)?dz:Object)],mz.prototype,"watcher",void 0),yz([pg.anno.decl.api(),vz("design:type",Function),vz("design:paramtypes",[Object,String]),vz("design:returntype","function"==typeof(gz=void 0!==pg.ServAPIRetn&&pg.ServAPIRetn)?gz:Object)],mz.prototype,"postMessageToHost",null);var Iz=function(t){cz(o,t);var e,r,n=lz(o);function o(){return iz(this,o),n.apply(this,arguments)}return sz(o,[{key:"postMessageToHost",value:(e=nz().mark((function t(e,r){return nz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.parent.postMessage(e,null!=r?r:"*");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){oz(i,n,o,a,s,"next",t)}function s(t){oz(i,n,o,a,s,"throw",t)}a(void 0)}))},function(t,e){return r.apply(this,arguments)})}]),o}(mz=yz([pg.anno.decl({id:"com.custom.miniapp.model.viewer.booter.message.service",version:"1.0.0"})],mz));function Ez(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ez=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==xz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(xz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Cz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function bz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pz(n.key),n)}}function wz(t,e,r){return e&&Bz(t.prototype,e),r&&Bz(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pz(t){var e=function(t,e){if("object"!=xz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xz(e)?e:String(e)}function Sz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_z(t,e)}function _z(t,e){return(_z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dz(t);if(e){var o=Dz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oz(this,r)}}function Oz(t,e){if(e&&("object"===xz(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Dz(t){return(Dz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xz(t){return(xz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Iz=yz([pg.anno.impl()],Iz);var Mz,Rz=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xz(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Tz=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":xz(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},jz=function(t){Sz(r,t);var e=Qz(r);function r(){return bz(this,r),e.apply(this,arguments)}return wz(r,[{key:"heart",value:function(){return Object(pg.API_UNSUPPORT)()}}]),r}(pg.ServService);Rz([pg.anno.decl.api(),Tz("design:type",Function),Tz("design:paramtypes",[]),Tz("design:returntype","function"==typeof(Mz=void 0!==pg.ServAPIRetn&&pg.ServAPIRetn)?Mz:Object)],jz.prototype,"heart",null);var Lz=function(t){Sz(o,t);var e,r,n=Qz(o);function o(){return bz(this,o),n.apply(this,arguments)}return wz(o,[{key:"heart",value:(e=Ez().mark((function t(){return Ez().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){Cz(i,n,o,a,s,"next",t)}function s(t){Cz(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})}]),o}(jz=Rz([pg.anno.decl({id:"com.custom.miniapp.model.viewer.booter.session.service",version:"1.0.0"})],jz));function kz(t){return(kz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nz=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==kz(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kz(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Fz(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Gz(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fz(i,n,o,a,s,"next",t)}function s(t){Fz(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Uz(t){return zz.apply(this,arguments)}function zz(){return(zz=Gz(Nz().mark((function t(e){var r,n,o;return Nz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.onlineChecker,n=e.interval,o=e.onBreak,t.next=3,sC(n);case 3:return t.next=5,r();case 5:t.sent?Uz(e):o&&"function"==typeof o&&o();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Vz(n.key),n)}}function Hz(t,e,r){return e&&Yz(t.prototype,e),r&&Yz(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vz(t){var e=function(t,e){if("object"!=$z(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$z(e)?e:String(e)}function qz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wz(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kz(t,e)}function Kz(t,e){return(Kz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jz(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zz(t);if(e){var o=Zz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xz(this,r)}}function Xz(t,e){if(e&&("object"===$z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zz(t){return(Zz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $z(t){return($z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Lz=Rz([pg.anno.impl()],Lz);var tY,eY=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":$z(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},rY=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":$z(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},nY=function(t){Wz(r,t);var e=Jz(r);function r(){return qz(this,r),e.apply(this,arguments)}return Hz(r)}(pg.ServService);eY([pg.anno.decl.event(),rY("design:type","function"==typeof(tY=void 0!==pg.ServEventer&&pg.ServEventer)?tY:Object)],nY.prototype,"offlineWatcher",void 0);var oY=function(t){Wz(r,t);var e=Jz(r);function r(){return qz(this,r),e.apply(this,arguments)}return Hz(r)}(nY=eY([pg.anno.decl({id:"com.custom.miniapp.model.viewer.independent.state.service",version:"1.0.0"})],nY));oY=eY([pg.anno.impl()],oY);var iY=[{decl:nY,impl:oY}];function aY(t){return(aY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==aY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(aY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function uY(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function cY(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uY(i,n,o,a,s,"next",t)}function s(t){uY(i,n,o,a,s,"throw",t)}a(void 0)}))}}var AY="custom-order-split-transfer";function lY(t){return fY.apply(this,arguments)}function fY(){return(fY=cY(sY().mark((function t(e){var r,n,o=arguments;return sY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=pg.servkit.createTerminal({id:r.clientId||AY,type:pg.EServTerminal.MASTER,server:{serviceRefer:/.*/,service:{services:[]}},session:{channel:{type:pg.EServChannel.WINDOW,config:{master:{createWindow:function(t){return{target:e,origin:"*"}},destroyWindow:function(){e.close()}}}}}}),t.next=4,n.openSession({timeout:r.timeout||3e4});case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hY(){return pY.apply(this,arguments)}function pY(){return(pY=cY(sY().mark((function t(){var e,r,n=arguments;return sY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=pg.servkit.createTerminal({id:e.clientId||AY,type:pg.EServTerminal.SLAVE,server:{serviceRefer:/.*/,service:{services:iY}},session:{channel:{type:pg.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.opener,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var dY=r(836),gY=r(150);function yY(t){return(yY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */vY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==yY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(yY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function mY(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return IY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IY(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IY(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function EY(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}window.React=yu.a;var CY=document.getElementById("root");function bY(){return Promise.resolve([dY.a,vN]).then(function(){var t,e=(t=vY().mark((function t(e){var r,n,o,i;return vY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=mY(e,2),n=r[0],o=r[1],i=new n,t.next=4,i.registerPlugin(o).start({fpsDetectorEnabled:!0});case 4:return t.next=6,BY(i.getAppNodeId());case 6:document.body.removeChild(CY);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){EY(i,n,o,a,s,"next",t)}function s(t){EY(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()).catch((function(t){Object(gY.unmountComponentAtNode)(CY),Object(gY.render)(yu.a.createElement(AQ,null),CY),console.error("micros/pad",t)}))}function BY(t){var e=uC(5e3);return function r(){requestAnimationFrame((function(){document.querySelector("#".concat(t))?e.resolve():r()}))}(),e.promise}function wY(t){return(wY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function PY(t,e,r){return(e=DY(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SY(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */SY=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==wY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function _Y(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function QY(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_Y(i,n,o,a,s,"next",t)}function s(t){_Y(i,n,o,a,s,"throw",t)}a(void 0)}))}}function OY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,DY(n.key),n)}}function DY(t){var e=function(t,e){if("object"!=wY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wY(e)?e:String(e)}var xY=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.serviceMap=new Map,this.getHost=function(){return t.isIndependentMiniApp()?{booter:window.opener,postMessage:function(t,r){return e.sappSDK.client.getService(mz).postMessageToHost(t,r)},onMessageReceive:function(t){return e.sappSDK.client.getService(mz).watcher.on(t)}}:{postMessage:function(t,e){return window.parent.postMessage(t,null!=e?e:"*")},onMessageReceive:function(t){return window.addEventListener("message",t)}}},this.handleFocus=Object(Or.throttle)((function(){var t;t=function(t){e.logSplitOrderTime(t)},tz||(rz(),ez=Date.now(),tz=!0,$U=window.setInterval((function(){t(10),ez=Date.now()}),1e4))}),200),this.handleBlur=Object(Or.throttle)((function(){if(tz){var t=(n=ez,rz(),tz=!1,ez=Date.now(),n),r=(Date.now()-t)/1e3;e.logSplitOrderTime(r)}var n}),200),this.initLange(ae.ZH_CN,{zh_CN:HU}),function(t){uI=t}(this)}var e,r,n,o,i,a;return e=t,r=[{key:"startOnApiCalledEvent",value:function(){var t=this.getCustomMiniAppService(sm);_r.on(wr.API_CALLED,(function(e){t&&(t.logAnalyseApiCalledInfo(e),e.status||t.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:e.errMsg,stack:""}))}))}},{key:"isInCustomMiniAppMode",value:function(){return JU()}},{key:"createDebugUtils",value:function(){var t=this.serviceMap,e={enableDebug:function(){window.__customsdk__.services=t}};window.__customsdk__=e}},{key:"start",value:(a=QY(SY().mark((function e(r){var n,o=this;return SY().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!t.isIndependentMiniApp()){e.next=11;break}return e.next=4,hY(r);case 4:return this.sappSDK=e.sent,e.next=7,sC(30);case 7:Uz({onlineChecker:function(){var t=QY(SY().mark((function t(){return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.race([o.sappSDK.client.getService(jz).heart().then((function(){return!0})),sC(2e3).then((function(){return Promise.resolve(!1)}))]);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),interval:5e3,onBreak:function(){return window.close()}}),window.addEventListener("beforeunload",(function(){o.sappSDK.server.getService(nY).offlineWatcher.emit()})),e.next=23;break;case 11:if(!this.isInCustomMiniAppMode()){e.next=18;break}if(pg.sappSDK.isStarted){e.next=15;break}return e.next=15,pg.sappSDK.setConfig({useTerminalId:null==r?void 0:r.clientId,onClose:function(){var t=QY(SY().mark((function t(e){return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.stop();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}).start();case 15:this.sappSDK=pg.sappSDK,e.next=23;break;case 18:return e.next=20,sC(30);case 20:return e.next=22,XU(r);case 22:this.sappSDK=e.sent;case 23:return this.startOnApiCalledEvent(),e.next=26,bY();case 26:(n=this.getCustomMiniAppService($v))?(_d().setMiniAppHttpProxyClientService(n),FI(_d())):FI(Sd()),(xI=new NI.AttachedService).config.setRequestClient(RI),MI=new NI.ParamModelDataService({paramModelConstructor:gr,requestClient:RI}),new NI.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Pr,requestClient:RI}),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur);case 31:case"end":return e.stop()}}),e,this)}))),function(t){return a.apply(this,arguments)})},{key:"logSplitOrderTime",value:(i=QY(SY().mark((function e(r){var n,o,i,a,s;return SY().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=this.getCustomMiniAppService(sm),o=this.getCustomMiniAppService(pm),i=this.getCustomMiniAppService(dm),e.next=6,null==o?void 0:o.getFOPOrderId();case 6:return a=e.sent,e.next=9,null==i?void 0:i.getRootAccountId();case 9:s=e.sent,null==n||n.log({behavior:"miniAppFOPOrderModeTime",type:"splitOrder",fopOrderId:a,rootAccountId:s,time:r,isIndependentMiniApp:t.isIndependentMiniApp()}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),console.error("LOG TIME ERR",e.t0);case 16:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(t){return i.apply(this,arguments)})},{key:"initLange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae.ZH_CN,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Or.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),UU.a.init({lang:t,debug:!1,initImmediate:!0,translatorType:GU.ENUM.TranslatorType.I18next,packages:[YU],resource:PY({},YU,e)}),zU.init({namespace:YU,resources:YU})}},{key:"stop",value:(o=QY(SY().mark((function t(){var e;return SY().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.getCustomMiniAppService(em))){t.next=4;break}return t.next=4,e.lockModelBySplit();case 4:this.serviceMap.forEach((function(t){Object(Or.isFunction)(t.__onDestroy)&&t.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(t){if(Pk.isPrototypeOf(t)){var e=this.serviceMap,r=e.get(t);return r||(r=new t,e.set(t,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof pg.SappSDK?e.getService(t):e.client.getService(t)}},{key:"getCustomMiniAppServiceUnSafe",value:function(t){return this.getCustomMiniAppService(t)}}],n=[{key:"isIndependentMiniApp",value:function(){return!!window.opener}}],r&&OY(e.prototype,r),n&&OY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),MY=[{decl:jz,impl:Lz},{decl:mz,impl:Iz}];function RY(t){return(RY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function TY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kY(n.key),n)}}function LY(t,e,r){return e&&jY(t.prototype,e),r&&jY(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kY(t){var e=function(t,e){if("object"!=RY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=RY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==RY(e)?e:String(e)}function NY(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&FY(t,e)}function FY(t,e){return(FY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GY(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zY(t);if(e){var o=zY(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UY(this,r)}}function UY(t,e){if(e&&("object"===RY(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zY(t){return(zY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YY(t){return function(t){if(Array.isArray(t))return HY(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return HY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HY(t,e)}(t)||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 HY(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var VY=[LI.MiniAppDesignBaseInfoService,LI.MiniAppParamModelJsonDataService,sm,rm,$v,em,bm,fm,nm,hm,pm,dm];function qY(){for(var t=new Map,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){var r=e.meta(),n=(null==r?void 0:r.id)||"";t.has(n)||t.set(n,e)})),YY(t.values())}var WY=function(t){return function(e){NY(n,e);var r=GY(n);function n(){return TY(this,n),r.apply(this,arguments)}return LY(n,[{key:"meta",value:function(){return t}}],[{key:"meta",value:function(){return t}}]),n}(pg.ServService)};function KY(t,e,r){return t.map((function(t){var n=t.meta()||{},o=n.apis,i=n.evts,a=function(t){NY(r,t);var e=GY(r);function r(){return TY(this,r),e.apply(this,arguments)}return LY(r)}(t);return null==o||o.forEach((function(r){var n=r.name;a.prototype[n]=e(t)[n]})),null==i||i.forEach((function(n){var o=n.name;e(t)[o].on((function(e){r(t)[o].emit(e)}))})),{decl:t,impl:a}}))}function JY(t){return(JY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function XY(t){return function(t){if(Array.isArray(t))return ZY(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ZY(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZY(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $Y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */$Y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==JY(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(JY(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function tH(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function eH(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tH(i,n,o,a,s,"next",t)}function s(t){tH(i,n,o,a,s,"throw",t)}a(void 0)}))}}function rH(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nH(n.key),n)}}function nH(t){var e=function(t,e){if("object"!=JY(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=JY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==JY(e)?e:String(e)}var oH=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.proxyTerminals=new Set,this.initializeServer=function(){var t=eH($Y().mark((function t(e){var n;return $Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!JU()){t.next=7;break}if(pg.sappSDK.isStarted){t.next=4;break}return t.next=4,pg.sappSDK.setConfig({useTerminalId:null==e?void 0:e.clientId}).start();case 4:r.sappSDK=pg.sappSDK,t.next=12;break;case 7:return t.next=9,sC(30);case 9:return t.next=11,XU(e);case 11:r.sappSDK=t.sent;case 12:return t.next=14,r.getCustomMiniAppService(tm).getAllAvailableService();case 14:return n=t.sent,window.addEventListener("message",(function(t){t.source===window.parent&&r.proxyTerminals.forEach((function(e){e.server.getService(mz).watcher.emit({data:t.data,origin:t.origin})}))})),t.abrupt("return",n);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.serverDefer=this.initializeServer(e)}var e,r,n,o;return e=t,(r=[{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof pg.SappSDK?e.getService(t):e.client.getService(t)}},{key:"bootstrap",value:(o=eH($Y().mark((function t(e){var r,n,o,i,a,s,u,c,A=this;return $Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.proxyTerminals.size>0)){t.next=2;break}throw new Error("当前仅支持打开一个独立小程序");case 2:return t.next=4,this.serverDefer;case 4:if(r=t.sent,n=e.url,o=window.open(n)){t.next=9;break}throw new Error("打开小程序失败!请检查url或者主动解除弹窗限制");case 9:return i=function(){a.closeSession(),A.proxyTerminals.delete(a)},t.next=12,lY(o);case 12:return a=t.sent,s=r.map(WY),u=qY.apply(void 0,XY(s).concat(XY(VY))),c=KY(u,(function(t){return A.getCustomMiniAppService(t)}),(function(t){return a.server.getService(t)})),a.server.addServices([].concat(XY(c),XY(MY))),a.client.getService(nY).offlineWatcher.on(i),this.proxyTerminals.add(a),t.abrupt("return",o);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&rH(e.prototype,r),n&&rH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},function(t,e,r){"use strict";r.r(e),r.d(e,"changeLanguage",(function(){return X})),r.d(e,"cloneInstance",(function(){return Z})),r.d(e,"createInstance",(function(){return $})),r.d(e,"dir",(function(){return tt})),r.d(e,"exists",(function(){return et})),r.d(e,"getFixedT",(function(){return rt})),r.d(e,"init",(function(){return nt})),r.d(e,"loadLanguages",(function(){return ot})),r.d(e,"loadNamespaces",(function(){return it})),r.d(e,"loadResources",(function(){return at})),r.d(e,"off",(function(){return st})),r.d(e,"on",(function(){return ut})),r.d(e,"setDefaultNamespace",(function(){return ct})),r.d(e,"t",(function(){return At})),r.d(e,"use",(function(){return lt}));var n=r(287),o=r.n(n),i=r(197),a=r.n(i),s=r(208),u=r.n(s),c=r(209),A=r.n(c),l=r(372),f=r.n(l),h=r(398),p=r.n(h),d=r(399),g=r.n(d),y=r(223),v=r.n(y),m=r(906),I=r.n(m),E={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){var r;console&&console[t]&&(r=console)[t].apply(r,I()(e))}},C=new(function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.init(e,r)}return A()(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||E,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,r,n){return n&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,a()({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),b=function(){function t(){u()(this,t),this.observers={}}return A()(t,[{key:"on",value:function(t,e){var r=this;return t.split(" ").forEach((function(t){r.observers[t]=r.observers[t]||[],r.observers[t].push(e)})),this}},{key:"off",value:function(t,e){var r=this;this.observers[t]&&this.observers[t].forEach((function(){if(e){var n=r.observers[t].indexOf(e);n>-1&&r.observers[t].splice(n,1)}else delete r.observers[t]}))}},{key:"emit",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach((function(t){t.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(e){e.apply(e,[t].concat(r))}))}}}]),t}();function B(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return r.resolve=t,r.reject=e,r}function w(t){return null==t?"":""+t}function P(t,e,r){t.forEach((function(t){e[t]&&(r[t]=e[t])}))}function S(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function _(t,e,r){var n=S(t,e,Object);n.obj[n.k]=r}function Q(t,e){var r=S(t,e),n=r.obj,o=r.k;if(n)return n[o]}function O(t,e,r){for(var n in e)n in t?"string"==typeof t[n]||t[n]instanceof String||"string"==typeof e[n]||e[n]instanceof String?r&&(t[n]=e[n]):O(t[n],e[n],r):t[n]=e[n];return t}function D(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return x[t]})):t}var R=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),r.data=t||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return g()(e,t),A()(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[t,e];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(i=t.split(".")),Q(this.data,i)}},{key:"addResource",value:function(t,e,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=[t,e];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(n=e,e=(a=t.split("."))[1]),this.addNamespaces(e),_(this.data,a,n),o.silent||this.emit("added",t,e,r,n)}},{key:"addResources",value:function(t,e,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(t,e,o,r[o],{silent:!0});n.silent||this.emit("added",t,e,r)}},{key:"addResourceBundle",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(n=r,r=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var u=Q(this.data,s)||{};n?O(u,r,o):u=a()({},u,r),_(this.data,s,u),i.silent||this.emit("added",t,e,r)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a()({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(b),T={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,r,n,o){var i=this;return t.forEach((function(t){i.processors[t]&&(e=i.processors[t].process(e,r,n,o))})),e}},j=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),P(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],t,v()(v()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=C.create("translator"),r}return g()(e,t),A()(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,e);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(t,e){var r=e.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,o=e.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var i=t.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(n)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function(t,e){var r=this;if("object"!==o()(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),s=i.key,u=i.namespaces,c=u[u.length-1],A=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(A&&"cimode"===A.toLowerCase()){if(l){var f=e.nsSeparator||this.options.nsSeparator;return c+f+s}return s}var h=this.resolve(t,e),p=h&&h.res,d=h&&h.usedKey||s,g=h&&h.exactUsedKey||s,y=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(I&&p&&E&&v.indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,p,e):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(n){var C="[object Array]"===y,b=C?[]:{},B=C?g:d;for(var w in p)if(Object.prototype.hasOwnProperty.call(p,w)){var P="".concat(B).concat(n).concat(w);b[w]=this.translate(P,a()({},e,{joinArrays:!1,ns:u})),b[w]===P&&(b[w]=p[w])}p=b}}else if(I&&"string"==typeof m&&"[object Array]"===y)(p=p.join(m))&&(p=this.extendTranslation(p,t,e));else{var S=!1,_=!1;if(!this.isValidLookup(p)&&void 0!==e.defaultValue){if(S=!0,void 0!==e.count){var Q=this.pluralResolver.getSuffix(A,e.count);p=e["defaultValue".concat(Q)]}p||(p=e.defaultValue)}this.isValidLookup(p)||(_=!0,p=s);var O=e.defaultValue&&e.defaultValue!==p&&this.options.updateMissing;if(_||S||O){this.logger.log(O?"updateKey":"missingKey",A,c,s,O?e.defaultValue:p);var D=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var M=0;M<x.length;M++)D.push(x[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(e.lng||this.language):D.push(e.lng||this.language);var R=function(t,n){r.options.missingKeyHandler?r.options.missingKeyHandler(t,c,n,O?e.defaultValue:p,O,e):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,c,n,O?e.defaultValue:p,O,e),r.emit("missingKey",t,c,n,p)};if(this.options.saveMissing){var T=void 0!==e.count&&"string"!=typeof e.count;this.options.saveMissingPlurals&&T?D.forEach((function(t){r.pluralResolver.getPluralFormsOfKey(t,s).forEach((function(e){return R([t],e)}))})):R(D,s)}}p=this.extendTranslation(p,t,e,h),_&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(c,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(t,e,r,n){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,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)),t=this.interpolator.interpolate(t,i,r.lng||this.language,r),!1!==r.nest&&(t=this.interpolator.nest(t,(function(){return o.translate.apply(o,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var s=r.postProcess||this.options.postProcess,u="string"==typeof s?[s]:s;return null!=t&&u&&u.length&&!1!==r.applyPostProcessor&&(t=T.handle(u,t,e,r,this)),t}},{key:"resolve",value:function(t){var e,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),c=u.key;r=c;var A=u.namespaces;a.options.fallbackNS&&(A=A.concat(a.options.fallbackNS));var l=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);A.forEach((function(t){a.isValidLookup(e)||(i=t,h.forEach((function(r){if(!a.isValidLookup(e)){o=r;var i,u,A=c,h=[A];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(h,c,r,t,s);else l&&(i=a.pluralResolver.getSuffix(r,s.count)),l&&f&&h.push(A+i),f&&h.push(A+="".concat(a.options.contextSeparator).concat(s.context)),l&&h.push(A+=i);for(;u=h.pop();)a.isValidLookup(e)||(n=u,e=a.getResource(r,t,u,s))}})))}))}})),{res:e,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,r,n):this.resourceStore.getResource(t,e,r,n)}}]),e}(b);function L(t){return t.charAt(0).toUpperCase()+t.slice(1)}var k=function(){function t(e){u()(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=C.create("languageUtils")}return A()(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(t){return t.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),e.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()),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),e.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,e){var r=this,n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(r.isWhitelisted(t)?o.push(t):r.logger.warn("rejecting non-whitelisted language code: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),n.forEach((function(t){o.indexOf(t)<0&&i(r.formatLanguageCode(t))})),o}}]),t}(),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}],F={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1===t?0:2===t?1:(t<0||t>10)&&t%10==0?2:3)}};function G(){var t={};return N.forEach((function(e){e.lngs.forEach((function(r){t[r]={numbers:e.nr,plurals:F[e.fc]}}))})),t}var U=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.languageUtils=e,this.options=r,this.logger=C.create("pluralResolver"),this.rules=G()}return A()(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var r=this,n=[],o=this.getRule(t);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(t,o);n.push("".concat(e).concat(i))})),n):n}},{key:"getSuffix",value:function(t,e){var r=this,n=this.getRule(t);if(n){var o=n.noAbs?n.plurals(e):n.plurals(Math.abs(e)),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(t)),""}}]),t}(),z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),this.logger=C.create("interpolator"),this.init(e,!0)}return A()(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;e&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:M,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?D(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?D(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?D(r.nestingPrefix):r.nestingPrefixEscaped||D("$t("),this.nestingSuffix=r.nestingSuffix?D(r.nestingSuffix):r.nestingSuffixEscaped||D(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,e,r,n){var o,i,a,s=this;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(s.formatSeparator)<0)return Q(e,t);var n=t.split(s.formatSeparator),o=n.shift().trim(),i=n.join(s.formatSeparator).trim();return s.format(Q(e,o),i,r)};this.resetRegExp();var A=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;(o=this.regexpUnescape.exec(t))&&(i=c(o[1].trim()),t=t.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;o=this.regexp.exec(t);){if(void 0===(i=c(o[1].trim())))if("function"==typeof A){var l=A(t,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=w(i));if(i=this.escapeValue?u(this.escape(i)):u(i),t=t.replace(o[0],i),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t}},{key:"nest",value:function(t,e){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a()({},o);function s(t,e){if(t.indexOf(",")<0)return t;var r=t.split(",");t=r.shift();var n=r.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),e&&(i=a()({},e,i))}catch(e){this.logger.error("failed parsing options string in nesting for key ".concat(t),e)}return t}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);){if((n=e(s.call(this,r[1].trim(),i),i))&&r[0]===t&&"string"!=typeof n)return n;"string"!=typeof n&&(n=w(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),n=""),t=t.replace(r[0],n),this.regexp.lastIndex=0}return t}}]),t}(),Y=r(766),H=r.n(Y);var V=function(t){function e(t,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u()(this,e),o=f()(this,p()(e).call(this)),b.call(v()(v()(o))),o.backend=t,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=C.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return g()(e,t),A()(e,[{key:"queueLoad",value:function(t,e,r,n){var o=this,i=[],a=[],s=[],u=[];return t.forEach((function(t){var n=!0;e.forEach((function(e){var s="".concat(t,"|").concat(e);!r.reload&&o.store.hasResourceBundle(t,e)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(e)<0&&u.push(e)))})),n||s.push(t)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,r){var n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];e&&this.emit("failedLoading",i,a,e),r&&this.store.addResourceBundle(i,a,r),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(r){var n,o,u,c,A,l;n=r.loaded,o=a,c=S(n,[i],Object),A=c.obj,l=c.k,A[l]=A[l]||[],u&&(A[l]=A[l].concat(o)),u||A[l].push(o),function(t,e){for(var r=t.indexOf(e);-1!==r;)t.splice(r,1),r=t.indexOf(e)}(r.pending,t),e&&r.errors.push(e),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){s[t]||(s[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(e){s[t].indexOf(e)<0&&s[t].push(e)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,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 t.length?this.backend[r](t,e,(function(s,u){s&&u&&o<5?setTimeout((function(){n.read.call(n,t,e,r,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(t,e){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 t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(t){r.loadOne(t)}))}},{key:"load",value:function(t,e,r){this.prepareLoading(t,e,{},r)}},{key:"reload",value:function(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}},{key:"loadOne",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];this.read(i,a,"read",null,null,(function(n,o){n&&e.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),n),!n&&o&&e.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),o),e.loaded(t,n,o)}))}},{key:"saveMissing",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,r,n,null,a()({},i,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],e,r,n)}}]),e}(b);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===o()(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===o()(t[2])||"object"===o()(t[3])){var r=t[3]||t[2];Object.keys(r).forEach((function(t){e[t]=r[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function W(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function K(){}var J=new(function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(u()(this,e),t=f()(this,p()(e).call(this)),b.call(v()(v()(t))),t.options=W(r),t.services={},t.logger=C,t.modules={external:[]},n&&!t.isInitialized&&!r.isClone){if(!t.options.initImmediate)return t.init(r,n),f()(t,v()(v()(t)));setTimeout((function(){t.init(r,n)}),0)}return t}return g()(e,t),A()(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(r=e,e={}),this.options=a()({},q(),this.options,W(e)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?C.init(n(this.modules.logger),this.options):C.init(null,this.options);var o=new k(this.options);this.store=new R(this.options.resources,this.options);var i=this.services;i.logger=C,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new z(this.options),i.backendConnector=new V(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].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 j(this.services,this.options),this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}var s=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var u=B(),c=function(){t.changeLanguage(t.options.lng,(function(e,n){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(n),r(e,n)}))};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return e();var r=[],n=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(t){r.indexOf(t)<0&&r.push(t)}))};if(this.language)n(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach((function(t){return n(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return n(t)})),this.services.backendConnector.load(r,this.options.ns,e)}else e(null)}},{key:"reloadResources",value:function(t,e,r){var n=B();return t||(t=this.languages),e||(e=this.options.ns),r||(r=K),this.services.backendConnector.reload(t,e,(function(t){n.resolve(),r(t)})),n}},{key:"use",value:function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&T.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var r=this,n=B();this.emit("languageChanging",t);var o=function(t){t&&(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.translator.language||r.translator.changeLanguage(t),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(t)),r.loadResources((function(o){!function(t,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),e&&e(t,(function(){return r.t.apply(r,arguments)}))}(o,t)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(t,e){var r=this,n=function t(e,n){var i=a()({},n);if("object"!==o()(n)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,n].concat(u))}return i.lng=i.lng||t.lng,i.lngs=i.lngs||t.lngs,i.ns=i.ns||t.ns,r.t(e,i)};return"string"==typeof t?n.lng=t:n.lngs=t,n.ns=e,n}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"loadNamespaces",value:function(t,e){var r=this,n=B();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){r.options.ns.indexOf(t)<0&&r.options.ns.push(t)})),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var r=B();"string"==typeof t&&(t=[t]);var n=this.options.preload||[],o=t.filter((function(t){return n.indexOf(t)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)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(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new e(t,r)}},{key:"cloneInstance",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=a()({},this.options,r,{isClone:!0}),i=new e(o),s=["store","services","language"];return s.forEach((function(e){i[e]=t[e]})),i.translator=new j(i.services,i.options),i.translator.on("*",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];i.emit.apply(i,[t].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),e}(b)),X=(e.default=J,J.changeLanguage.bind(J)),Z=J.cloneInstance.bind(J),$=J.createInstance.bind(J),tt=J.dir.bind(J),et=J.exists.bind(J),rt=J.getFixedT.bind(J),nt=J.init.bind(J),ot=J.loadLanguages.bind(J),it=J.loadNamespaces.bind(J),at=J.loadResources.bind(J),st=J.off.bind(J),ut=J.on.bind(J),ct=J.setDefaultNamespace.bind(J),At=J.t.bind(J),lt=J.use.bind(J)},function(t,e,r){"use strict";r.r(e);var n=new(function(){function t(){var t=this;this.profiling={frames:[],interactions:[]},this.profilingStarted=!1,this.indexRecordMap=new Map,this.interactionMapToPayload=new Map,this.startProfiling=function(){t.profilingStarted=!0,t.profiling={frames:[],interactions:[]},t.indexRecordMap.clear(),t.interactionMapToPayload.clear()},this.stopProfiling=function(){t.profilingStarted=!1},this.getProfiling=function(){return t.profiling},this.getPayloadFromInteraction=function(e){return t.interactionMapToPayload.get(e)},this.getIndexRecordByName=function(e){var r=t.indexRecordMap.get(e);return r&&0!==r.length?r:null},this.onFrame=function(e){t.profilingStarted&&t.profiling.frames.push(e)}}return Object.defineProperty(t.prototype,"isProfiling",{get:function(){return this.profilingStarted},enumerable:!0,configurable:!0}),t.prototype.onInteraction=function(t,e){var r=this.indexRecordMap.get(t.name);if(r&&0!==r.length){var n=r[r.length-1],o=this.profiling.frames.length-1;n.endIndex=o,this.profiling.interactions.push(t),this.interactionMapToPayload.set(t,e)}},t.prototype.onInteractionStart=function(t){var e=t.name,r=this.indexRecordMap.get(e)||[];r.push({startIndex:this.profiling.frames.length,endIndex:0}),this.indexRecordMap.set(e,r)},t}()),o=r(106),i=r(87),a=function(){function t(){this.onFrame=n.onFrame}return t.prototype.onInteraction=function(t,e){var r=t.name;r===o.a.IDLE||e.__INTERNAL__merged||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.a)(r),n.isProfiling&&n.onInteraction(t,e))},t.prototype.onInteractionStart=function(t){var e=t.name;e===o.a.IDLE||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.g)(e),n.isProfiling&&n.onInteractionStart(t))},t}();e.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(0),o=r(154),i=r(764),a=function(){function t(){}return t.prototype.__INTERNAL__beforeInit=function(){var t;this._session=this.createSession(),null===(t=this.beforeInit)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterInit=function(){var t;try{null===(t=this.afterInit)||void 0===t||t.call(this)}finally{this._session.__INTERNAL__afterInit()}},t.prototype.__INTERNAL__beforeDispose=function(){var t;null===(t=this.beforeDispose)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterDispose=function(){var t;try{null===(t=this.afterDispose)||void 0===t||t.call(this)}finally{this._session.__INTERNAL_dispose()}},t.prototype.createSession=function(){return new i.a},Object(n.c)([Object(o.b)({getter:function(){return this._session}})],t.prototype,"session",void 0),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a}));var n=r(257),o=r(12),i=o.createContext({get rootState(){throw new Error}}),a=Object(n.getConnector)(i).connect},function(t,e,r){"use strict";var n=r(11),o=function(){function t(e){var r=this;this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0,this.onMerged=e.onMerged,this.stutterFrameDurationBoundary=void 0!==e.stutterFrameDurationBoundary?e.stutterFrameDurationBoundary:t.DefaultStutterFrameDurationBoundary;var o=void 0!==e.maxMergeTimeDuration?e.maxMergeTimeDuration:t.DefaultMaxMergeTimeDuration;this.asyncFlush=Object(n.throttle)((function(){return r.flush()}),o,{leading:!1})}return t.prototype.onFrame=function(t){var e=t.duration;t.activeFrame&&this.addFrameDuration(e)},t.prototype.add=function(t){this.addFrameDuration(t)},t.prototype.addFrameDuration=function(t){this.frameDurationSum+=t,this.frameCount++,t>this.stutterFrameDurationBoundary&&this.stutterFrameCount++,this.asyncFlush()},t.prototype.flushImmediately=function(){this.asyncFlush.flush()},t.prototype.flush=function(){if(this.frameCount>0)try{this.onMerged({sum:this.frameDurationSum,count:this.frameCount,stutterCount:this.stutterFrameCount})}finally{this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0}},t.DefaultMaxMergeTimeDuration=1e3*(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING?30:180),t.DefaultStutterFrameDurationBoundary=100,t}();e.a=o},,,,,,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(257),o=r(509);function i(t){return Object(n.combine)(t,o.a)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),o=r(147),i=r(12),a=r(698),s=r(513),u=function(){function t(){this.toolsMap=new Map}return t.prototype.registerTool=function(t){this.toolsMap.set(t.toolKey,t),this.activeToolKey===t.toolKey&&t.onEnter()},t.prototype.unregisterTool=function(t){this.toolsMap.delete(t.toolKey),this.activeToolKey===t.toolKey&&t.onLeave()},t.prototype.toggleActiveToolKey=function(t){var e=this;if(this.activeToolKey!==t){var r=this.activeToolKey&&this.toolsMap.get(this.activeToolKey),n=t&&this.toolsMap.get(t);Object(s.b)([function(){return r&&r.onLeave()},function(){return n&&n.onEnter()},function(){return e.activeToolKey=t}]),Object(o.b)({behavior:o.a.switchTool,toolKey:t,prevToolKey:this.activeToolKey})}},t}(),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.systemInternal=new u,e.contextValue={system:e.systemInternal},e}return Object(n.d)(e,t),e.prototype.componentDidMount=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.componentDidUpdate=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.render=function(){return i.createElement(a.a.Provider,{value:this.contextValue},this.props.children)},e}(i.Component)},function(t,e,r){"use strict";var n=r(0),o=r(196),i=r(446),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.d)(e,t),e.prototype.setGlobalUnit=function(t){switch(t){case i.a.mm:this.setGlobalLengthUnit(o.c.mm),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.m:this.setGlobalLengthUnit(o.c.m),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.ft:this.setGlobalLengthUnit(o.c.ft),this.setGlobalAreaUnit(o.a.sqFt);break;default:if(String(t).match(/^1\d{2}$/))this.setGlobalLengthUnit(Number(String(t)[1])),this.setGlobalAreaUnit(Number(String(t)[2]));else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}},e}(o.f);e.a=a},function(t,e,r){"use strict";var n=r(11),o=r(701),i=function(){function t(t){this.props=t}return t.prototype.create=function(t){var e=this;return this.meshBuilder=new o.a((function(){return e.props}),this.props.__unstable__onMeshCreated||n.noop,t),this.meshBuilder.createMesh()},t.prototype.update=function(t){this.meshBuilder.updateMesh(t)},t.prototype.dispose=function(t){this.meshBuilder.disposeMesh()},t.prototype.__unstable__getSerializable=function(){return this.meshBuilder.serializable},t}();e.a=i},function(t,e,r){"use strict";var n,o,i=r(0),a=r(105),s=r(512),u=r(11),c=r(12),A=r(370),l=r(202),f=r(265),h=r(154),p=r(93);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){if(t.context===A.a){var e=a.default.getParent(t);Object(p.b)(t,"mount-view","[mountView] 未使用 mountView 挂载视图,进而导致渲染顺序不正确. 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor))+". ",e,Object(s.a)("002"))}var r=t.props.mountPointId,n=Object(u.first)(Object(f.c)(l.a.__INTERNAL__getKey(r)));if(n){var o=function(t){for(var e=t,r=a.default.getParent(e);r;)e=r,r=a.default.getParent(e);return e},c=o(t);if(c===o(n)){var h=c;if(String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(t,h)))>=String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(n,h)))){e=a.default.getParent(t);Object(p.b)(t,l.a.__INTERNAL__getKey(r),'[ViewMounter] ViewMounter 渲染顺序出现在相应的 MountPoint ("'+r.toString()+'") 之后,渲染顺序不正确:',t,". 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor)),e,".",Object(s.a)("001"))}}}}}function y(t){return t.exclusive?void 0:t.sourceKey}var v=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.viewKey=String(e.viewKey++),r}return Object(i.d)(e,t),e.prototype.componentDidMount=function(){var t=this.props;Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,this.context,y(t))},e.prototype.componentWillUpdate=function(t,e,r){this.props.mountPointId!==t.mountPointId?(Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey),Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,r,y(t))):Object(f.g)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.renderOrder,r,y(t))},e.prototype.componentWillUnmount=function(){Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey)},e.prototype.render=function(){return null},e.prototype.getChildren=function(t){var e=this;if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var r=t.children;return"function"==typeof r?function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r.apply(void 0,Object(i.i)(t));return I(e,o),o}:(I(this,r),r)}return t.children},e.viewKey=0,e.contextType=A.b,e}(c.Component);if(e.a=v,Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var m=function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,Object(i.i)([this],r)),t.apply(this,r)}};v.prototype.componentDidMount=m(null!==(n=v.prototype.componentDidMount)&&void 0!==n?n:u.noop,(function(t){g(t)})),v.prototype.componentDidUpdate=m(null!==(o=v.prototype.componentDidUpdate)&&void 0!==o?o:u.noop,(function(t){g(t)}))}function I(t,e){Array.isArray(e)?e.forEach((function(e){E(t,e)})):E(t,e)}function E(t,e){if(function(t){return"object"===d(t)&&null!==t}(e)&&null===e.key){var r=function(t){var e=null==t?void 0:t.type;return"string"==typeof e?e:e&&(e.__reactstandin__key||a.default.getDisplayName(e))},n=e._owner,o=t._reactInternalFiber.return;Object(p.b)(n||o,"viewMounter::contentKey",'[ViewMounter] Each child of ViewMounter must have a key, check "'+r(e)+'" in the render function of "'+r(n)+'" for mount point "'+Object(h.a)(l.a.__INTERNAL__getKey(t.props.mountPointId))+'". Details:',{viewMounterContentNode:e,viewmounterInstance:t,viewMounterParent:o,nodeOwner:n,getOwnerList:function(){var e=function(t){for(var e=[];t;)e.push(t),t=t._debugOwner;return e.map((function(t){return{name:r(t),node:t}}))};return{viewMounterOwnerList:e(t._reactInternalFiber._debugOwner),viewMounterContentOwnerList:e(n)}}},Object(s.a)("003"))}}},function(t,e,r){"use strict";r.d(e,"b",(function(){return h})),r.d(e,"a",(function(){return g}));var n=r(0),o=r(72),i=r(84),a=r(106),s=r(92),u=r(87);var c=r(559),A=r(692),l=r(325),f=r(694),h=function(){function t(){p.push(this)}return t.prototype.__INTERNAL__fpsMerged=function(t){this.onMergedFps&&this.onMergedFps(t)},t.prototype.__INTERNAL__getAppId=function(){return this.appId},t.prototype.__INTERNAL__emitEvent=function(t){this.onInteraction&&this.onInteraction(t)},t.prototype.__INTERNAL__initWithAppId=function(t){I(),this.appId=t},t.prototype.__INTERNAL__dispose=function(){var t=p.indexOf(this);p.splice(t,1)},t.prototype.config=function(t){this.onInteraction=t.onInteraction,this.onMergedFps=t.onMergedFps},Object(n.c)([f.a],t.prototype,"config",null),t}(),p=[],d=function(t,e){o.b.getInstance().emit(g,e),p.forEach((function(r){r.__INTERNAL__getAppId()===t&&r.__INTERNAL__emitEvent(e)}))},g=new i.a(a.a.INTERACTION),y=function(t){var e;return Object(n.b)(void 0,void 0,void 0,(function(){var r,o,i=t.appId,s=t.failed,A=Object(n.h)(t,["appId","failed"]);return Object(n.e)(this,(function(t){switch(t.label){case 0:return[4,Object(c.d)()];case 1:return t.sent(),r=(null===(e=navigator.connection)||void 0===e?void 0:e.rtt)||0,o=Object(u.c)(),d(i,{eventType:a.d.PAGE_READY,metricData:Object(n.a)(Object(n.a)(Object(n.a)({},"memory"in performance?{totalJSHeapSize:performance.memory.totalJSHeapSize,usedJSHeapSize:performance.memory.usedJSHeapSize}:{}),A),{pageFinshedTotal:Object(u.e)()}),perfData:Object(n.a)(Object(n.a)({},o),{rtt:r}),labels:{failed:s.toString()}}),[2]}}))}))},v=function(){function t(){}return t.prototype.onInstantInteraction=function(t,e){d(t.appId,{eventType:a.d.INSTANT_INTERACTION,metricData:e,labels:{interaction:t.name}})},t.prototype.onInteraction=function(t,e){t.merged&&!e.__INTERNAL__merged||(t.durationOnly||t.trackingMerged&&(e=Object(n.a)(Object(n.a)({},e),{eventType:a.d.INTERACTION,labels:Object(n.a)(Object(n.a)({},e.labels),{interaction:t.name})})),d(t.appId,e))},t}(),m=!1,I=function(){if(!m){if(c.a.on(a.a.PAGE_READY,y),l.a.addPlugin(new v),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING){var t=r(1215).default;l.a.addPlugin(new t)}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING){var e=r(1383).default;l.a.addPlugin(new e)}var n;l.a.init(),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(n=s.b.prototype.componentWillMount,s.b.prototype.componentWillMount=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(this,t);var r=Object(u.b)(this);r&&Object(u.f)(this.mesh,r)},Object(A.a)()),m=!0}}}])}));
|